class MDynSweptTriangle

Jump to documentation

Class for evaluating surfaces as triangles over time. (OpenMayaFX) (OpenMayaFX.py)

public members:

MDynSweptTriangle ()
~MDynSweptTriangle ()
MVector vertex ( int vertexId, double t = 1.0 )
MVector normal ( double t = 1.0 )
MVector normalToPoint (double x, double y, double z, double t = 1.0)
MVector uvPoint ( int vertexId )
double area ()

Documentation

Class for evaluating surfaces as triangles over time. (OpenMayaFX) (OpenMayaFX.py)
Description

MDynSweptTriangle provides access to surfaces (Nurbs and Polys) defined as triangles. It can only be accessed with the MFnDynSweptGeometryData class that is provided as an output from the geoConnector node.

The class provides parametric time evaluation for a triangle. Time is in the range 0 to 1, where 1 represents the current frame and 0 represents the previous frame. In this way you can get interpolated values of a triangle in motion.

Functions

MDynSweptTriangle:: MDynSweptTriangle ()

Description

The class constructor.

MDynSweptTriangle:: ~MDynSweptTriangle ()

Description

The class destructor.

MVector MDynSweptTriangle:: vertex ( int vertexId, double t )

Description

Return the vertex requested by id, at the parametric time value.

Arguments

  • vertexId index 0, 1, or 2
  • t time value in the range 1.0 to 0.0
  • t=1.0 is the current frame
  • t=0.0 is the previous frame

Return Value

  • the vertex postion

MVector MDynSweptTriangle:: normal ( double t )

Description

Given a parametric time specified by 't', returns the normal of the triangle.

Arguments

  • t time value in the range 1.0 to 0.0
  • t=1.0 is the current frame
  • t=0.0 is the previous frame

Return Value

  • a normalized vector

MVector MDynSweptTriangle:: normalToPoint (double x, double y, double z, double t )

Description

Given a point, returns the normal of the triangle in the direction towards the point. Determines which side of the triangle to return the normal.

Arguments

  • x x component of the point
  • y y component of the point
  • z z component of the point
  • t time value in the range 1.0 to 0.0
  • t=1.0 is the current frame
  • t=0.0 is the previous frame

Return Value

  • a normalized vector

MVector MDynSweptTriangle:: uvPoint ( int vertexId )

Description

Given a vertex id, this method returns the UV point for the vertex as a MVector.

Arguments

  • vertexId Id of the vertex for retrieving the UV point.

Return Value

  • a vector. The u and v values are stored in the first two coordinates. The third coordinate is not meaningful.

double MDynSweptTriangle:: area ()

Description

This method returns the area.

Arguments

Return Value

  • The area, as double value.

This class has no child classes.


Autodesk® Maya® 2008 © 1997-2007 Autodesk, Inc. All rights reserved. doc++ Copyright