Public Member Functions | Public Attributes

FBModel Class Reference

This reference page is linked to from the following overview topics: Your First Python Program, Naming Conventions, Data types & properties, FBComponent - The Base Entity Class, FBProperty - Object Properties, FBPlug - Object Connection Management, Scene Elements, FBModel - Transformation Data and the Scene Graph, FBLight - Lights, FBCamera - Cameras, FBGeometry - Meshes and Surfaces, FBCharacter - Characters, Animation, Model templates.


Search for all occurrences

Detailed Description

Model class.

In the MotionBuilder UI, a model can be any object in a scene, created using geometry. Models can represent simple objects like cubes, or complex objects like characters.

FBModel is a base class which is not used so much directly, but is the parent of well-used classes like FBCamera, FBLight, and FBModelMarker.

It also implements a number of widely-implemented functions and attributes, such as:

There is a few ways to get a handle on existing models in a scene:

Definition at line 307 of file fbmodel.h.

#include <fbmodel.h>

Inheritance diagram for FBModel:
Inheritance graph
[legend]

List of all members.

Public Member Functions

  FBModel (char *pName, HIObject pObject=NULL)
  Constructor.
virtual void  FBDelete ()
  Open Reality deletion function.
  IQuery_Declare (Implementation)
  ICallback_Declare (Implementation)
virtual HFBModel  Clone ()
  Clone the model.
void  SetMatrix (FBMatrix pMatrix, int pWhat=kModelTransformation, bool pGlobalInfo=true, bool pPushUndo=false, HFBEvaluateInfo pEvaluateInfo=NULL)
  Set a matrix for the model.
void  GetMatrix (FBMatrix &pMatrix, int pWhat=kModelTransformation, bool pGlobalInfo=true, HFBEvaluateInfo pEvaluateInfo=NULL)
  Get a matrix from the model.
void  SetVector (FBVector3d pVector, int pWhat=kModelTranslation, bool pGlobalInfo=true, bool pPushUndo=false, HFBEvaluateInfo pEvaluateInfo=NULL)
  Set a vector for the model.
void  GetVector (FBVector3d &pVector, int pWhat=kModelTranslation, bool pGlobalInfo=true, HFBEvaluateInfo pEvaluateInfo=NULL)
  Get a vector from the model.
void  SetSchematicPosition (int pX, int pY)
  Set the position in the schematic view for the model.
void  SetSchematicPosition (FBVector2d pVector2d)
  Set the position in the schematic view for the model.
FBVector2d  GetSchematicPosition ()
  Get the position in the schematic view for the model.
void  GetBoundingBox (FBVector3d &pMin, FBVector3d &pMax)
  Get the bounding box of the model.
int  NoFrustumCullingRequire ()
  Acquire no frustum culling request.
int  NoFrustumCullingRelease ()
  Release no frustum culling request.
bool  UseFrustumCulling ()
  Get the current Frustum Culling Status.
virtual bool  HasCustomDisplay ()
  Function to overload to handle custom display.
virtual void  CustomModelDisplay (FBCamera *pCamera, FBModelShadingMode pShadingMode, FBModelRenderPass pRenderPass, float pPickingAreaWidth, float pPickingAreaHeight)
  Custom display function called when HasCustomDisplay returns true;.
virtual bool  CustomModelPicking (int pNbHits, unsigned int *pSelectBuffer, FBCamera *pCamera, int pMouseX, int pMouseY, FBTVector *pLocalRaySrc, FBTVector *pLocalRayDir, FBTVector *pWorldRaySrc, FBTVector *pWorldRayDir, FBMatrix *pGlobalInverseMatrix, FBTVector *pOutPickedPoint)
  Custom picking for selection.
unsigned char *  GetSelectedPoints ()
  Get the list of the points selection state.
int  GetSelectedPointsCount ()
  Get the number of selected points in the model.
virtual bool  FbxStore (HFBFbxObject pFbxObject, kFbxObjectStore pStoreWhat)
  Store and Retrieve function that can be overloaded.
virtual bool  FbxRetrieve (HFBFbxObject pFbxObject, kFbxObjectStore pStoreWhat)
void  SetupPropertiesForShapes ()
  Setup Shape Properties.
virtual char *  FbxGetObjectType ()
  Returns the class type inherited by the class of an object, for example: 'Model'.
virtual char *  FbxGetObjectSubType ()
  Returns the class sub type inherited by the class of an object, for example: 'Default', 'Mesh'.

Public Attributes

FBPropertyListModel  Children
  List: Children for model.
FBPropertyListShader  Shaders
  List: Shaders for model.
FBPropertyListMaterial  Materials
  List: Materials for model.
FBPropertyListTexture  Textures
  List: Textures with Special UseType (Other than "Color" which should connect to materials).
FBPropertyListDeformer  Deformers
  List: Deformers (Skeleton Deformer or Point Cache Deformer).
FBPropertyBool  Icon3D
  Read Write Property: Is model a 3D icon?
FBPropertyBool  SoftSelected
  Read Write Property: Is model Soft selected?
FBPropertyBool  IsDeformable
  Read Only Property: Is model deformable?
FBPropertyBool  IsConstrained
  Read Only Property: Is model constrained?
FBPropertyBool  SkeletonDeformable
  Read Write Property: Model skeleton deformable.
FBPropertyBool  BlendShapeDeformable
  Read Write Property: Model blendshape deformable.
FBPropertyBool  ConstrainDeformable
  Read Write Property: Model constraint deformable.
FBPropertyBool  PointCacheDeformable
  Read Write Property: Model point cache deformable.
FBPropertyBool  PointCacheRecord
  Read Write Property: Record Point Cache for model? Not Savable
FBPropertyModel  Parent
  Read Write Property: Parent model.
FBPropertyModel  LookAt
  Read Write Property: Look at model (interest point).
FBPropertyModel  UpVector
  Read Write Property: UpVector model.
FBPropertyGeometry  Geometry
  Read Write Property: Geometry for the model.
FBPropertyMesh  TessellatedMesh
  Read Only Property: Tessellated Mesh for the model.
FBPropertyModelVertexData  ModelVertexData
  Read Only Property: ModelVertexData for the model.
FBPropertyCluster  Cluster
  Read Only Property: Link Cluster for the model.
FBPropertyScene  Scene
  Read Only Property: Scene containing the model.
FBPropertyModelShadingMode  ShadingMode
  Read Write Property: Shading mode for the model.
FBPropertyAnimationNode  AnimationNode
  Read Only Property: Animation node of the model.
FBPropertyModelRotationOrder  RotationOrder
  Read Write Property: Rotation order.
FBPropertyBool  RotationSpaceForLimitOnly
  Read Write Property: Apply Post Rotation Matrix only for Limits?
FBPropertyBool  RotationActive
  Read Write Property: Is model using Rotation Limits?
FBPropertyVector3d  PreRotation
  Read Write Property: Pre Rotation (considered if RotationActive is true)
FBPropertyVector3d  PostRotation
  Read Write Property: Post Rotation (considered if RotationActive is true)
FBPropertyVector3d  RotationMin
  Read Write Property: Min Rotation Limit (considered if RotationActive is true)
FBPropertyVector3d  RotationMax
  Read Write Property: Max Rotation Limit (considered if RotationActive is true)
FBPropertyBool  RotationMinX
  Read Write Property: Is model using Minimum Rotation Limits On X?
FBPropertyBool  RotationMinY
  Read Write Property: Is model using Minimum Rotation Limits On Y?
FBPropertyBool  RotationMinZ
  Read Write Property: Is model using Minimum Rotation Limits On Z?
FBPropertyBool  RotationMaxX
  Read Write Property: Is model using Maximum Rotation Limits On X?
FBPropertyBool  RotationMaxY
  Read Write Property: Is model using Maximum Rotation Limits On Y?
FBPropertyBool  RotationMaxZ
  Read Write Property: Is model using Maximum Rotation Limits On Z?
FBPropertyAnimatableBool  Visibility
  Read Write Property: Visibility of model.
FBPropertyBool  VisibilityInheritance
  Read Write Property: //!< When this value is set to True the Visibility of this model is also applied to all its descendants
FBPropertyAnimatableVector3d  Translation
  Read Write Property: Lcl translation.
FBPropertyAnimatableVector3d  Rotation
  Read Write Property: Lcl rotation.
FBPropertyAnimatableVector3d  Scaling
  Read Write Property: Lcl scaling.
FBPropertyVector3d  GeometricTranslation
  Read Write Property: Geometric translation.
FBPropertyVector3d  GeometricRotation
  Read Write Property: Geometric rotation.
FBPropertyVector3d  GeometricScaling
  Read Write Property: Geometric scaling.
FBPropertyBool  QuaternionInterpolate
  Read Write Property: Use quaternion interpolation.
FBPropertyBool  Show
  Read Write Property: Indicate if the viewer should show the object, according to its visibility value.
FBPropertyBool  Pickable
  Read Write Property: Indicate if a model can be picked in the viewer.

Constructor & Destructor Documentation

FBModel ( char *  pName,
HIObject  pObject = NULL 
)

Constructor.

Parameters:
pName Name of model.
pObject For internal use only(default=NULL).

Member Function Documentation

virtual void FBDelete ( ) [virtual]

Open Reality deletion function.

Reimplemented from FBComponent.

IQuery_Declare ( Implementation  )
ICallback_Declare ( Implementation  )
virtual HFBModel Clone ( ) [virtual]

Clone the model.

This will duplicate the current model.

Returns:
Newly created model.
void SetMatrix ( FBMatrix  pMatrix,
int  pWhat = kModelTransformation,
bool  pGlobalInfo = true,
bool  pPushUndo = false,
HFBEvaluateInfo  pEvaluateInfo = NULL 
)

Set a matrix for the model.

Parameters:
pMatrix Information to use to set the model's matrix.
pWhat Type of matrix to set (default=transformation).
pGlobalInfo true if it is GlobalInfo, false if Local (default=true).
pPushUndo true if this operation is undoable, don't push undo in non UI thread.
pEvaluateInfo EvaluateInfo, Take Display if none specified
void GetMatrix ( FBMatrix pMatrix,
int  pWhat = kModelTransformation,
bool  pGlobalInfo = true,
HFBEvaluateInfo  pEvaluateInfo = NULL 
)

Get a matrix from the model.

Parameters:
pWhat Type of information requested (default=transformation).
pGlobalInfo true if it is GlobalInfo, false if Local (default=true).
Return values:
pMatrix Matrix to fill with requested information.
Parameters:
pEvaluateInfo EvaluateInfo, Take Display if none specified.
void SetVector ( FBVector3d  pVector,
int  pWhat = kModelTranslation,
bool  pGlobalInfo = true,
bool  pPushUndo = false,
HFBEvaluateInfo  pEvaluateInfo = NULL 
)

Set a vector for the model.

Parameters:
pVector Vector to use to set values.
pWhat Type of information to set (default=translation, inverses not supported).
pGlobalInfo true if it is GlobalInfo, false if Local (default=true).
pPushUndo true if this operation is undoable, don't push undo in non UI thread.
pEvaluateInfo EvaluateInfo, Take Display if none specified
void GetVector ( FBVector3d pVector,
int  pWhat = kModelTranslation,
bool  pGlobalInfo = true,
HFBEvaluateInfo  pEvaluateInfo = NULL 
)

Get a vector from the model.

Parameters:
pWhat Type of information requested (default=translation, inverses not supported).
pGlobalInfo true if it is GlobalInfo, false if Local (default=true).
Return values:
pVector Vector to fill with requested values.
Parameters:
pEvaluateInfo EvaluateInfo, Take Display if none specified
void SetSchematicPosition ( int  pX,
int  pY 
)

Set the position in the schematic view for the model.

Parameters:
pX X position to set.
pY Y position to set.
void SetSchematicPosition ( FBVector2d  pVector2d )

Set the position in the schematic view for the model.

Parameters:
pVector2d Position to set.
FBVector2d GetSchematicPosition ( )

Get the position in the schematic view for the model.

Returns:
Current position for the model.
void GetBoundingBox ( FBVector3d pMin,
FBVector3d pMax 
)

Get the bounding box of the model.

Return values:
pMin Minimum value of the bounding box.
pMax Maximum value of the bounding box.
int NoFrustumCullingRequire ( )

Acquire no frustum culling request.

Returns:
Current no frustum culling request count after function call.
int NoFrustumCullingRelease ( )

Release no frustum culling request.

Returns:
Current no frustum culling request count after function call.
bool UseFrustumCulling ( )

Get the current Frustum Culling Status.

Returns:
True if model don't use frustum culling currently.
virtual bool HasCustomDisplay ( ) [inline, virtual]

Function to overload to handle custom display.

Returns:
True is this model class has custom display function ModelDisplay

Definition at line 459 of file fbmodel.h.

{ return false; }
virtual void CustomModelDisplay ( FBCamera pCamera,
FBModelShadingMode  pShadingMode,
FBModelRenderPass  pRenderPass,
float  pPickingAreaWidth,
float  pPickingAreaHeight 
) [inline, virtual]

Custom display function called when HasCustomDisplay returns true;.

Parameters:
pCamera Current camera for display.
pShadingMode Shading mode to render see FBModelShadingMode.
pRenderPass Actual rendering pass, see FBModelRenderPass.
pPickingAreaWidth Width of picking area.
pPickingAreaHeight Height of picking area.

Definition at line 468 of file fbmodel.h.

{}
virtual bool CustomModelPicking ( int  pNbHits,
unsigned int *  pSelectBuffer,
FBCamera pCamera,
int  pMouseX,
int  pMouseY,
FBTVector pLocalRaySrc,
FBTVector pLocalRayDir,
FBTVector pWorldRaySrc,
FBTVector pWorldRayDir,
FBMatrix pGlobalInverseMatrix,
FBTVector pOutPickedPoint 
) [inline, virtual]

Custom picking for selection.

Parameters:
pNbHits Number of hits.
pSelectBuffer OpenGL hit buffer.
pCamera Current camera for rendering.
pMouseX Mouse X position.
pMouseY Mouse Y position.
pLocalRaySrc Local picking ray source.
pLocalRayDir Local picking ray direction.
pWorldRaySrc World coordinate picking ray source.
pWorldRayDir World coordinate picking ray direction.
pGlobalInverseMatrix Inverse transformation matrix of the model.
pOutPickedPoint Picked position.

Definition at line 483 of file fbmodel.h.

                                                                    { return false; }
unsigned char* GetSelectedPoints ( )

Get the list of the points selection state.

Returns:
Pointer to the list of the points selection state.
int GetSelectedPointsCount ( )

Get the number of selected points in the model.

Returns:
Number of selected points.
virtual bool FbxStore ( HFBFbxObject  pFbxObject,
kFbxObjectStore  pStoreWhat 
) [virtual]

Store and Retrieve function that can be overloaded.

Parameters:
pFbxObject FBX Object that is used to communicate I/O operations.
pStoreWhat Which attributes are currently stored/retrieved.

Reimplemented from FBBox.

virtual bool FbxRetrieve ( HFBFbxObject  pFbxObject,
kFbxObjectStore  pStoreWhat 
) [virtual]

Reimplemented from FBBox.

void SetupPropertiesForShapes ( )

Setup Shape Properties.

Normally this function is called automatically at the next global synchronization point after the geometry has been updated. However you must call it explicitly to access the shape properties immediately after shapes adding/removing before next global synchronization point.

virtual char* FbxGetObjectType ( ) [virtual]

Returns the class type inherited by the class of an object, for example: 'Model'.

Reimplemented from FBBox.

virtual char* FbxGetObjectSubType ( ) [virtual]

Returns the class sub type inherited by the class of an object, for example: 'Default', 'Mesh'.

Reimplemented from FBBox.


Member Data Documentation

List: Children for model.

Definition at line 321 of file fbmodel.h.

List: Shaders for model.

Definition at line 323 of file fbmodel.h.

List: Materials for model.

Definition at line 324 of file fbmodel.h.

List: Textures with Special UseType (Other than "Color" which should connect to materials).

Definition at line 325 of file fbmodel.h.

List: Deformers (Skeleton Deformer or Point Cache Deformer).

Definition at line 326 of file fbmodel.h.

Read Write Property: Is model a 3D icon?

Definition at line 327 of file fbmodel.h.

Read Write Property: Is model Soft selected?

Definition at line 328 of file fbmodel.h.

Read Only Property: Is model deformable?

Definition at line 329 of file fbmodel.h.

Read Only Property: Is model constrained?

Definition at line 330 of file fbmodel.h.

Read Write Property: Model skeleton deformable.

Not Savable

Definition at line 331 of file fbmodel.h.

Read Write Property: Model blendshape deformable.

Not Savable

Definition at line 332 of file fbmodel.h.

Read Write Property: Model constraint deformable.

Not Savable

Definition at line 333 of file fbmodel.h.

Read Write Property: Model point cache deformable.

Not Savable

Definition at line 334 of file fbmodel.h.

Read Write Property: Record Point Cache for model? Not Savable

Definition at line 335 of file fbmodel.h.

FBPropertyModel Parent

Read Write Property: Parent model.

Definition at line 336 of file fbmodel.h.

FBPropertyModel LookAt

Read Write Property: Look at model (interest point).

Definition at line 337 of file fbmodel.h.

FBPropertyModel UpVector

Read Write Property: UpVector model.

Definition at line 338 of file fbmodel.h.

FBPropertyGeometry Geometry

Read Write Property: Geometry for the model.

Definition at line 339 of file fbmodel.h.

FBPropertyMesh TessellatedMesh

Read Only Property: Tessellated Mesh for the model.

Definition at line 340 of file fbmodel.h.

FBPropertyModelVertexData ModelVertexData

Read Only Property: ModelVertexData for the model.

Definition at line 341 of file fbmodel.h.

FBPropertyCluster Cluster

Read Only Property: Link Cluster for the model.

Definition at line 342 of file fbmodel.h.

FBPropertyScene Scene

Read Only Property: Scene containing the model.

Definition at line 343 of file fbmodel.h.

FBPropertyModelShadingMode ShadingMode

Read Write Property: Shading mode for the model.

Definition at line 344 of file fbmodel.h.

FBPropertyAnimationNode AnimationNode

Read Only Property: Animation node of the model.

Definition at line 345 of file fbmodel.h.

FBPropertyModelRotationOrder RotationOrder

Read Write Property: Rotation order.

Definition at line 347 of file fbmodel.h.

Read Write Property: Apply Post Rotation Matrix only for Limits?

Definition at line 350 of file fbmodel.h.

Read Write Property: Is model using Rotation Limits?

Definition at line 351 of file fbmodel.h.

Read Write Property: Pre Rotation (considered if RotationActive is true)

Definition at line 352 of file fbmodel.h.

Read Write Property: Post Rotation (considered if RotationActive is true)

Definition at line 353 of file fbmodel.h.

Read Write Property: Min Rotation Limit (considered if RotationActive is true)

Definition at line 354 of file fbmodel.h.

Read Write Property: Max Rotation Limit (considered if RotationActive is true)

Definition at line 355 of file fbmodel.h.

Read Write Property: Is model using Minimum Rotation Limits On X?

Definition at line 356 of file fbmodel.h.

Read Write Property: Is model using Minimum Rotation Limits On Y?

Definition at line 357 of file fbmodel.h.

Read Write Property: Is model using Minimum Rotation Limits On Z?

Definition at line 358 of file fbmodel.h.

Read Write Property: Is model using Maximum Rotation Limits On X?

Definition at line 359 of file fbmodel.h.

Read Write Property: Is model using Maximum Rotation Limits On Y?

Definition at line 360 of file fbmodel.h.

Read Write Property: Is model using Maximum Rotation Limits On Z?

Definition at line 361 of file fbmodel.h.

Read Write Property: Visibility of model.

This can be overriden by the 'Show' property.

Definition at line 364 of file fbmodel.h.

Read Write Property: //!< When this value is set to True the Visibility of this model is also applied to all its descendants

Definition at line 365 of file fbmodel.h.

Read Write Property: Lcl translation.

Definition at line 366 of file fbmodel.h.

Read Write Property: Lcl rotation.

Definition at line 367 of file fbmodel.h.

Read Write Property: Lcl scaling.

Definition at line 368 of file fbmodel.h.

Read Write Property: Geometric translation.

Definition at line 370 of file fbmodel.h.

Read Write Property: Geometric rotation.

Definition at line 371 of file fbmodel.h.

Read Write Property: Geometric scaling.

Definition at line 372 of file fbmodel.h.

Read Write Property: Use quaternion interpolation.

Definition at line 374 of file fbmodel.h.

Read Write Property: Indicate if the viewer should show the object, according to its visibility value.

This has a default value of 'false'.

Definition at line 376 of file fbmodel.h.

Read Write Property: Indicate if a model can be picked in the viewer.

This has a default value of 'true'.

Definition at line 377 of file fbmodel.h.


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

FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel
FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel