Public Types | Public Member Functions | Public Attributes

FBModelPath3D Class Reference

This reference page is linked to from the following overview topics: MotionBuilder 2014, FBModel - Transformation Data and the Scene Graph.


Search for all occurrences

Detailed Description

Path 3D model class.

Definition at line 63 of file fbmodelpath3d.h.

#include <fbmodelpath3d.h>

Inheritance diagram for FBModelPath3D:
Inheritance graph
[legend]

List of all members.

Public Types

enum  ELengthUnitType {
  eArchitectural = 0, eMI, eCM, eM,
  eKM
}
 

Path Length Unit enum.

More...
enum  EPathEndCapStyle { eNone, eArrow }
 

Path end cap style enum.

More...
typedef FBPropertyBaseEnum
< ELengthUnitType
PropertyUnitType
typedef FBPropertyBaseEnum
< EPathEndCapStyle
PropertyPathEndCapStyle

Public Member Functions

 FBModelPath3D (const char *pName, HIObject pObject=NULL)
 Constructor.
void ShowCurveControls (bool pShow)
 Enable or disable displaying Curve Controls for the 3D model path.
void ShowCurvePoints (bool pShow)
 Enable or disable displaying Curve Points for the 3D model path.
int PathKeyGetCount ()
 Query the number of keys present in the path.
FBVector4d PathKeyGet (int pKeyIndex)
 Get path's key vector for at a particular key index.
void PathKeySet (int pKeyIndex, FBVector4d pTLocal, bool pUpdate=true)
 Set the local coordinate vector values for path at a particular key index.
void PathKeySetLeftRightTangent (int pKeyIndex, FBVector4d pKeyTLocal, FBVector4d pLeftTangentTLocal, FBVector4d pRightTangentTLocal, bool pUpdate=true)
 Set path's vectors for key, left tangent and right tangent at a particular key index.
void PathKeyRemove (int pKeyIndex)
 Remove key at a particular index.
void PathKeyClear ()
 Clear the path keys.
void PathKeySetLeftTangent (int pKeyIndex, FBVector4d pTLocal, bool pUpdate=true)
 Set path's key left tangent vector for designated index.
void PathKeySetRightTangent (int pKeyIndex, FBVector4d pTLocal, bool pUpdate=true)
 Set 3D path's key right tangent vector for designated index.
FBVector4d PathKeyGetLeftTangent (int pKeyIndex)
 Get the path key left tangent's vector value for designated index.
FBVector4d PathKeyGetRightTangent (int pKeyIndex)
 Get the path key right tangent's vector value for designated index.
void PathKeySetXDerivative (int pKeyIndex, double pDerivative, bool pUpdate)
 Set derivative in X coordinate for a path tangent.
void PathKeySetYDerivative (int pKeyIndex, double pDerivative, bool pUpdate)
 Set derivative in Y coordinate for a path tangent.
void PathKeySetZDerivative (int pKeyIndex, double pDerivative, bool pUpdate)
 Set derivative in Z coordinate for a path tangent.
void PathKeySetXYZDerivative (int pKeyIndex, FBVector4d pDerivative, bool pUpdate)
 Set derivative in XYZ coordinates for a path tangent.
FBVector4d PathKeyGetXYZDerivative (int pKeyIndex)
 Get vector in XYZ coordinates for a path tangent.
double PathKeyGetLeftTangentLength (int pKeyIndex)
 Query the length of the left tangent.
double PathKeyGetRightTangentLength (int pKeyIndex)
 Query the value of the right tangent.
int GetSelectedPathKeyCount ()
 Query the number of keys present in the selected path.
void PathKeyRemoveSelected ()
 Remove the selected keys from the path.
int InsertNewStartKey ()
 Insert a new key at the start of the path.
int InsertNewEndKey ()
 Insert a new key at the end of the path.
int PathKeyStartAdd (FBVector4d pTLocal)
 Adds a new key to the start of the path (with time gap of 1 sec).
int PathKeyEndAdd (FBVector4d pTLocal)
 Adds a new key to the end of the path (with time gap of 1 sec).
int Total_PathKeyAdd (double pTotalPercent, FBVector4d pTLocal)
 Adds a new key either at the start, end or along the path as per specified.
int Total_IsPathKey (double pTotalPercent)
 Query whether a percentage value has a key associated at that point in the path.
FBVector4d Total_GlobalPathEvaluate (double pTotalPercent)
 Get the path's vector at a particular point within the curve, in global coordinates.
FBVector4d Total_LocalPathEvaluate (double pTotalPercent)
 Get the path's vector at a particular point within the curve, in local coordinates.
FBVector4d Total_GlobalPathEvaluateDerivative (double pTotalPercent)
 Get the path's derivative at a particular point within the curve, in global coordinates.
FBVector4d Total_LocalPathEvaluateDerivative (double pTotalPercent)
 Get the path's derivative at a particular point within the curve, in local coordinates.
int Segment_PathKeyAdd (double pSegmentPercent, FBVector4d pTLocal)
 Adds a new key either at the start, end or along the path as per specified.
int Segment_IsPathKey (double pSegmentPercent)
 Query whether a percentage value has a key associated at that point in the path.
FBVector4d Segment_GlobalPathEvaluate (double pSegmentPercent)
 Get the path's vector at a particular point within the curve, in global coordinates.
FBVector4d Segment_LocalPathEvaluate (double pSegmentPercent)
 Get the path's vector at a particular point within the curve, in local coordinates.
FBVector4d Segment_GlobalPathEvaluateDerivative (double pSegmentPercent)
 Get the path's derivative at a particular point within the curve, in global coordinates.
FBVector4d Segment_LocalPathEvaluateDerivative (double pSegmentPercent)
 Get the path's derivative at a particular point within the curve, in local coordinates.
double ConvertTotalPercentToSegmentPercent (double pPercent)
 Converting one key type Total (percent) to Segment (time).
double ConvertSegmentPercentToTotalPercent (double pPercent)
 Converting one key type Segment (time) to Total (percent).
double ConvertToSegmentPercentFactor ()
 Get factor for multiplying the derivative of a key for segment mode.
double ConvertToTotalPercentFactor ()
 Get factor for multiplying the derivative of a key for total mode.
void UpdateGeometry ()
 Update path geometry explicitly.

Public Attributes

FBPropertyDouble PathLength
 Read Only Property: Path Length In Centimeter.
FBPropertyString PathLengthInString
 Read Only Property: Path Length Display String According To The Current Unit.
PropertyUnitType PathLengthUnit
 Read Write Property: Path Length Unit.
FBPropertyBool PathLengthShow
 Read Write Property: Path length label display or not.
FBPropertyDouble TextScale
 Read Write Property: Path Length label display scale.
FBPropertyColorAndAlpha TextBackground
 Read Write Property: Path Length label display background color.
PropertyPathEndCapStyle PathEndCapStyle
 Read Write Property: Path end cap display style.
FBPropertyDouble PathEndCapScale
 Read Write Property: Path end cap display scale.
FBPropertyAnimatableColor Color
 Read Write Property: Path display color in viewport.

Member Typedef Documentation

Definition at line 101 of file fbmodelpath3d.h.

Definition at line 110 of file fbmodelpath3d.h.


Member Enumeration Documentation

Path end cap style enum.

Enumerator:
eNone 
eArrow 

Definition at line 104 of file fbmodelpath3d.h.

    {
        eNone, 
        eArrow
    };

Constructor & Destructor Documentation

FBModelPath3D ( const char *  pName,
HIObject  pObject = NULL 
)

Constructor.

Parameters:
pNameName of Path 3D.
pObjectFor internal use only(default=NULL).

Python sample code:

        Script Sample.
        from pyfbsdk import *

        path = FBModelPath3D("Test")
        path.Show = True
        der = path.Total_LocalPathEvaluateDerivative(1)
        path.PathKeySetLeftTangeant(1,FBVector4d(25,25,25,25),True)
        ## Add keys at start and end
        path.PathKeyStartAdd(FBVector4d(0,0,100,0))
        path.PathKeyEndAdd(FBVector4d(100,0,0,0))
        ## Add keys within the path
        path.Segment_PathKeyAdd(75.0,FBVector4d(25,25,25,25))
        path.Segment_PathKeyAdd(25.0,FBVector4d(25,0,25,25))

Member Function Documentation

void ShowCurveControls ( bool  pShow)

Enable or disable displaying Curve Controls for the 3D model path.

Parameters:
pShowtrue if curve controls are to be displayed false if not required
void ShowCurvePoints ( bool  pShow)

Enable or disable displaying Curve Points for the 3D model path.

Parameters:
pShowtrue if curve points are to be displayed false if not required
int PathKeyGetCount ( )

Query the number of keys present in the path.

Returns:
Number of keys present in the path
FBVector4d PathKeyGet ( int  pKeyIndex)

Get path's key vector for at a particular key index.

Parameters:
pKeyIndexKey ID to set with
Returns:
Return the vector containing the value of the path key.
void PathKeySet ( int  pKeyIndex,
FBVector4d  pTLocal,
bool  pUpdate = true 
)

Set the local coordinate vector values for path at a particular key index.

Parameters:
pKeyIndexKey ID to set with
pTLocalVector to use to set values to Key
pUpdatetrue if geometry update is required, false if not required (default=true)
void PathKeySetLeftRightTangent ( int  pKeyIndex,
FBVector4d  pKeyTLocal,
FBVector4d  pLeftTangentTLocal,
FBVector4d  pRightTangentTLocal,
bool  pUpdate = true 
)

Set path's vectors for key, left tangent and right tangent at a particular key index.

Parameters:
pKeyIndexKey ID to set key for left and right tangents
pKeyTLocalVector to use to set values to Key
pLeftTangentTLocalVector to use to set values to Key Left Tangent
pRightTangentTLocalVector to use to set values to Key Right Tangent
pUpdatetrue if geometry update is required, false if not required (default=true)
void PathKeyRemove ( int  pKeyIndex)

Remove key at a particular index.

Parameters:
pKeyIndexKey ID at which key is to be removed.
void PathKeyClear ( )

Clear the path keys.

void PathKeySetLeftTangent ( int  pKeyIndex,
FBVector4d  pTLocal,
bool  pUpdate = true 
)

Set path's key left tangent vector for designated index.

Parameters:
pKeyIndexKey ID at which left tangent is to be set
pTLocalVector to use to set values to Key
pUpdatetrue if geometry update is required, false if not required (default=true)
void PathKeySetRightTangent ( int  pKeyIndex,
FBVector4d  pTLocal,
bool  pUpdate = true 
)

Set 3D path's key right tangent vector for designated index.

Parameters:
pKeyIndexKey ID at which right tangent is to be set
pTLocalVector to use to set values to Key
pUpdatetrue if geometry update is required, false if not required (default=true)
FBVector4d PathKeyGetLeftTangent ( int  pKeyIndex)

Get the path key left tangent's vector value for designated index.

Parameters:
pKeyIndexKey ID at which left tangent value is required
Returns:
Vector containing value of left tangent
FBVector4d PathKeyGetRightTangent ( int  pKeyIndex)

Get the path key right tangent's vector value for designated index.

Parameters:
pKeyIndexKey ID to set with
Returns:
Vector containing value of left tangent
void PathKeySetXDerivative ( int  pKeyIndex,
double  pDerivative,
bool  pUpdate 
)

Set derivative in X coordinate for a path tangent.

This works only if key interpolation type is CUBIC and tangent mode is User, Break or Auto.

Parameters:
pKeyIndexKey ID to set with
pDerivativeValue of the derivative to apply to tangent
pUpdatetrue if geometry update is required, false if not required (default=true)
void PathKeySetYDerivative ( int  pKeyIndex,
double  pDerivative,
bool  pUpdate 
)

Set derivative in Y coordinate for a path tangent.

This works only if key interpolation type is CUBIC and tangent mode is User, Break or Auto.

Parameters:
pKeyIndexKey ID to set with
pDerivativeValue of the derivative to apply to tangent
pUpdatetrue if geometry update is required, false if not required (default=true)
void PathKeySetZDerivative ( int  pKeyIndex,
double  pDerivative,
bool  pUpdate 
)

Set derivative in Z coordinate for a path tangent.

This works only if key interpolation type is CUBIC and tangent mode is User, Break or Auto.

Parameters:
pKeyIndexKey ID to set with
pDerivativeValue of the derivative to apply to tangent
pUpdatetrue if geometry update is required, false if not required (default=true)
void PathKeySetXYZDerivative ( int  pKeyIndex,
FBVector4d  pDerivative,
bool  pUpdate 
)

Set derivative in XYZ coordinates for a path tangent.

This works only if key interpolation type is CUBIC and tangent mode is User, Break or Auto.

Parameters:
pKeyIndexKey ID to set with
pDerivativeValue of the derivative to apply to tangent
pUpdatetrue if geometry update is required, false if not required (default=true)
FBVector4d PathKeyGetXYZDerivative ( int  pKeyIndex)

Get vector in XYZ coordinates for a path tangent.

This works only if key interpolation type is CUBIC and tangent mode is User, Break or Auto.

Parameters:
pKeyIndexKey ID to set with
Returns:
Vector with value for path's tangent XYZ derivatives
double PathKeyGetLeftTangentLength ( int  pKeyIndex)

Query the length of the left tangent.

Parameters:
pKeyIndexKey ID to set with
Returns:
Double value of the length of left tangent
double PathKeyGetRightTangentLength ( int  pKeyIndex)

Query the value of the right tangent.

Parameters:
pKeyIndexKey ID to set with
Returns:
Double value of the length of right tangent
int GetSelectedPathKeyCount ( )

Query the number of keys present in the selected path.

Returns:
Returns the number of keys in the selected path
void PathKeyRemoveSelected ( )

Remove the selected keys from the path.

int InsertNewStartKey ( )

Insert a new key at the start of the path.

Returns:
Returns 0 since the new key becomes the first key. If path is invalid, returns 0.
int InsertNewEndKey ( )

Insert a new key at the end of the path.

Returns:
Returns (N) where (N+1) is the new total number of keys, and since the new key becomes the Nth key (index starts from 0). If path is invalid, returns 0.
int PathKeyStartAdd ( FBVector4d  pTLocal)

Adds a new key to the start of the path (with time gap of 1 sec).

The derivative value for the new key is copied from the right tangent of the first key.

Parameters:
pTLocalVector value for the new added Key
Returns:
Returns 0 since the new key becomes the first key. If path is invalid, returns 0.
int PathKeyEndAdd ( FBVector4d  pTLocal)

Adds a new key to the end of the path (with time gap of 1 sec).

The derivative value for the new key is copied from the left tangent of the last key.

Parameters:
pTLocalVector value for the new added Key
Returns:
Returns (N) where (N+1) is the new total number of keys, and since the new key becomes the Nth key (index starts from 0). If path is invalid, returns 0.
int Total_PathKeyAdd ( double  pTotalPercent,
FBVector4d  pTLocal 
)

Adds a new key either at the start, end or along the path as per specified.

Parameters:
pTotalPercentDouble value indicating where the key is to be added. If < 0, key added before start of the path, if > 0, key added at end of path, otherwise it is added somewhere along the path depending on value specified
pTLocalVector to use to set values to Key
Returns:
Index as integer for the path key added
int Total_IsPathKey ( double  pTotalPercent)

Query whether a percentage value has a key associated at that point in the path.

Parameters:
pTotalPercentDouble value (as percentage) at which the path would be queried for existence of key
Returns:
A valid key index in integer if key is present, otherwise -1
FBVector4d Total_GlobalPathEvaluate ( double  pTotalPercent)

Get the path's vector at a particular point within the curve, in global coordinates.

Parameters:
pTotalPercentDouble value (as percentage) at which the path vector would be computed
Returns:
Vector value at the required point in the path
FBVector4d Total_LocalPathEvaluate ( double  pTotalPercent)

Get the path's vector at a particular point within the curve, in local coordinates.

Parameters:
pTotalPercentDouble value (as percentage) at which the path vector would be computed
Returns:
Vector value at the required point in the path
FBVector4d Total_GlobalPathEvaluateDerivative ( double  pTotalPercent)

Get the path's derivative at a particular point within the curve, in global coordinates.

Parameters:
pTotalPercentDouble value (as percentage) at which the path derivative would be computed
Returns:
Derivative value at the required point in the path
FBVector4d Total_LocalPathEvaluateDerivative ( double  pTotalPercent)

Get the path's derivative at a particular point within the curve, in local coordinates.

Parameters:
pTotalPercentDouble value (as percentage) at which the path derivative would be computed
Returns:
Derivative value at the required point in the path
int Segment_PathKeyAdd ( double  pSegmentPercent,
FBVector4d  pTLocal 
)

Adds a new key either at the start, end or along the path as per specified.

Parameters:
pSegmentPercentDouble value indicating where the key is to be added. If < 0, key added before start of the path, if > 0, key added at end of path, otherwise it is added somewhere along the path depending on value specified
pTLocalVector to use to set values to Key
Returns:
Vector value at the required point in the path
int Segment_IsPathKey ( double  pSegmentPercent)

Query whether a percentage value has a key associated at that point in the path.

Parameters:
pSegmentPercentDouble value (as time) at which the path would be queried for existence of key
Returns:
A valid key index in integer if key is present, otherwise -1
FBVector4d Segment_GlobalPathEvaluate ( double  pSegmentPercent)

Get the path's vector at a particular point within the curve, in global coordinates.

Parameters:
pSegmentPercentDouble value (as time) at which the path vector would be computed
Returns:
Vector value at the required point in the path
FBVector4d Segment_LocalPathEvaluate ( double  pSegmentPercent)

Get the path's vector at a particular point within the curve, in local coordinates.

Parameters:
pSegmentPercentDouble value (as time) at which the path vector would be computed
Returns:
Vector value at the required point in the path
FBVector4d Segment_GlobalPathEvaluateDerivative ( double  pSegmentPercent)

Get the path's derivative at a particular point within the curve, in global coordinates.

Parameters:
pSegmentPercentDouble value (as time) at which the path derivative would be computed
Returns:
Vector value at the required point in the path
FBVector4d Segment_LocalPathEvaluateDerivative ( double  pSegmentPercent)

Get the path's derivative at a particular point within the curve, in local coordinates.

Parameters:
pSegmentPercentDouble value (as time) at which the path derivative would be computed
Returns:
Vector value at the required point in the path
double ConvertTotalPercentToSegmentPercent ( double  pPercent)

Converting one key type Total (percent) to Segment (time).

Parameters:
pPercentDouble value (as percentage)
Returns:
Double value which represents the corresponding time.
double ConvertSegmentPercentToTotalPercent ( double  pPercent)

Converting one key type Segment (time) to Total (percent).

Parameters:
pPercentDouble value (as time)
Returns:
Double value which represents the corresponding percentage
double ConvertToSegmentPercentFactor ( )

Get factor for multiplying the derivative of a key for segment mode.

Returns:
Returns the derivative multiplication factor
double ConvertToTotalPercentFactor ( )

Get factor for multiplying the derivative of a key for total mode.

Returns:
Returns the time factor
void UpdateGeometry ( )

Update path geometry explicitly.


Member Data Documentation

Read Only Property: Path Length In Centimeter.

Definition at line 112 of file fbmodelpath3d.h.

Read Only Property: Path Length Display String According To The Current Unit.

Definition at line 113 of file fbmodelpath3d.h.

Read Write Property: Path Length Unit.

Definition at line 114 of file fbmodelpath3d.h.

Read Write Property: Path length label display or not.

Definition at line 115 of file fbmodelpath3d.h.

Read Write Property: Path Length label display scale.

Definition at line 116 of file fbmodelpath3d.h.

Read Write Property: Path Length label display background color.

Definition at line 117 of file fbmodelpath3d.h.

Read Write Property: Path end cap display style.

Definition at line 118 of file fbmodelpath3d.h.

Read Write Property: Path end cap display scale.

Definition at line 119 of file fbmodelpath3d.h.

Read Write Property: Path display color in viewport.

Definition at line 120 of file fbmodelpath3d.h.


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

FBModelPath3D FBModelPath3D FBModelPath3D FBModelPath3D FBModelPath3D FBModelPath3D FBModelPath3D FBModelPath3D FBModelPath3D FBModelPath3D
FBModelPath3D FBModelPath3D FBModelPath3D FBModelPath3D FBModelPath3D FBModelPath3D FBModelPath3D FBModelPath3D FBModelPath3D FBModelPath3D