MSFMapVec

Objective-C


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

Swift

class MSFMapVec : NSObject

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;

    Swift

    func isEqual(_ object: Any!) -> Bool

    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;

    Swift

    func hash() -> UInt

    Return Value

    The hash value of this object.

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

    Declaration

    Objective-C

    - (id)init;

    Swift

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

    Declaration

    Objective-C

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

    Swift

    init!(x: Double, y: Double)

    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;

    Swift

    init!(x: Double, y: Double, z: Double)

    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;

    Swift

    func getX() -> Double

    Return Value

    The x coordinate of this map vector.

  • Returns the y coordinate of this map vector.

    Declaration

    Objective-C

    - (double)getY;

    Swift

    func getY() -> Double

    Return Value

    The y coordinate of this map vector.

  • Returns the z coordinate of this map vector.

    Declaration

    Objective-C

    - (double)getZ;

    Swift

    func getZ() -> Double

    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

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

    Swift

    func add(_ v: MSFMapVec!) -> MSFMapVec!

    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

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

    Swift

    func sub(_ v: MSFMapVec!) -> MSFMapVec!

    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

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

    Swift

    func mul(_ multiplier: Double) -> MSFMapVec!

    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

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

    Swift

    func div(_ divider: Double) -> MSFMapVec!

    Parameters

    divider

    The divider.

    Return Value

    The new map vector.

  • Checks for equality between this and another map vector.

    Declaration

    Objective-C

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

    Swift

    func isEqualInternal(_ v: MSFMapVec!) -> Bool

    Parameters

    v

    The other map vector.

    Return Value

    True if equal.

  • Calculates the length of this map vector.

    Declaration

    Objective-C

    - (double)length;

    Swift

    func length() -> Double

    Return Value

    The length of this map vector.

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

    Declaration

    Objective-C

    - (MSFMapVec *)getNormalized;

    Swift

    func getNormalized() -> MSFMapVec!

    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:(MSFMapVec *)v;

    Swift

    func crossProduct2D(_ v: MSFMapVec!) -> Double

    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

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

    Swift

    func crossProduct3D(_ v: MSFMapVec!) -> MSFMapVec!

    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:(MSFMapVec *)v;

    Swift

    func dotProduct(_ v: MSFMapVec!) -> Double

    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;

    Swift

    func hashInternal() -> Int32

    Return Value

    The hash value of this object.

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

    Declaration

    Objective-C

    - (NSString *)description;

    Swift

    func description() -> String!

    Return Value

    The string representation of this map vector.

  • Undocumented

    Declaration

    Objective-C

    -(void)dealloc;

    Swift

    func dealloc()