FBModel Class Reference

#include <fbmodel.h>
FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel FBModel
Inheritance diagram for FBModel:
Inheritance graph
[legend]

List of all members.


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 258 of file fbmodel.h.


Public Member Functions

  FBModel (char *pName, HIObject pObject=NULL)
  Constructor.
virtual void  FBDelete ()
  Open Reality deletion function.
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  GetBoundingBox (FBVector3d &pMin, FBVector3d &pMax)
  Get the bounding box of the model.
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)
  Storage/Retrieval of information into the FBX file format.
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).
FBPropertyBool  Icon3D
  Read Write Property: Is model a 3D icon?
FBPropertyBool  SoftSelected
  Read Write Property: Is model Soft selected?
FBPropertyBool  IsDeformable
  Read Write Property: Is model deformable (weights)?
FBPropertyBool  IsConstrained
  Read Only Property: Is model constrained?
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?
FBPropertyAnimatableDouble  Visibility
  Read Write Property: Visibility of model. This can be overriden by the 'Show' property.
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. This has a default value of 'false'.
FBPropertyBool  Pickable
  Read Write Property: Indicate if a model can be picked in the viewer. This has a default value of 'true'.

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.

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 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.

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 372 of file fbmodel.h.

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 381 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 396 of file fbmodel.h.

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]

Storage/Retrieval of information into the FBX file format.

Parameters:
pFbxObject  Object to interface with FBX file format.
pStoreWhat  Attributes to store in FBX file.
Returns:
true if successful.

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

FBPropertyListModel Children

List: Children for model.

Definition at line 272 of file fbmodel.h.

FBPropertyListShader Shaders

List: Shaders for model.

Definition at line 274 of file fbmodel.h.

FBPropertyListMaterial Materials

List: Materials for model.

Definition at line 275 of file fbmodel.h.

FBPropertyListTexture Textures

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

Definition at line 276 of file fbmodel.h.

FBPropertyBool Icon3D

Read Write Property: Is model a 3D icon?

Definition at line 277 of file fbmodel.h.

FBPropertyBool SoftSelected

Read Write Property: Is model Soft selected?

Definition at line 278 of file fbmodel.h.

FBPropertyBool IsDeformable

Read Write Property: Is model deformable (weights)?

Definition at line 279 of file fbmodel.h.

FBPropertyBool IsConstrained

Read Only Property: Is model constrained?

Definition at line 280 of file fbmodel.h.

FBPropertyModel Parent

Read Write Property: Parent model.

Definition at line 281 of file fbmodel.h.

FBPropertyModel LookAt

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

Definition at line 282 of file fbmodel.h.

FBPropertyModel UpVector

Read Write Property: UpVector model.

Definition at line 283 of file fbmodel.h.

FBPropertyGeometry Geometry

Read Write Property: Geometry for the model.

Definition at line 284 of file fbmodel.h.

FBPropertyMesh TessellatedMesh

Read Only Property: Tessellated Mesh for the model.

Definition at line 285 of file fbmodel.h.

FBPropertyModelVertexData ModelVertexData

Read Only Property: ModelVertexData for the model.

Definition at line 286 of file fbmodel.h.

FBPropertyCluster Cluster

Read Only Property: Link Cluster for the model.

Definition at line 287 of file fbmodel.h.

FBPropertyScene Scene

Read Only Property: Scene containing the model.

Definition at line 288 of file fbmodel.h.

FBPropertyModelShadingMode ShadingMode

Read Write Property: Shading mode for the model.

Definition at line 289 of file fbmodel.h.

FBPropertyAnimationNode AnimationNode

Read Only Property: Animation node of the model.

Definition at line 290 of file fbmodel.h.

FBPropertyModelRotationOrder RotationOrder

Read Write Property: Rotation order.

Definition at line 292 of file fbmodel.h.

FBPropertyBool RotationSpaceForLimitOnly

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

Definition at line 295 of file fbmodel.h.

FBPropertyBool RotationActive

Read Write Property: Is model using Rotation Limits?

Definition at line 296 of file fbmodel.h.

FBPropertyVector3d PreRotation

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

Definition at line 297 of file fbmodel.h.

FBPropertyVector3d PostRotation

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

Definition at line 298 of file fbmodel.h.

FBPropertyVector3d RotationMin

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

Definition at line 299 of file fbmodel.h.

FBPropertyVector3d RotationMax

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

Definition at line 300 of file fbmodel.h.

FBPropertyBool RotationMinX

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

Definition at line 301 of file fbmodel.h.

FBPropertyBool RotationMinY

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

Definition at line 302 of file fbmodel.h.

FBPropertyBool RotationMinZ

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

Definition at line 303 of file fbmodel.h.

FBPropertyBool RotationMaxX

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

Definition at line 304 of file fbmodel.h.

FBPropertyBool RotationMaxY

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

Definition at line 305 of file fbmodel.h.

FBPropertyBool RotationMaxZ

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

Definition at line 306 of file fbmodel.h.

FBPropertyAnimatableDouble Visibility

Read Write Property: Visibility of model. This can be overriden by the 'Show' property.

Definition at line 309 of file fbmodel.h.

FBPropertyAnimatableVector3d Translation

Read Write Property: Lcl translation.

Definition at line 310 of file fbmodel.h.

FBPropertyAnimatableVector3d Rotation

Read Write Property: Lcl rotation.

Definition at line 311 of file fbmodel.h.

FBPropertyAnimatableVector3d Scaling

Read Write Property: Lcl scaling.

Definition at line 312 of file fbmodel.h.

FBPropertyVector3d GeometricTranslation

Read Write Property: Geometric translation.

Definition at line 314 of file fbmodel.h.

FBPropertyVector3d GeometricRotation

Read Write Property: Geometric rotation.

Definition at line 315 of file fbmodel.h.

FBPropertyVector3d GeometricScaling

Read Write Property: Geometric scaling.

Definition at line 316 of file fbmodel.h.

FBPropertyBool QuaternionInterpolate

Read Write Property: Use quaternion interpolation.

Definition at line 318 of file fbmodel.h.

FBPropertyBool Show

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 320 of file fbmodel.h.

FBPropertyBool Pickable

Read Write Property: Indicate if a model can be picked in the viewer. This has a default value of 'true'.

Definition at line 321 of file fbmodel.h.


Please send us your comments about this page.