
1 6 CHAPTER 2. Points
Instead, the vector must be assigned in a component-wise fashion.
setAttr transforml.translate ($t.x) ($t.y) ($t.z)- // OK
2.7
C++ API
The C++ class for points is the MPoint class. The MPoint class is a homogeneous
point with four coordinates: x, y, z, w. Each coordinate is stored as a double. There
also exists a float variation of this class, MFloatPoint. The default constructor
initializes the coordinates to the following.
MPoint pt- // x=y=z=O, w=l
The point can be converted from a Cartesian point to a homogeneous point via the
homogeni ze
function.
MPoint pt"
pt.homogenize(). // pt = (w'x, ...