C++ API Reference

Implementation of a point. More...

#include <MPoint.h>

Public Member Functions

 MPoint ()
 Default constructor. More...
 
 MPoint (const MPoint &srcpt)
 Copy constructor. More...
 
 MPoint (const MFloatPoint &srcpt)
 Creates an new instance and initializes it to the x, y, z, w values of the given MFloatPoint. More...
 
 MPoint (const MVector &src)
 Creates an new instance and initializes it to the x, y, z values of the given MVector. More...
 
 MPoint (const MFloatVector &src)
 Creates an new instance and initializes it to the x, y, z values of the given MFloatVector. More...
 
 MPoint (double xx, double yy, double zz=0.0, double ww=1.0)
 Create a new instance and initialize it to the given position. More...
 
 MPoint (const double d[4])
 Create a new instance and initialize it to the given position. More...
 
 MPoint (const float d[4])
 Create a new instance and initialize it to the given position. More...
 
 ~MPoint ()
 Class destructor.
 
MStatus get (double[4]) const
 Copy the values of x, y, z, and w from the instance to the four elements of the given array of doubles. More...
 
MStatus get (float[4]) const
 Copy the values of x, y, z, and w from the instance to the four elements of the given array of floats. More...
 
double operator[] (unsigned int i) const
 The index operator. More...
 
double operator() (unsigned int i) const
 The index operator. More...
 
MPointoperator= (const MPoint &src)
 The assignment operator. More...
 
MVector operator- (const MPoint &other) const
 The subtraction operator for two MPoints. More...
 
MPoint operator+ (const MVector &other) const
 The addition operator for adding an MVector to an MPoint. More...
 
MPoint operator- (const MVector &other) const
 The addition operator for subtracting an MVector from an MPoint. More...
 
MPointoperator+= (const MVector &vector)
 The in-place addition operator for adding an MVector to an MPoint. More...
 
MPointoperator-= (const MVector &vector)
 The in-place subtraction operator for subtracting an MVector from an MPoint. More...
 
MPoint operator* (const int scale) const
 The multipication operator that allows the vector to by scaled by the given parameter. More...
 
MPoint operator* (const short scale) const
 The multipication operator that allows the vector to by scaled by the given parameter. More...
 
MPoint operator* (const unsigned int scale) const
 The multipication operator that allows the vector to by scaled by the given parameter. More...
 
MPoint operator* (const unsigned short scale) const
 The multipication operator that allows the vector to by scaled by the given parameter. More...
 
MPoint operator* (const float scale) const
 The multipication operator that allows the vector to by scaled by the given parameter. More...
 
MPoint operator* (const double scale) const
 The multipication operator that allows the vector to by scaled by the given parameter. More...
 
MPoint operator/ (const double scale) const
 The division operator that allows the vector to by scaled by the given double parameter. More...
 
MPoint operator* (const MMatrix &) const
 The multiplication operator for computing the product of this point instance with the given matrix. More...
 
MPointoperator*= (const MMatrix &)
 The in-place multiplication operator for computing the product of this point instance with the given matrix. More...
 
MPointoperator*= (const int)
 The in-place multiplication operator for computing the scalar product of this point instance with the given scalar. More...
 
MPointoperator*= (const short)
 The in-place multiplication operator for computing the scalar product of this point instance with the given scalar. More...
 
MPointoperator*= (const unsigned int)
 The in-place multiplication operator for computing the scalar product of this point instance with the given scalar. More...
 
MPointoperator*= (const unsigned short)
 The in-place multiplication operator for computing the scalar product of this point instance with the given scalar. More...
 
MPointoperator*= (const float)
 The in-place multiplication operator for computing the scalar product of this point instance with the given scalar. More...
 
MPointoperator*= (const double)
 The in-place multiplication operator for computing the scalar product of this point instance with the given scalar. More...
 
bool operator== (const MPoint &other) const
 The equality operator. More...
 
bool operator!= (const MPoint &other) const
 The inequality operator. More...
 
MPointcartesianize ()
 If this point instance is of the form P(W*x, W*y, W*z, W), for some scale factor W != 0, then it is reset to be P(x, y, z, 1). More...
 
MPointrationalize ()
 If this point instance is of the form P(W*x, W*y, W*z, W) (ie. More...
 
MPointhomogenize ()
 If this point instance is of the form P(x, y, z, W) (ie. More...
 
double distanceTo (const MPoint &other) const
 Return the distance between this instance and the point passed as an argument. More...
 
bool isEquivalent (const MPoint &other, double tolerance=MPoint_kTol) const
 Returns true if this instance of the point passed as an argument represent the same position within the specified tolerance. More...
 
double & operator[] (unsigned int i)
 NO SCRIPT SUPPORT. More...
 
double & operator() (unsigned int i)
 NO SCRIPT SUPPORT. More...
 

Static Public Member Functions

static const char * className ()
 Returns the name of this class. More...
 

Public Attributes

double x
 the x component of the point
 
double y
 the y component of the point
 
double z
 the z component of the point
 
double w
 the w component of the point
 

Static Public Attributes

static const MPoint origin
 A constant representing the origin - (0,0,0,1).
 

Friends

OPENMAYA_EXPORT MPoint operator* (int, const MPoint &)
 NO SCRIPT SUPPORT. More...
 
OPENMAYA_EXPORT MPoint operator* (short, const MPoint &)
 NO SCRIPT SUPPORT. More...
 
OPENMAYA_EXPORT MPoint operator* (unsigned int, const MPoint &)
 NO SCRIPT SUPPORT. More...
 
OPENMAYA_EXPORT MPoint operator* (unsigned short, const MPoint &)
 NO SCRIPT SUPPORT. More...
 
OPENMAYA_EXPORT MPoint operator* (float, const MPoint &)
 NO SCRIPT SUPPORT. More...
 
OPENMAYA_EXPORT MPoint operator* (double, const MPoint &)
 NO SCRIPT SUPPORT. More...
 
OPENMAYA_EXPORT MPoint operator* (const MMatrix &, const MPoint &)
 NO SCRIPT SUPPORT. More...
 
OPENMAYA_EXPORT std::ostream & operator<< (std::ostream &os, const MPoint &p)
 NO SCRIPT SUPPORT. More...
 

Detailed Description

Implementation of a point.

This class provides an implementation of a point. Numerous convienence operators are provided to help with the manipulation of points. This includes operators that work with the MVector and MMatrix classes.

All methods that query the point are threadsafe, all methods that modify the point are not threadsafe.

Examples:
AbcBullet/AttributesWriter.cpp, AbcExport/AttributesWriter.cpp, AbcExport/MayaNurbsCurveWriter.cpp, AbcImport/NodeIteratorVisitorHelper.cpp, AbcImport/NurbsSurfaceHelper.cpp, AbcImport/XformHelper.cpp, animInfoCmd/animInfoCmd.cpp, apiDirectionalLightShape/apiDirectionalLightShape.cpp, apiMeshShape/apiMeshCreator.cpp, apiMeshShape/apiMeshData.cpp, apiMeshShape/apiMeshGeometryOverride.cpp, apiMeshShape/apiMeshIterator.cpp, apiMeshShape/apiMeshIterator.h, apiMeshShape/apiMeshShape.cpp, apiMeshShape/apiMeshShape.h, apiMeshShape/apiMeshSubSceneOverride.cpp, basicBlendShape/basicBlendShape.cpp, basicBlendShapeDeformer/basicBlendShapeDeformer.cpp, basicMorphNode/basicMorphNode.cpp, basicSkinCluster/basicSkinCluster.cpp, blindDataShader/blindDataMesh.cpp, cgFx/cgfxShaderNode.cpp, closestPointCmd/closestPointCmd.cpp, closestPointOnCurve/closestPointOnCurveCmd.cpp, closestPointOnCurve/closestPointOnCurveCmd.h, closestPointOnCurve/closestPointOnCurveNode.cpp, closestPointOnCurve/closestTangentUAndDistance.cpp, closestPointOnCurve/closestTangentUAndDistance.h, closestPointOnNurbsSurfaceCmd/closestPointOnNurbsSurfaceCmd.cpp, clusterWeightFunction/clusterWeightFunction.cpp, componentScaleManip/componentScaleManip.cpp, customComponentTagNode/customComponentTagNode.cpp, customPrimitiveGenerator/customPrimitiveGenerator.cpp, cvColorNode/cvColorNode.cpp, cvPosCmd/cvPosCmd.cpp, exampleFalloff/smoothFalloffNode.cpp, fluidInfoCmd/fluidInfoCmd.cpp, footPrintManip/footPrintManip.cpp, footPrintNode/footPrintNode.cpp, footPrintNode_AnimatedMaterial/footPrintNode_GeometryOverride_AnimatedMaterial.cpp, footPrintNode_GeometryOverride/footPrintNode_GeometryOverride.cpp, footPrintNode_SubSceneOverride/footPrintNode_SubSceneOverride.cpp, geometryOverrideExample1/geometryOverrideExample1.cpp, geometryOverrideExample2/geometryOverrideExample2.cpp, geometryReplicator/geometryReplicator.cpp, gpuCache/CacheReaderAlembic.cpp, gpuCache/CacheReaderAlembic.h, gpuCache/CacheWriter.cpp, gpuCache/CacheWriterAlembic.cpp, gpuCache/gpuCacheCmd.cpp, gpuCache/gpuCacheDrawOverride.cpp, gpuCache/gpuCacheFrustum.cpp, gpuCache/gpuCacheFrustum.h, gpuCache/gpuCacheIsectUtil.cpp, gpuCache/gpuCacheIsectUtil.h, gpuCache/gpuCacheShapeNode.cpp, gpuCache/gpuCacheShapeNode.h, gpuCache/gpuCacheSpatialGrid.cpp, gpuCache/gpuCacheSpatialGrid.h, gpuCache/gpuCacheSpatialGridWalker.cpp, gpuCache/gpuCacheSpatialGridWalker.h, gpuCache/gpuCacheSpatialSubdivision.cpp, gpuCache/gpuCacheSpatialSubdivision.h, gpuCache/gpuCacheUnitBoundingBox.cpp, gpuCache/gpuCacheVBOProxy.cpp, grabUVMain.cpp, helix2Cmd/helix2Cmd.cpp, helixCmd/helixCmd.cpp, helixQtCmd.cpp, helixTool/helixTool.cpp, hwPhongShader/hwPhongShader.cpp, hwPhongShader/hwPhongShader.h, identityGeomFilter/identityGeomFilter.cpp, identityNode/identityNode.cpp, ik2Bsolver/AwPoint.h, instancerListCmd/instancerListCmd.cpp, intersectOnNurbsSurfaceCmd/intersectOnNurbsSurfaceCmd.cpp, lassoTool/lassoTool.cpp, latticeNoise/latticeNoiseNode.cpp, lineManip/lineManip.cpp, lineManip/lineManip.h, lineManip/manipulatorMath.cpp, lineManip/manipulatorMath.h, lineManipContainer/lineManipContainer.cpp, lineManipContainer/lineManipContainer.h, lineManipContainer/manipulatorMath.cpp, lineManipContainer/manipulatorMath.h, manipOverride/rockingTransform2.cpp, marqueeTool/marqueeTool.cpp, MayaPluginForSpreticle/spReticleLoc.cpp, MayaPluginForSpreticle/spReticleLoc.h, meshOpCmd/meshOpFtyAction.cpp, motionPathNode/motionPathNode.cpp, motionTraceCmd/motionTraceCmd.cpp, moveCurveCVsCmd/moveCurveCVsCmd.cpp, moveManip/moveManip.cpp, moveNumericTool/moveNumericTool.cpp, moveTool/moveTool.cpp, narrowPolyRenderOverride/narrowPolyRenderOverride.cpp, objExport/objExport.cpp, offsetNode/offsetNode.cpp, ownerEmitter/ownerEmitter.cpp, ownerEmitter/ownerEmitter.h, particleAttrNode/particleAttrNode.cpp, particlePathsCmd/particleIdHash.h, particlePathsCmd/particlePathsCmd.cpp, particleSystemInfoCmd/particleSystemInfoCmd.cpp, pointManip/pointManip.cpp, pointManip/pointManip.h, pointOnMeshInfo/getPointAndNormal.cpp, pointOnMeshInfo/getPointAndNormal.h, pointOnMeshInfo/pointOnMeshCmd.cpp, pointOnMeshInfo/pointOnMeshInfoNode.cpp, pointOnSubdNode/pointOnSubdNode.cpp, rawfootPrintNode/rawfootPrintNode.cpp, rockingTransform/rockingTransform.cpp, rockingTransform/rockingTransform.h, rockingTransformCheck/rockingTransform.cpp, rockingTransformCheck/rockingTransform.h, sampleCmd/sampleCmd.cpp, shellNode/shellNode.cpp, simpleEmitter/simpleEmitter.cpp, simpleEmitter/simpleEmitter.h, simpleEvaluationDraw/simpleEvaluationDraw.cpp, simpleFluidEmitter/simpleFluidEmitter.cpp, simpleLoftNode/simpleLoftNode.cpp, simpleSolverNode/simpleSolverNode.cpp, squareScaleManip/manipulatorMath.cpp, squareScaleManip/manipulatorMath.h, squareScaleManip/squareScaleManip.cpp, squareScaleManip/squareScaleManip.h, squareScaleManipContext/manipulatorMath.cpp, squareScaleManipContext/manipulatorMath.h, squareScaleManipContext/squareScaleManipContext.cpp, squareScaleManipContext/squareScaleManipContext.h, squaresNode_noDepthTest/squaresNode_noDepthTest.cpp, surfaceBumpManip/surfaceBumpManip.cpp, surfaceCreateCmd/surfaceCreateCmd.cpp, surfaceTwistCmd/surfaceTwistCmd.cpp, sweptEmitter/sweptEmitter.h, swissArmyManip/swissArmyManip.cpp, tessellatedQuad/TessellatedQuadNode.cpp, testFailureNode/testFailureNode.cpp, topologyTrackingNode/topologyTrackingNode.cpp, transformDrawNode/transformDrawNode.cpp, uiDrawManager/uiDrawManager.cpp, viewCallbackTest/viewCallbackTest.cpp, viewDX11DeviceAccess/viewDX11DeviceAccess.cpp, viewMRenderOverride/viewMRenderOverride.cpp, viewRenderOverride/viewRenderOverrideOperations.cpp, viewRenderOverride/viewRenderOverrideUserOperation.cpp, and yTwistNode/yTwistNode.cpp.

Constructor & Destructor Documentation

OPENMAYA_NAMESPACE_CLOSE OPENMAYA_MAJOR_NAMESPACE_OPEN MPoint ( )
inline

Default constructor.

The instance is initialized to the origin.

MPoint ( const MPoint srcpt)
inline

Copy constructor.

Creates an new instance and initializes it to the same point as the given point.

Parameters
[in]srcptThe point object to copy from.
MPoint ( const MFloatPoint srcpt)
inline

Creates an new instance and initializes it to the x, y, z, w values of the given MFloatPoint.

Parameters
[in]srcptthe point object to copy
MPoint ( const MVector src)
inline

Creates an new instance and initializes it to the x, y, z values of the given MVector.

The w value is set to 1.0.

Parameters
[in]srcthe vector object to copy
MPoint ( const MFloatVector src)
inline

Creates an new instance and initializes it to the x, y, z values of the given MFloatVector.

The w value is set to 1.0.

Parameters
[in]srcthe vector object to copy
MPoint ( double  xx,
double  yy,
double  zz = 0.0,
double  ww = 1.0 
)
inline

Create a new instance and initialize it to the given position.

Parameters
[in]xxThe initial value of x.
[in]yyThe initial value of y.
[in]zzThe initial value of z.
[in]wwThe initial value of w.
MPoint ( const double  d[4])
inline

Create a new instance and initialize it to the given position.

Parameters
[in]darray of 4 doubles used to initialize x, y, z, and w respectively.
MPoint ( const float  f[4])
inline

Create a new instance and initialize it to the given position.

Parameters
[in]fAn array of 4 floats used to initialize x, y, z, and w respectively.

Member Function Documentation

MStatus get ( double  dest[4]) const
inline

Copy the values of x, y, z, and w from the instance to the four elements of the given array of doubles.

Parameters
[out]destThe four element array of doubles.
Returns
MS::kSuccess if dest is a non-zero pointer and MS::kFailure otherwise.
Examples:
AbcImport/NodeIteratorVisitorHelper.cpp, lineManip/lineManip.cpp, lineManipContainer/lineManipContainer.cpp, squareScaleManip/squareScaleManip.cpp, squareScaleManipContext/squareScaleManipContext.cpp, and viewRenderOverride/viewRenderOverrideUserOperation.cpp.
MStatus get ( float  dest[4]) const
inline

Copy the values of x, y, z, and w from the instance to the four elements of the given array of floats.

Warning
This method converts double precision floating point values to single precision. This will result in a loss of precision and, if the double precision value exceeds the valid range for single precision, the result will be undefined and unusable.
Parameters
[out]destThe four element array of floats.
Returns
MS::kSuccess if dest is a non-zero pointer and MS::kFailure otherwise.
double operator[] ( unsigned int  i) const
inline

The index operator.

  • If the argument is 0 it will return the x component of the constant instance.
  • If the argument is 1 it will return the y component of the constant instance.
  • If the argument is 2 it will return the z component of the constant instance.
  • If the argument is 3 it will return the w component of the constant instance.
  • Otherwise it will return the x component of the point.
Parameters
[in]iValue indicating which component to return.
Returns
The value of the indicated component of the instance.
double operator() ( unsigned int  i) const
inline

The index operator.

  • If the argument is 0 it will return the x component of the constant instance.
  • If the argument is 1 it will return the y component of the constant instance.
  • If the argument is 2 it will return the z component of the constant instance.
  • If the argument is 3 it will return the w component of the constant instance.
  • Otherwise it will return the x component of the point.
Parameters
[in]iValue indicating which component to return.
Returns
The value of the indicated component of the instance.
MPoint & operator= ( const MPoint src)
inline

The assignment operator.

Parameters
[in]srcPoint to copy from.
Returns
A reference to the assigned point.
MVector operator- ( const MPoint other) const
inline

The subtraction operator for two MPoints.

The result is the MVector from the other point to this instance.

Parameters
[in]otherThe other point.
Returns
MVector from the other point to this point
MPoint operator+ ( const MVector other) const
inline

The addition operator for adding an MVector to an MPoint.

A new point is returned whose position is that of the original point translated by the vector.

Parameters
[in]otherVector to add.
Returns
The resulting point.
MPoint operator- ( const MVector other) const
inline

The addition operator for subtracting an MVector from an MPoint.

A new point is returned whose position is that of the original point translated by the inverse of the vector.

Parameters
[in]otherVector to substract.
Returns
The resulting point.
MPoint & operator+= ( const MVector vector)
inline

The in-place addition operator for adding an MVector to an MPoint.

The current instance is translated from its original position by the vector.

Parameters
[in]vectorVector to add.
Returns
A reference to the resulting point.
MPoint & operator-= ( const MVector vector)
inline

The in-place subtraction operator for subtracting an MVector from an MPoint.

The current instance is translated from its original position by the inverse of the vector.

Parameters
[in]vectorVector to substract.
Returns
A reference to the resulting point.
MPoint operator* ( const int  scale) const
inline

The multipication operator that allows the vector to by scaled by the given parameter.

The x, y, and z components are each multiplied by the parameter. The w component remains unchanged.

Parameters
[in]scaleThe scale parameter.
Returns
The resulting point.
MPoint operator* ( const short  scale) const
inline

The multipication operator that allows the vector to by scaled by the given parameter.

The x, y, and z components are each multiplied by the parameter. The w component remains unchanged.

Parameters
[in]scaleThe scale parameter.
Returns
The resulting point.
MPoint operator* ( const unsigned int  scale) const
inline

The multipication operator that allows the vector to by scaled by the given parameter.

The x, y, and z components are each multiplied by the parameter. The w component remains unchanged.

Parameters
[in]scaleThe scale parameter.
Returns
The resulting point.
MPoint operator* ( const unsigned short  scale) const
inline

The multipication operator that allows the vector to by scaled by the given parameter.

The x, y, and z components are each multiplied by the parameter. The w component remains unchanged.

Parameters
[in]scaleThe scale parameter.
Returns
The resulting point.
MPoint operator* ( const float  scale) const
inline

The multipication operator that allows the vector to by scaled by the given parameter.

The x, y, and z components are each multiplied by the parameter. The w component remains unchanged.

Parameters
[in]scaleThe scale parameter.
Returns
The resulting point.
MPoint operator* ( const double  scale) const
inline

The multipication operator that allows the vector to by scaled by the given parameter.

The x, y, and z components are each multiplied by the parameter. The w component remains unchanged.

Parameters
[in]scaleThe scale parameter.
Returns
The resulting point.
MPoint operator/ ( const double  scale) const
inline

The division operator that allows the vector to by scaled by the given double parameter.

The x, y, and z components are each divided by the parameter. The w component remains unchanged.

Parameters
[in]scaleThe scale parameter.
Returns
The resulting point.
MPoint operator* ( const MMatrix right) const

The multiplication operator for computing the product of this point instance with the given matrix.

Parameters
[in]rightthe MMatrix to right multiply by
Returns
A point representing the product
MPoint & operator*= ( const MMatrix right)

The in-place multiplication operator for computing the product of this point instance with the given matrix.

Parameters
[in]rightthe MMatrix to right multiply by
Returns
A point representing the product
MPoint & operator*= ( const int  factor)
inline

The in-place multiplication operator for computing the scalar product of this point instance with the given scalar.

Parameters
[in]factorScalar to multiply this point by.
Returns
This point.
MPoint & operator*= ( const short  factor)
inline

The in-place multiplication operator for computing the scalar product of this point instance with the given scalar.

Parameters
[in]factorScalar to multiply this point by.
Returns
This point.
MPoint & operator*= ( const unsigned int  factor)
inline

The in-place multiplication operator for computing the scalar product of this point instance with the given scalar.

Parameters
[in]factorScalar to multiply this point by.
Returns
This point.
MPoint & operator*= ( const unsigned short  factor)
inline

The in-place multiplication operator for computing the scalar product of this point instance with the given scalar.

Parameters
[in]factorScalar to multiply this point by.
Returns
This point.
MPoint & operator*= ( const float  factor)
inline

The in-place multiplication operator for computing the scalar product of this point instance with the given scalar.

Parameters
[in]factorScalar to multiply this point by.
Returns
This point.
MPoint & operator*= ( const double  factor)
inline

The in-place multiplication operator for computing the scalar product of this point instance with the given scalar.

Parameters
[in]factorScalar to multiply this point by.
Returns
This point.
bool operator== ( const MPoint other) const
inline

The equality operator.

Parameters
[in]otherPoint to compare with.
Returns
True if all of the x, y, z and w components of the two points are identical.
bool operator!= ( const MPoint other) const
inline

The inequality operator.

Parameters
[in]otherPoint to compare with.
Returns
True if any of the x, y, z and w components of the two points are not identical.
MPoint & cartesianize ( )

If this point instance is of the form P(W*x, W*y, W*z, W), for some scale factor W != 0, then it is reset to be P(x, y, z, 1).

This will only work correctly if the point is in homogenous form or cartesian form. If the point is in rational form, the results are not defined.

Examples:
gpuCache/gpuCacheFrustum.cpp.
MPoint & rationalize ( )

If this point instance is of the form P(W*x, W*y, W*z, W) (ie.

is in homogenous or (for W==1) cartesian form), for some scale factor W != 0, then it is reset to be P(x, y, z, W). This will only work correctly if the point is in homogenous or cartesian form. If the point is already in rational form, the resultsare not defined.

Examples:
gpuCache/gpuCacheShapeNode.cpp.
MPoint & homogenize ( )

If this point instance is of the form P(x, y, z, W) (ie.

is in rational or (for W==1) cartesian form), for some scale factor W != 0, then it is reset to be P(W*x, W*y, W*z, W).

double distanceTo ( const MPoint other) const
inline

Return the distance between this instance and the point passed as an argument.

Parameters
[in]otherThe point to compute the distance to.
Returns
The distance between the two points.
Examples:
clusterWeightFunction/clusterWeightFunction.cpp, exampleFalloff/smoothFalloffNode.cpp, gpuCache/gpuCacheIsectUtil.cpp, gpuCache/gpuCacheShapeNode.cpp, gpuCache/gpuCacheSpatialGridWalker.cpp, gpuCache/gpuCacheSpatialSubdivision.cpp, and meshOpCmd/meshOpFtyAction.cpp.
bool isEquivalent ( const MPoint other,
double  tol = MPoint_kTol 
) const
inline

Returns true if this instance of the point passed as an argument represent the same position within the specified tolerance.

Parameters
[in]otherThe other point to compare to.
[in]tolThe tolerance to use during the comparison.
Returns
True if the points are equal within the given tolerance and false otherwise.
Examples:
gpuCache/CacheWriterAlembic.cpp.
double & operator[] ( unsigned int  i)
inline

NO SCRIPT SUPPORT.

The index operator.

  • If the argument is 0 it will return the x component of the instance.
  • If the argument is 1 it will return the y component of the instance.
  • If the argument is 2 it will return the z component of the instance.
  • If the argument is 3 it will return the w component of the instance.
  • Otherwise it will return the x component of the instance.
Parameters
[in]iValue indicating which component to return.
Returns
The value of the indicated component of the instance.
double & operator() ( unsigned int  i)
inline

NO SCRIPT SUPPORT.

The index operator.

If the argument is 0 it will return the x component of the instance. If the argument is 1 it will return the y component of the instance. If the argument is 2 it will return the z component of the instance. If the argument is 3 it will return the w component of the instance. Otherwise it will return the x component of the instance.

Parameters
[in]iValue indicating which component to return.
Returns
The value of the indicated component of the instance.
const char * className ( )
static

Returns the name of this class.

Returns
The name of this class.

Friends And Related Function Documentation

OPENMAYA_EXPORT MPoint operator* ( int  scale,
const MPoint p 
)
friend

NO SCRIPT SUPPORT.

The point's x, y, and z components are each multiplied by the scalar. The w component remains unchanged.

Parameters
[in]scaleThe scale parameter.
[in]pThe point to be scaled.
Returns
A new point containing the value of 'p' scaled by 'scale'.
OPENMAYA_EXPORT MPoint operator* ( short  scale,
const MPoint p 
)
friend

NO SCRIPT SUPPORT.

The point's x, y, and z components are each multiplied by the scalar. The w component remains unchanged.

Parameters
[in]scaleThe scale parameter.
[in]pThe point to be scaled.
Returns
A new point containing the value of 'p' scaled by 'scale'.
OPENMAYA_EXPORT MPoint operator* ( unsigned int  scale,
const MPoint p 
)
friend

NO SCRIPT SUPPORT.

The point's x, y, and z components are each multiplied by the scalar. The w component remains unchanged.

Parameters
[in]scaleThe scale parameter.
[in]pThe point to be scaled.
Returns
A new point containing the value of 'p' scaled by 'scale'.
OPENMAYA_EXPORT MPoint operator* ( unsigned short  scale,
const MPoint p 
)
friend

NO SCRIPT SUPPORT.

The point's x, y, and z components are each multiplied by the scalar. The w component remains unchanged.

Parameters
[in]scaleThe scale parameter.
[in]pThe point to be scaled.
Returns
A new point containing the value of 'p' scaled by 'scale'.
OPENMAYA_EXPORT MPoint operator* ( float  scale,
const MPoint p 
)
friend

NO SCRIPT SUPPORT.

The point's x, y, and z components are each multiplied by the scalar. The w component remains unchanged.

Parameters
[in]scaleThe scale parameter.
[in]pThe point to be scaled.
Returns
A new point containing the value of 'p' scaled by 'scale'.
OPENMAYA_EXPORT MPoint operator* ( double  scale,
const MPoint p 
)
friend

NO SCRIPT SUPPORT.

The point's x, y, and z components are each multiplied by the scalar. The w component remains unchanged.

Parameters
[in]scaleThe scale parameter.
[in]pThe point to be scaled.
Returns
A new point containing the value of 'p' scaled by 'scale'.
OPENMAYA_EXPORT MPoint operator* ( const MMatrix left,
const MPoint right 
)
friend

NO SCRIPT SUPPORT.

Parameters
[in]leftthe MMatrix to right multiply by
[in]rightthis point instance
Returns
A point representing the product
OPENMAYA_EXPORT std::ostream& operator<< ( std::ostream &  os,
const MPoint p 
)
friend

NO SCRIPT SUPPORT.

The format used is [x, y, z, w].

Parameters
[in]osthe ostream to print to
[in]pthe MPoint whose value is to be printed
Returns
The ostream reference, s, provided as the first parameter.

The documentation for this class was generated from the following files: