29#ifndef OOMATHS_EXTERNAL_VECTOR_TYPES
74#define vector_between(a, b) vector_subtract(b, a)
121NSString* VectorDescription(
Vector vector);
124@interface OONativeVector : NSObject {
128- (id)initWithVector:(
Vector)vect;
136#define GLVertexOOVector(v) \
139 glVertex3f(v_.x, v_.y, v_.z); \
141#define GLTranslateOOVector(v) \
144 OOGL(glTranslatef(v_.x, v_.y, v_.z)); \
234 return a.
x == b.
x && a.
y == b.
y && a.
z == b.
z;
239 return vec.
x * vec.
x + vec.
y * vec.
y + vec.
z * vec.
z;
288 result.
x = (first.
y * second.
z) - (first.
z * second.
y);
289 result.
y = (first.
z * second.
x) - (first.
x * second.
z);
290 result.
z = (first.
x * second.
y) - (first.
y * second.
x);
301 return (a.
x * b.
x) + (a.
y * b.
y) + (a.
z * b.
z);
OOINLINE float OOLerp(float v0, float v1, float fraction) INLINE_CONST_FUNC
#define ALWAYS_INLINE_FUNC
#define INLINE_CONST_FUNC
OOINLINE Vector vector_flip(Vector v) INLINE_CONST_FUNC
OOINLINE Vector OOVectorTowards(Vector a, Vector b, OOScalar where) INLINE_CONST_FUNC
OOINLINE Vector vector_add(Vector a, Vector b) INLINE_CONST_FUNC
OOINLINE OOScalar triple_product(Vector first, Vector second, Vector third) INLINE_CONST_FUNC
OOINLINE Vector vector_subtract(Vector a, Vector b) INLINE_CONST_FUNC
OOINLINE OOScalar magnitude(Vector vec) INLINE_CONST_FUNC
OOINLINE OOScalar distance2(Vector v1, Vector v2) INLINE_CONST_FUNC
const Vector2D kBasisYVector2D
OOINLINE Vector vector_normal_or_zbasis(Vector vec) INLINE_CONST_FUNC
OOINLINE Vector make_vector(OOScalar vx, OOScalar vy, OOScalar vz) INLINE_CONST_FUNC
OOINLINE OOScalar dot_product(Vector first, Vector second) INLINE_CONST_FUNC
OOINLINE Vector vector_normal_or_fallback(Vector vec, Vector fallback) INLINE_CONST_FUNC
OOINLINE Vector true_cross_product(Vector first, Vector second) CONST_FUNC
OOINLINE Vector normal_to_surface(Vector v1, Vector v2, Vector v3) CONST_FUNC
OOINLINE bool vector_equal(Vector a, Vector b) INLINE_CONST_FUNC
const Vector2D kZeroVector2D
OOINLINE Vector OOVectorInterpolate(Vector a, Vector b, OOScalar where) INLINE_CONST_FUNC
OOINLINE Vector2D MakeVector2D(OOScalar vx, OOScalar vy) INLINE_CONST_FUNC
const Vector kBasisYVector
OOINLINE Vector cross_product(Vector first, Vector second) INLINE_CONST_FUNC
OOINLINE void scale_vector(Vector *outVector, OOScalar factor) ALWAYS_INLINE_FUNC NONNULL_FUNC
OOINLINE OOScalar magnitude2(Vector vec) INLINE_CONST_FUNC
Vector OORandomUnitVector(void)
const Vector2D kBasisXVector2D
OOINLINE Vector vector_normal_or_ybasis(Vector vec) INLINE_CONST_FUNC
const Vector kBasisZVector
const Vector kBasisXVector
OOINLINE Vector vector_normal_or_xbasis(Vector vec) INLINE_CONST_FUNC
Vector OOVectorRandomRadial(OOScalar maxLength)
Vector OOVectorRandomSpatial(OOScalar maxLength)
OOINLINE OOScalar distance(Vector v1, Vector v2) INLINE_CONST_FUNC
OOINLINE Vector vector_multiply_scalar(Vector v, OOScalar s) INLINE_CONST_FUNC
OOINLINE Vector vector_normal(Vector vec) INLINE_CONST_FUNC