FBModelPath3D Class Reference


Detailed Description

Path 3D model class.

Inheritance diagram for FBModelPath3D:
Inheritance graph
[legend]

List of all members.

Public Member Functions

  __init__ (str pName, object pObject=None)
  Constructor.
  ShowCurveControls (bool pShow)
  Enable or disable displaying Curve Controls for the 3D model path.
  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.
FBVector4  PathKeyGet (int pKeyIndex)
  Get path's key vector for at a particular key index.
  PathKeySet (int pKeyIndex, FBVector4 pTLocal, bool pUpdate=True)
  Set the local coordinate vector values for path at a particular key index.
  PathSetKeyLeftRightTangeant (int pKeyIndex, FBVector4 pKeyTLocal, FBVector4 pLeftTangentTLocal, FBVector4 pRightTangentTLocal, bool pUpdate=True)
  PathKeySetLeftRightTangent (int pKeyIndex, FBVector4 pKeyTLocal, FBVector4 pLeftTangentTLocal, FBVector4 pRightTangentTLocal, bool pUpdate=True)
  Set path's vectors for key, left tangent and right tangent at a particular key index.
  PathKeyRemove (int pKeyIndex)
  Remove key at a particular index.
  PathKeyClear ()
  Clear the path keys.
  PathKeySetLeftTangeant (int pKeyIndex, FBVector4 pTLocal, bool pUpdate=True)
  PathKeySetLeftTangent (int pKeyIndex, FBVector4 pTLocal, bool pUpdate=True)
  Set path's key left tangent vector for designated index.
  PathKeySetRightTangeant (int pKeyIndex, FBVector4 pTLocal, bool pUpdate=True)
  PathKeySetRightTangent (int pKeyIndex, FBVector4 pTLocal, bool pUpdate=True)
  Set 3D path's key right tangent vector for designated index.
FBVector4  PathKeyGetLeftTangeant (int pKeyIndex)
FBVector4  PathKeyGetLeftTangent (int pKeyIndex)
  Get the path key left tangent's vector value for designated index.
FBVector4  PathKeyGetRightTangeant (int pKeyIndex)
FBVector4  PathKeyGetRightTangent (int pKeyIndex)
  Get the path key right tangent's vector value for designated index.
  PathKeySetXDerivative (int pKeyIndex, float pDerivative, bool pUpdate)
  Set derivative in X coordinate for a path tangent.
  PathKeySetYDerivative (int pKeyIndex, float pDerivative, bool pUpdate)
  Set derivative in Y coordinate for a path tangent.
  PathKeySetZDerivative (int pKeyIndex, float pDerivative, bool pUpdate)
  Set derivative in Z coordinate for a path tangent.
  PathKeySetXYZDerivative (int pKeyIndex, FBVector4 pDerivative, bool pUpdate)
  Set derivative in XYZ coordinates for a path tangent.
FBVector4  PathKeyGetXYZDerivative (int pKeyIndex)
  Get vector in XYZ coordinates for a path tangent.
float  PatKeyGetLeftTangeantLength (int pKeyIndex)
float  PathKeyGetLeftTangentLength (int pKeyIndex)
  Query the length of the left tangent.
float  PatKeyGetRightTangeantLength (int pKeyIndex)
float  PathKeyGetRightTangentLength (int pKeyIndex)
  Query the value of the right tangent.
int  GetSelectedPathKeyCount ()
  Query the number of keys present in the selected path.
  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 (FBVector4 pTLocal)
  Adds a new key to the start of the path (with time gap of 1 sec).
int  PathKeyEndAdd (FBVector4 pTLocal)
  Adds a new key to the end of the path (with time gap of 1 sec).
int  Total_PathKeyAdd (float pTotalPercent, FBVector4 pTLocal)
  Adds a new key either at the start, end or along the path as per specified.
int  Total_IsPathKey (float pTotalPercent)
  Query whether a percentage value has a key associated at that point in the path.
FBVector4  Total_GlobalPathEvaluate (float pTotalPercent)
  Get the path's vector at a particular point within the curve, in global coordinates.
FBVector4  Total_LocalPathEvaluate (float pTotalPercent)
  Get the path's vector at a particular point within the curve, in local coordinates.
FBVector4  Total_GlobalPathEvaluateDerivative (float pTotalPercent)
  Get the path's derivative at a particular point within the curve, in global coordinates.
FBVector4  Total_LocalPathEvaluateDerivative (float pTotalPercent)
  Get the path's derivative at a particular point within the curve, in local coordinates.
int  Segment_PathKeyAdd (float pSegmentPercent, FBVector4 pTLocal)
  Adds a new key either at the start, end or along the path as per specified.
int  Segment_IsPathKey (float pSegmentPercent)
  Query whether a percentage value has a key associated at that point in the path.
FBVector4  Segment_GlobalPathEvaluate (float pSegmentPercent)
  Get the path's vector at a particular point within the curve, in global coordinates.
FBVector4  Segment_LocalPathEvaluate (float pSegmentPercent)
  Get the path's vector at a particular point within the curve, in local coordinates.
FBVector4  Segment_GlobalPathEvaluateDerivative (float pSegmentPercent)
  Get the path's derivative at a particular point within the curve, in global coordinates.
FBVector4  Segment_LocalPathEvaluateDerivative (float pSegmentPercent)
  Get the path's derivative at a particular point within the curve, in local coordinates.
float  ConvertTotalPercentToSegmentPercent (float pPercent)
  Converting one key type Total (percent) to Segment (time).
float  ConvertSegmentPercentToTotalPercent (float pPercent)
  Converting one key type Segment (time) to Total (percent).
float  ConvertToSegmentPercentFactor ()
  Get factor for multiplying the derivative of a key for segment mode.
float  ConvertToTotalPercentFactor ()
  Get factor for multiplying the derivative of a key for total mode.
  UpdateGeometry ()
  Update path geometry explicitly.

Public Attributes

FBPropertyBaseAnimatable  Color

Member Function Documentation

__init__ ( str  pName,
object  pObject = None 
)

Constructor.

Parameters:
pName Name of Path 3D.
pObject For 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))

Reimplemented from FBModel.

ShowCurveControls ( bool  pShow )

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

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

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

Parameters:
pShow true 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
FBVector4 PathKeyGet ( int  pKeyIndex )

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

Parameters:
pKeyIndex Key ID to set with
Returns:
Return the vector containing the value of the path key.
PathKeySet ( int  pKeyIndex,
FBVector4  pTLocal,
bool  pUpdate = True 
)

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

Parameters:
pKeyIndex Key ID to set with
pTLocal Vector to use to set values to Key
pUpdate true if geometry update is required, false if not required (default=true)
PathSetKeyLeftRightTangeant ( int  pKeyIndex,
FBVector4  pKeyTLocal,
FBVector4  pLeftTangentTLocal,
FBVector4  pRightTangentTLocal,
bool  pUpdate = True 
)
Deprecated:
Use FBModelPath3D.PathKeySetLeftRightTangent() instead.

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

Parameters:
pKeyIndex Key ID to set key for left and right tangents
pKeyTLocal Vector to use to set values to Key
pLeftTangentTLocal Vector to use to set values to Key Left Tangent
pRightTangentTLocal Vector to use to set values to Key Right Tangent
pUpdate true if geometry update is required, false if not required (default=true)
PathKeySetLeftRightTangent ( int  pKeyIndex,
FBVector4  pKeyTLocal,
FBVector4  pLeftTangentTLocal,
FBVector4  pRightTangentTLocal,
bool  pUpdate = True 
)

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

Parameters:
pKeyIndex Key ID to set key for left and right tangents
pKeyTLocal Vector to use to set values to Key
pLeftTangentTLocal Vector to use to set values to Key Left Tangent
pRightTangentTLocal Vector to use to set values to Key Right Tangent
pUpdate true if geometry update is required, false if not required (default=true)
PathKeyRemove ( int  pKeyIndex )

Remove key at a particular index.

Parameters:
pKeyIndex Key ID at which key is to be removed.
PathKeyClear ( )

Clear the path keys.

PathKeySetLeftTangeant ( int  pKeyIndex,
FBVector4  pTLocal,
bool  pUpdate = True 
)
Deprecated:
Use FBModelPath3D.PathKeySetLeftTangent() instead.

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

Parameters:
pKeyIndex Key ID at which left tangent is to be set
pKeyTLocal Vector to use to set values to Key
pUpdate true if geometry update is required, false if not required (default=true)
PathKeySetLeftTangent ( int  pKeyIndex,
FBVector4  pTLocal,
bool  pUpdate = True 
)

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

Parameters:
pKeyIndex Key ID at which left tangent is to be set
pKeyTLocal Vector to use to set values to Key
pUpdate true if geometry update is required, false if not required (default=true)
PathKeySetRightTangeant ( int  pKeyIndex,
FBVector4  pTLocal,
bool  pUpdate = True 
)
Deprecated:
Use FBModelPath3D.PathKeySetRightTangent() instead.

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

Parameters:
pKeyIndex Key ID at which right tangent is to be set
pKeyTLocal Vector to use to set values to Key
pUpdate true if geometry update is required, false if not required (default=true)
PathKeySetRightTangent ( int  pKeyIndex,
FBVector4  pTLocal,
bool  pUpdate = True 
)

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

Parameters:
pKeyIndex Key ID at which right tangent is to be set
pKeyTLocal Vector to use to set values to Key
pUpdate true if geometry update is required, false if not required (default=true)
FBVector4 PathKeyGetLeftTangeant ( int  pKeyIndex )
Deprecated:
Use FBModelPath3D.PathKeyGetLeftTangent() instead.

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

Parameters:
pKeyIndex Key ID at which left tangent value is required
Returns:
Vector containing value of left tangent
FBVector4 PathKeyGetLeftTangent ( int  pKeyIndex )

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

Parameters:
pKeyIndex Key ID at which left tangent value is required
Returns:
Vector containing value of left tangent
FBVector4 PathKeyGetRightTangeant ( int  pKeyIndex )
Deprecated:
Use FBModelPath3D.PathKeyGetRightTangent() instead.

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

Parameters:
pKeyIndex Key ID to set with
Returns:
Vector containing value of left tangent
FBVector4 PathKeyGetRightTangent ( int  pKeyIndex )

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

Parameters:
pKeyIndex Key ID to set with
Returns:
Vector containing value of left tangent
PathKeySetXDerivative ( int  pKeyIndex,
float  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:
pKeyIndex Key ID to set with
pDerivative Value of the derivative to apply to tangent
pUpdate true if geometry update is required, false if not required (default=true)
PathKeySetYDerivative ( int  pKeyIndex,
float  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:
pKeyIndex Key ID to set with
pDerivative Value of the derivative to apply to tangent
pUpdate true if geometry update is required, false if not required (default=true)
PathKeySetZDerivative ( int  pKeyIndex,
float  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:
pKeyIndex Key ID to set with
pDerivative Value of the derivative to apply to tangent
pUpdate true if geometry update is required, false if not required (default=true)
PathKeySetXYZDerivative ( int  pKeyIndex,
FBVector4  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:
pKeyIndex Key ID to set with
pDerivative Value of the derivative to apply to tangent
pUpdate true if geometry update is required, false if not required (default=true)
FBVector4 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:
pKeyIndex Key ID to set with
Returns:
Vector with value for path's tangent XYZ derivatives
float PatKeyGetLeftTangeantLength ( int  pKeyIndex )
Deprecated:
Use FBModelPath3D.PathKeyGetLeftTangentLength() instead.

Query the length of the left tangent.

Parameters:
pKeyIndex Key ID to set with
Returns:
Double value of the length of left tangent
float PathKeyGetLeftTangentLength ( int  pKeyIndex )

Query the length of the left tangent.

Parameters:
pKeyIndex Key ID to set with
Returns:
Double value of the length of left tangent
float PatKeyGetRightTangeantLength ( int  pKeyIndex )
Deprecated:
Use FBModelPath3D.PathKeyGetRightTangentLength() instead.

Query the value of the right tangent.

Parameters:
pKeyIndex Key ID to set with
Returns:
Double value of the length of right tangent
float PathKeyGetRightTangentLength ( int  pKeyIndex )

Query the value of the right tangent.

Parameters:
pKeyIndex Key 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
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 ( FBVector4  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:
pTLocal Vector 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 ( FBVector4  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:
pTLocal Vector 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 ( float  pTotalPercent,
FBVector4  pTLocal 
)

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

Parameters:
pTotalPercent Double 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
pTLocal Vector to use to set values to Key
Returns:
Index as integer for the path key added
int Total_IsPathKey ( float  pTotalPercent )

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

Parameters:
pTotalPercent Double 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
FBVector4 Total_GlobalPathEvaluate ( float  pTotalPercent )

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

Parameters:
pTotalPercent Double value (as percentage) at which the path vector would be computed
Returns:
Vector value at the required point in the path
FBVector4 Total_LocalPathEvaluate ( float  pTotalPercent )

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

Parameters:
pTotalPercent Double value (as percentage) at which the path vector would be computed
Returns:
Vector value at the required point in the path
FBVector4 Total_GlobalPathEvaluateDerivative ( float  pTotalPercent )

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

Parameters:
pTotalPercent Double value (as percentage) at which the path derivative would be computed
Returns:
Derivative value at the required point in the path
FBVector4 Total_LocalPathEvaluateDerivative ( float  pTotalPercent )

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

Parameters:
pTotalPercent Double value (as percentage) at which the path derivative would be computed
Returns:
Derivative value at the required point in the path
int Segment_PathKeyAdd ( float  pSegmentPercent,
FBVector4  pTLocal 
)

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

Parameters:
pTotalPercent Double 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
pTLocal Vector to use to set values to Key
Returns:
Vector value at the required point in the path
int Segment_IsPathKey ( float  pSegmentPercent )

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

Parameters:
pTotalPercent Double 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
FBVector4 Segment_GlobalPathEvaluate ( float  pSegmentPercent )

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

Parameters:
pTotalPercent Double value (as time) at which the path vector would be computed
Returns:
Vector value at the required point in the path
FBVector4 Segment_LocalPathEvaluate ( float  pSegmentPercent )

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

Parameters:
pTotalPercent Double value (as time) at which the path vector would be computed
Returns:
Vector value at the required point in the path
FBVector4 Segment_GlobalPathEvaluateDerivative ( float  pSegmentPercent )

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

Parameters:
pTotalPercent Double value (as time) at which the path derivative would be computed
Returns:
Vector value at the required point in the path
FBVector4 Segment_LocalPathEvaluateDerivative ( float  pSegmentPercent )

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

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

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

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

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

Parameters:
pPercent Double value (as time)
Returns:
Double value which represents the corresponding percentage
float ConvertToSegmentPercentFactor ( )

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

Returns:
Returns the derivative multiplication factor
float ConvertToTotalPercentFactor ( )

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

Returns:
Returns the time factor
UpdateGeometry ( )

Update path geometry explicitly.


Member Data Documentation

FBPropertyBaseAnimatable Color

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