MTCoordinates

Class MTCoordinates inherits from class MTVector (4.1). It represents the special case of a three dimensional vector, though it is of four dimensions and can be multiplied with a 4x4 matrix (4.3). In addition to the methods inherited from class MTVetor it implements:

* calculations
-(double)distanceTo: (MTCoordinates*)c2 calculates the distance between two coordinates
-(double)distanceToLineFrom: (MTCoordinates*)v2 to: (MTCoordinates*)v3 calculates the distance from this point to the line given by (v2,v3)
-(double)x returns X coordinate
-(double)y returns Y coordinate
-(double)z returns Z coordinate
-(id)setX:(double)newx Y:(double)newy Z:(double)newz sets new coordinates
-(id)transformBy: (MTMatrix53*)m rotates and translates the vector by the matrix (4.4)
-(id)rotateBy:(MTMatrix44*)m rotates the vector by the matrix (4.3)
-(id)translateBy: (MTVector*)v adds the vector (4.1) to this coordinates
-(MTMatrix44*)alignToZaxis returns the rotation (4.3) for aligning these coordinates along the Z-axis
* creation
+(MTCoordinates*)coordsFromCoordinates: (MTCoordinates*)c makes a copy of coordinates
+(MTCoordinates*)coordsFromVector: (MTVector*)v makes a copy of a vector (4.1)
+(MTCoordinates*)coordsWithX:(double)x Y:(double)y Z:(double)z create new with explicit coordinates
+(MTCoordinates*)origin create new at (0,0,0)

moltalk@moltalk.org      version of this document: V3.0