37NSString* HPVectorDescription(
HPVector vector)
39 return [NSString stringWithFormat:@"(%g, %g, %g)", vector.x, vector.y, vector.z];
42NSArray* ArrayFromHPVector(
HPVector vec)
44 return [NSArray arrayWithObjects:[NSNumber numberWithDouble:vec.x],
45 [NSNumber numberWithDouble:vec.y],
46 [NSNumber numberWithDouble:vec.z],
70 }
while (m > 0.25 || m == 0.0);
106 if (
HPdistance(centre1, centre2) < (exclusion1 + exclusion2) * 1.2) {
107 OOLog(
@"position.cylinder.error",
@"Trying to generate cylinder position in range %f long with exclusions %f and %f",
HPdistance(centre1, centre2), exclusion1, exclusion2);
const HPVector kBasisXHPVector
const HPVector2D kBasisYHPVector2D
OOINLINE OOHPScalar HPdot_product(HPVector first, HPVector second) INLINE_CONST_FUNC
const HPVector kBasisYHPVector
OOINLINE HPVector HPvector_subtract(HPVector a, HPVector b) INLINE_CONST_FUNC
OOINLINE HPVector HPvector_multiply_scalar(HPVector v, OOHPScalar s) INLINE_CONST_FUNC
const HPVector kZeroHPVector
OOINLINE HPVector make_HPvector(OOHPScalar vx, OOHPScalar vy, OOHPScalar vz) INLINE_CONST_FUNC
OOINLINE OOHPScalar HPdistance2(HPVector v1, HPVector v2) INLINE_CONST_FUNC
OOINLINE HPVector HPvector_normal(HPVector vec) INLINE_CONST_FUNC
const HPVector2D kBasisXHPVector2D
OOINLINE HPVector HPvector_add(HPVector a, HPVector b) INLINE_CONST_FUNC
const HPVector2D kZeroHPVector2D
const HPVector kBasisZHPVector
OOINLINE OOHPScalar HPmagnitude2(HPVector vec) INLINE_CONST_FUNC
OOINLINE OOHPScalar HPdistance(HPVector v1, HPVector v2) INLINE_CONST_FUNC
OOINLINE HPVector OOHPVectorInterpolate(HPVector a, HPVector b, OOHPScalar where) INLINE_CONST_FUNC
HPVector OOHPVectorRandomRadial(OOHPScalar maxLength)
HPVector OOProjectHPVectorToPlane(HPVector point, HPVector plane, HPVector normal)
HPVector OORandomPositionInShell(HPVector centre, OOHPScalar inner, OOHPScalar outer)
HPVector OOHPRandomPositionInBoundingBox(BoundingBox bb)
HPVector OORandomUnitHPVector(void)
HPVector OOHPVectorRandomSpatial(OOHPScalar maxLength)
HPVector OORandomPositionInCylinder(HPVector centre1, OOHPScalar exclusion1, HPVector centre2, OOHPScalar exclusion2, OOHPScalar radius)
#define OOLog(class, format,...)