NTMapVec


@interface NTMapVec : NSObject {
  void *swigCPtr;
  BOOL swigCMemOwn;
}

A double precision map vector defined by 3 coordinates.

  • Checks if this object is equal to the specified object.

    Declaration

    Objective-C

    - (BOOL)isEqual:(id)object;

    Parameters

    object

    The reference object.

    Return Value

    True when objects are equal, false otherwise.

  • Returns the hash value of this object.

    Declaration

    Objective-C

    - (NSUInteger)hash;

    Return Value

    The hash value of this object.

  • Constructs a MapVec object. All coordinates will be 0.

    Declaration

    Objective-C

    - (id)init;
  • Constructs a MapVec object from 2 coordinates. The z coordinate will be 0.

    Declaration

    Objective-C

    - (id)initWithX:(double)x y:(double)y;

    Parameters

    x

    The x coordinate.

    y

    The y coordinate.

  • Constructs a MapVec object from 3 coordinates.

    Declaration

    Objective-C

    - (id)initWithX:(double)x y:(double)y z:(double)z;

    Parameters

    x

    The x coordinate.

    y

    The y coordinate.

    z

    The z coordinate.

  • Returns the x coordinate of this map vector.

    Declaration

    Objective-C

    - (double)getX;

    Return Value

    The x coordinate of this map vector.

  • Returns the y coordinate of this map vector.

    Declaration

    Objective-C

    - (double)getY;

    Return Value

    The y coordinate of this map vector.

  • Returns the z coordinate of this map vector.

    Declaration

    Objective-C

    - (double)getZ;

    Return Value

    The z coordinate of this map vector.

  • Creates a new map vector by adding a map vector to this map vector.

    Declaration

    Objective-C

    - (NTMapVec *)add:(NTMapVec *)v;

    Parameters

    v

    The map vector to be added.

    Return Value

    The new map vector.

  • Creates a new map vector by subtracting a map vector from this map vector.

    Declaration

    Objective-C

    - (NTMapVec *)sub:(NTMapVec *)v;

    Parameters

    v

    The map vector to be subtracted.

    Return Value

    The new map vector.

  • Creates a new map vector by multiplying this map vector with a multiplier.

    Declaration

    Objective-C

    - (NTMapVec *)mul:(double)multiplier;

    Parameters

    multiplier

    The multiplier.

    Return Value

    The new map vector.

  • Creates a new map vector by dividing this map vector with a divider.

    Declaration

    Objective-C

    - (NTMapVec *)div:(double)divider;

    Parameters

    divider

    The divider.

    Return Value

    The new map vector.

  • Checks for equality between this and another map vector.

    Declaration

    Objective-C

    - (BOOL)isEqualInternal:(NTMapVec *)v;

    Parameters

    v

    The other map vector.

    Return Value

    True if equal.

  • Calculates the length of this map vector.

    Declaration

    Objective-C

    - (double)length;

    Return Value

    The length of this map vector.

  • Creates a new map vector by normalizing this map vector.

    Declaration

    Objective-C

    - (NTMapVec *)getNormalized;

    Return Value

    The new normalized map vector.

  • Calculates the 2D cross product between this and another map vector. Defined as x1 * y2 - y1 * x2.

    Declaration

    Objective-C

    - (double)crossProduct2D:(NTMapVec *)v;

    Parameters

    v

    The other map vector.

    Return Value

    The 2D cross product between this and another map vector.

  • Creates a new map vector that’s perpendicular to the plane defined by this and another map vector.

    Declaration

    Objective-C

    - (NTMapVec *)crossProduct3D:(NTMapVec *)v;

    Parameters

    v

    The other map vector.

    Return Value

    The new perpendicular map vector.

  • Calculates the dot product between this and another map vector.

    Declaration

    Objective-C

    - (double)dotProduct:(NTMapVec *)v;

    Parameters

    v

    The other map vector.

    Return Value

    The dot product between this and another map vector.

  • Returns the hash value of this object.

    Declaration

    Objective-C

    - (int)hashInternal;

    Return Value

    The hash value of this object.

  • Creates a string representation of this map vector, useful for logging.

    Declaration

    Objective-C

    - (NSString *)description;

    Return Value

    The string representation of this map vector.

  • Undocumented

    Declaration

    Objective-C

    -(void)dealloc;