#include <MPoint.h>
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.
animInfoCmd.cpp, apiMeshCreator.cpp, apiMeshData.cpp, apiMeshIterator.cpp, apiMeshIterator.h, apiMeshShape.cpp, apiMeshShape.h, apiMeshShapeUI.cpp, apiSimpleShapeIterator.cpp, apiSimpleShapeIterator.h, apiSimpleShapeUI.cpp, blindDataMesh.cpp, cgfxShaderNode.cpp, closestPointCmd.cpp, closestPointOnCurveCmd.cpp, closestPointOnCurveCmd.h, closestPointOnCurveNode.cpp, closestPointOnNurbsSurfaceCmd.cpp, closestTangentUAndDistance.cpp, closestTangentUAndDistance.h, clusterWeightFunction.cpp, componentScaleManip.cpp, curvedArrowsNode.cpp, cvColorNode.cpp, cvPosCmd.cpp, D3DResourceManager.cpp, D3DViewportRenderer.cpp, fluidInfoCmd.cpp, footPrintManip.cpp, footPrintNode.cpp, getPointAndNormal.cpp, getPointAndNormal.h, helix2Cmd.cpp, helixCmd.cpp, helixTool.cpp, hwAnisotropicShader_NV20.cpp, hwPhongShader.h, hwReflectBumpShader_NV20.h, hwToonShader_NV20.cpp, instancerListCmd.cpp, intersectOnNurbsSurfaceCmd.cpp, lassoTool.cpp, latticeNoiseNode.cpp, lineManip.cpp, lineManip.h, lineManipContainer.cpp, lineManipContainer.h, manipulatorMath.cpp, manipulatorMath.h, meshMapUtils.cpp, meshOpFtyAction.cpp, motionTraceCmd.cpp, moveCurveCVsCmd.cpp, moveManip.cpp, moveNumericTool.cpp, moveTool.cpp, narrowPolyViewer.cpp, objExport.cpp, offsetNode.cpp, OpenGLViewportRenderer.cpp, ownerEmitter.cpp, ownerEmitter.h, particleAttrNode.cpp, particleIdHash.h, particlePathsCmd.cpp, particleSystemInfoCmd.cpp, pointOnMeshCmd.cpp, pointOnMeshInfoNode.cpp, pointOnSubdNode.cpp, quadricShape.cpp, rockingTransform.cpp, sampleCmd.cpp, shellNode.cpp, simpleEmitter.cpp, simpleEmitter.h, simpleFluidEmitter.cpp, simpleLoftNode.cpp, simpleSolverNode.cpp, squareScaleManip.cpp, squareScaleManip.h, squareScaleManipContext.cpp, squareScaleManipContext.h, surfaceBumpManip.cpp, surfaceCreate.cpp, surfaceCreateCmd.cpp, surfaceTwist.cpp, surfaceTwistCmd.cpp, sweptEmitter.h, swissArmyManip.cpp, viewCallbackTest.cpp, and yTwistNode.cpp.
Public Member Functions | |
MPoint () | |
MPoint (const MPoint &srcpt) | |
MPoint (const MFloatPoint &srcpt) | |
MPoint (const MVector &src) | |
MPoint (const MFloatVector &src) | |
MPoint (double xx, double yy, double zz=0.0, double ww=1.0) | |
MPoint (const double d[4]) | |
MPoint (const float d[4]) | |
~MPoint () | |
MStatus | get (double[4]) const |
MStatus | get (float[4]) const |
double | operator[] (unsigned int i) const |
double | operator() (unsigned int i) const |
MPoint & | operator= (const MPoint &src) |
MVector | operator- (const MPoint &other) const |
MPoint | operator+ (const MVector &other) const |
MPoint | operator- (const MVector &other) const |
MPoint & | operator+= (const MVector &vector) |
MPoint & | operator-= (const MVector &vector) |
MPoint | operator* (const double scale) const |
MPoint | operator/ (const double scale) const |
MPoint | operator* (const MMatrix &) const |
MPoint & | operator*= (const MMatrix &) |
bool | operator== (const MPoint &other) const |
bool | operator!= (const MPoint &other) const |
MPoint & | cartesianize () |
MPoint & | rationalize () |
MPoint & | homogenize () |
double | distanceTo (const MPoint &other) const |
bool | isEquivalent (const MPoint &other, double tolerance=1.0e-10) const |
double & | operator[] (unsigned int i) |
NO SCRIPT SUPPORT. | |
double & | operator() (unsigned int i) |
NO SCRIPT SUPPORT. | |
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 |
Friends | |
OPENMAYA_EXPORT MPoint | operator* (const MMatrix &, const MPoint &) |
NO SCRIPT SUPPORT. | |
OPENMAYA_EXPORT std::ostream & | operator<< (std::ostream &os, const MPoint &p) |
NO SCRIPT SUPPORT. |
MPoint::MPoint | ( | ) | [inline] |
Default constructor. The instance is initialized to the origin.
MPoint::MPoint | ( | const MPoint & | srcpt | ) | [inline] |
Copy constructor. Creates an new instance and initializes it to the same point as the given point.
[in] | srcpt | The point object to copy from. |
MPoint::MPoint | ( | const MFloatPoint & | srcpt | ) |
Class constructor. Creates an new instance and initializes it to the x, y, z, w values of the given point.
[in] | srcpt | the point object to copy |
MPoint::MPoint | ( | const MVector & | src | ) |
Class constructor. Creates an new instance and initializes it to the x, y, z values of the given vector. The w value is set to 1.0.
[in] | src | the vector object to copy |
MPoint::MPoint | ( | const MFloatVector & | src | ) |
Class constructor. Creates an new instance and initializes it to the x, y, z values of the given vector. The w value is set to 1.0.
[in] | src | the vector object to copy |
MPoint::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.
[in] | xx | The initial value of x. |
[in] | yy | The initial value of y. |
[in] | zz | The initial value of z. |
[in] | ww | The initial value of w. |
MPoint::MPoint | ( | const double | d[4] | ) | [inline] |
Create a new instance and initialize it to the given position.
[in] | d | array of 4 doubles used to initialize x, y, z, and w respectively. |
MPoint::MPoint | ( | const float | d[4] | ) | [inline] |
Create a new instance and initialize it to the given position.
[in] | d | An array of 4 floats used to initialize x, y, z, and w respectively. |
MPoint::~MPoint | ( | ) | [inline] |
Class destructor.
MStatus MPoint::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.
[out] | dest | The four element array of doubles. |
MStatus MPoint::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.
[out] | dest | The four element array of floats. |
double MPoint::operator[] | ( | unsigned int | i | ) | const [inline] |
The index operator.
[in] | i | Value indicating which component to return. |
double MPoint::operator() | ( | unsigned int | i | ) | const [inline] |
The index operator.
[in] | i | Value indicating which component to return. |
The assignment operator.
[in] | src | Point to copy from. |
MPoint MPoint::operator* | ( | const double | scale | ) | const [inline] |
The multipication operator that allows the vector to by scaled by the given double parameter. The x, y, and z components are each multiplied by the parameter. The w component remains unchanged.
[in] | scale | The scale parameter. |
MPoint 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.
[in] | scale | The scale parameter. |
The multiplication operator for computing the product of this point instance with the given matrix.
[in] | right | the MMatrix to right multiply by |
The in-place multiplication operator for computing the product of this point instance with the given matrix.
[in] | right | the MMatrix to right multiply by |
bool MPoint::operator== | ( | const MPoint & | other | ) | const [inline] |
The equality operator.
[in] | other | Point to compare with. |
bool MPoint::operator!= | ( | const MPoint & | other | ) | const [inline] |
The inequality operator.
[in] | other | Point to compare with. |
MPoint & 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.
MPoint & 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.
MPoint & 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 MPoint::distanceTo | ( | const MPoint & | other | ) | const [inline] |
Return the distance between this instance and the point passed as an argument.
[in] | other | The point to compute the distance to. |
bool MPoint::isEquivalent | ( | const MPoint & | other, | |
double | tol = 1.0e-10 | |||
) | const [inline] |
Returns true if this instance of the point passed as an argument represent the same position within the specified tolerance.
[in] | other | The other point to compare to. |
[in] | tol | The tolerance to use during the comparison. |
double & MPoint::operator[] | ( | unsigned int | i | ) | [inline] |
NO SCRIPT SUPPORT.
The index operator.
[in] | i | Value indicating which component to return. |
double & MPoint::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.
[in] | i | Value indicating which component to return. |
NO SCRIPT SUPPORT.
The multiplication operator for computing the product of this point instance with the given matrix that allows the matrix to be on the left side of the operator.
[in] | left | the MMatrix to right multiply by |
[in] | right | this point instance |
OPENMAYA_EXPORT std::ostream& operator<< | ( | std::ostream & | os, | |
const MPoint & | p | |||
) | [friend] |
const MPoint MPoint::origin [static] |
A constant representing the origin - (0,0,0,1).
Autodesk® Maya® 2009 © 1997-2008 Autodesk, Inc. All rights reserved. | Generated with 1.5.6 |