fbsdk/fbmodel.h Source File

fbmodel.h
Go to the documentation of this file.
1 #ifndef __FBMODEL_H__
2 #define __FBMODEL_H__
3 /**************************************************************************
4 Copyright (c) 1994 - 2009 Autodesk, Inc. and/or its licensors.
5 All Rights Reserved.
6 
7 The coded instructions, statements, computer programs, and/or related
8 material (collectively the "Data") in these files contain unpublished
9 information proprietary to Autodesk, Inc. and/or its licensors, which is
10 protected by Canada and United States of America federal copyright law
11 and by international treaties.
12 
13 The Data may not be disclosed or distributed to third parties, in whole
14 or in part, without the prior written consent of Autodesk, Inc.
15 ("Autodesk").
16 
17 THE DATA IS PROVIDED "AS IS" AND WITHOUT WARRANTY.
18 ALL WARRANTIES ARE EXPRESSLY EXCLUDED AND DISCLAIMED. AUTODESK MAKES NO
19 WARRANTY OF ANY KIND WITH RESPECT TO THE DATA, EXPRESS, IMPLIED OR
20 ARISING BY CUSTOM OR TRADE USAGE, AND DISCLAIMS ANY IMPLIED WARRANTIES
21 OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR
22 PURPOSE OR USE. WITHOUT LIMITING THE FOREGOING, AUTODESK DOES NOT
23 WARRANT THAT THE OPERATION OF THE DATA WILL BE UNINTERRUPTED OR ERROR
24 FREE.
25 
26 IN NO EVENT SHALL AUTODESK, ITS AFFILIATES, PARENT COMPANIES, LICENSORS
27 OR SUPPLIERS ("AUTODESK GROUP") BE LIABLE FOR ANY LOSSES, DAMAGES OR
28 EXPENSES OF ANY KIND (INCLUDING WITHOUT LIMITATION PUNITIVE OR MULTIPLE
29 DAMAGES OR OTHER SPECIAL, DIRECT, INDIRECT, EXEMPLARY, INCIDENTAL, LOSS
30 OF PROFITS, REVENUE OR DATA, COST OF COVER OR CONSEQUENTIAL LOSSES OR
31 DAMAGES OF ANY KIND), HOWEVER CAUSED, AND REGARDLESS OF THE THEORY OF
32 LIABILITY, WHETHER DERIVED FROM CONTRACT, TORT (INCLUDING, BUT NOT
33 LIMITED TO, NEGLIGENCE), OR OTHERWISE, ARISING OUT OF OR RELATING TO THE
34 DATA OR ITS USE OR ANY OTHER PERFORMANCE, WHETHER OR NOT AUTODESK HAS
35 BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSS OR DAMAGE.
36 
37 **************************************************************************/
38 
43 #include <kaydaradef.h>
44 #ifndef FBSDK_DLL
45 
48 #define FBSDK_DLL K_DLLIMPORT
49 #endif
50 
51 #include <fbsdk/fbcore.h>
52 #include <fbsdk/fbcomponent.h>
53 #include <fbsdk/fbshader.h> // FBPropertyListShader
54 #include <fbsdk/fbtexture.h>
55 #include <fbsdk/fbgeometry.h>
56 #include <fbsdk/fbmaterial.h>
57 #include <fbsdk/fbtexture.h>
58 #include <fbsdk/fbmath.h>
59 
60 #ifdef FBSDKUseNamespace
61 namespace FBSDKNamespace {;
62 #endif
63 
67 #define FBStorableCustomModelImplementation(ClassName, Desc)\
68  const char* ClassName::FbxGetObjectSubType(){ return #ClassName; }\
69  HIObject RegisterStorable##ClassName##Create(HIObject /*pOwner*/, const char* pName, void* /*pData*/){\
70  ClassName* Class = new ClassName(pName);\
71  Class->mAllocated = true;\
72  if( Class->FBCreate() ){\
73  __FBRemoveModelFromScene( Class->GetHIObject() ); /* Hack in MoBu2013, we shouldn't add object to the scene/entity automatically*/\
74  return Class->GetHIObject();\
75  } else {\
76  delete Class;\
77  return NULL;}}\
78  FBLibraryModule(ClassName##Storable){\
79  FBString lGroup = "FbxStorable/Model";\
80  FBRegisterObject(ClassName##R2, lGroup, #ClassName, Desc, RegisterStorable##ClassName##Create, true, NULL);\
81  FBSetStoreableCustomModelRegistered();}\
82 
85 FB_DEFINE_COMPONENT( FBSDK_DLL, ModelVertexData );
86 FB_DEFINE_COMPONENT( FBSDK_DLL, PointCacheFile );
87 
89 // FBPropertyListModel
94 
97 {
98 public:
103  int Add ( FBModel* pItem );
104 
109  int Remove ( FBModel* pItem );
110 
114  virtual void RemoveAt( int pIndex );
115 
120  FBModel* operator[](int pIndex);
121 
125  virtual int GetCount();
126 #ifndef DOXYGEN_SHOULD_SKIP_THIS
127  inline virtual FBComponent* GetAt(int pIndex) { return (FBComponent*)operator[](pIndex); }
128 private:
129  inline virtual int Add ( FBComponent* pItem ) { return Add((FBModel*)pItem); }
130  inline virtual int Remove ( FBComponent* pItem ) { return Remove((FBModel*)pItem); }
131 #endif
132 };
133 
135 // FBPropertyListDeformer
139 
141 {
142 public:
150  virtual int Add( FBDeformer* pItem );
155  FBDeformer* operator[](int pIndex);
156 
157 private:
158  inline virtual int Add ( FBComponent* pItem ) { return Add((FBDeformer*)pItem); }
159 };
160 
162 // FBModel
165 
178 };
179 
189 };
190 
195 };
196 
206 };
207 
213 };
214 
219 };
220 
225 };
226 
235 };
236 
237 FB_DEFINE_ENUM( FBSDK_DLL, ModelShadingMode );
238 FB_DEFINE_ENUM( FBSDK_DLL, ModelTransformationType);
239 FB_DEFINE_ENUM( FBSDK_DLL, ModelRotationOrder );
240 
242 
273 class FBSDK_DLL FBModel : public FBBox
274 {
276 public:
281  FBModel(const char* pName, HIObject pObject=NULL);
282  virtual void FBDelete();
283 
286 
288 
313 
315 
316  // Limits
329 
339 
340  // Animatable
346 
350 
352 
357 
361 
366  virtual FBModel* Clone();
367 
375  void SetMatrix(FBMatrix pMatrix, FBModelTransformationType pWhat=kModelTransformation, bool pGlobalInfo=true, bool pPushUndo = false, FBEvaluateInfo* pEvaluateInfo=NULL);
376 
383  void GetMatrix(FBMatrix &pMatrix, FBModelTransformationType pWhat=kModelTransformation, bool pGlobalInfo=true, FBEvaluateInfo* pEvaluateInfo=NULL);
384 
392  void SetVector(FBVector3d pVector, FBModelTransformationType pWhat=kModelTranslation, bool pGlobalInfo=true, bool pPushUndo = false, FBEvaluateInfo* pEvaluateInfo=NULL);
393 
400  void GetVector(FBVector3d &pVector, FBModelTransformationType pWhat=kModelTranslation, bool pGlobalInfo=true, FBEvaluateInfo* pEvaluateInfo=NULL);
401 
407  bool IsEvaluationReady(FBModelEvaluationTaskType pWhat, FBEvaluateInfo* pEvaluateInfo=NULL) const;
408 
413  void MatrixToRotation(FBRVector &pRotation, const FBMatrix &pMatrix);
414 
419  void RotationToMatrix( FBMatrix &pMatrix, const FBRVector &pRotation);
420 
427  void LRMToDof(FBRVector &pDof, const FBMatrix &pLM);
428 
435  void DofToLRM(FBMatrix &pLM, const FBRVector &pDof);
436 
441  void SetSchematicPosition(int pX,int pY);
442 
446  void SetSchematicPosition(FBVector2d pVector2d);
447 
451  FBVector2d GetSchematicPosition();
452 
458  void GetBoundingBox( FBVector3d& pMin, FBVector3d& pMax );
459 
470  bool IsVisible(FBEvaluateInfo* pEvaluateInfo = NULL);
471 
475  FBModelCullingMode GetCullingMode() const;
476 
480  void SetCullingMode(FBModelCullingMode pCullingMode);
481 
486  void ForceAlwaysEvaluate();
487 
490  bool IsForceAlwaysEvaluate();
491 
495  int NoFrustumCullingRequire();
496 
500  int NoFrustumCullingRelease();
501 
505  bool UseFrustumCulling();
506 
510  virtual bool HasCustomDisplay() { return false; }
511 
519  virtual void CustomModelDisplay( FBCamera* pCamera, FBModelShadingMode pShadingMode, FBModelRenderPass pRenderPass, float pPickingAreaWidth, float pPickingAreaHeight) {}
520 
534  virtual bool CustomModelPicking( int pNbHits, unsigned int *pSelectBuffer, FBCamera* pCamera,
535  int pMouseX,int pMouseY,
536  FBTVector* pLocalRaySrc, FBTVector* pLocalRayDir,
537  FBTVector* pWorldRaySrc, FBTVector* pWorldRayDir,
538  FBMatrix* pGlobalInverseMatrix,
539  FBTVector* pOutPickedPoint) { return false; }
540 
549  virtual bool ClosestRayIntersection(const FBTVector& pRayOrigin, const FBTVector& pRayEnd, FBTVector& pIntersectPos, FBNormal& pIntersectNormal);
550 
554  unsigned char* GetSelectedPoints();
555 
559  int GetSelectedPointsCount();
560 
575  bool SetAdditionalUniqueColorIDCount(unsigned int pCount);
576 
580  unsigned int GetAdditionalUniqueColorIDCount() const;
581 
586  FBColor GetAdditionalUniqueColorID(unsigned int pIndex) const;
587 
588  /*
589  * @}
590  */
591 
596  virtual bool FbxStore(FBFbxObject* pFbxObject, kFbxObjectStore pStoreWhat);
597  virtual bool FbxRetrieve(FBFbxObject* pFbxObject, kFbxObjectStore pStoreWhat);
598 
606  void SetupPropertiesForShapes();
607 
616  bool RayCast(FBCamera* pCamera, int pMouseX, int pMouseY, FBVector3d& pHitPosition, FBVector3d& pHitNormal);
617 
620  virtual const char* FbxGetObjectType() override;
621 
624  virtual const char* FbxGetObjectSubType() override;
625 
634  void SetMatrixWithPrecision(FBMatrix pMatrix, FBModelTransformationType pWhat=kModelTransformation, bool pGlobalInfo=true, bool pPushUndo = false,
635  FBEvaluateInfo* pEvaluateInfo=NULL, double pPrecision = FBMat2EulerDegenerateForPrecision10);
636 
637 
647  unsigned int GetHierarchyWorldMatrices(FBMatrix* pMatricesArray, unsigned int pMatricesArrayCount, FBModelHiercharyTraverserType pHiercharyTraverserType, FBEvaluateInfo* pEvaluateInfo=NULL);
648 
651  void CollapseInSchematic();
652 
655  void ExpandInSchematic();
656 
660  bool IsCollapsedInSchematic() const;
661 
666  virtual bool ManipulatorNotify(FBSelectionAction pAction) { return true; }
667 };
668 
670 typedef class FBSDK_DLL FBArrayTemplate<FBModel*> FBModelList;
671 
678 FBSDK_DLL FBModelList* FBCreateModelList();
679 
683 FBSDK_DLL void FBDestroyModelList( FBModelList* pModelList );
684 
693 FBSDK_DLL FBModel* FBFindModelByLabelName( const char* pModelLabelName );
694 
702 FBSDK_DLL FBModel* FBFindModelByUniqueColorId( const FBColor& pColor, int* pSubItemIndex = NULL );
703 
708 FBSDK_DLL FBModel* FBLoadFbxPrimitivesModel( const char* pModelName );
709 
717 FBSDK_DLL void FBFindModelsOfType( FBModelList& pList, int pTypeInfo, FBModel* pParent=NULL );
718 
728 FBSDK_DLL void FBGetSelectedModels( FBModelList& pList, FBModel* pParent=NULL, bool pSelected=true, bool pSortBySelectOrder = false );
729 
734 
738 
743 
748 
749 
751 // FBModelNull
753 __FB_FORWARD( FBModelNull);
754 
756 class FBSDK_DLL FBModelNull : public FBModel {
758 public:
763  FBModelNull(const char* pName, HIObject pObject=NULL);
764 
766 
771  virtual bool FbxStore(FBFbxObject* pFbxObject, kFbxObjectStore pStoreWhat);
772  virtual bool FbxRetrieve(FBFbxObject* pFbxObject, kFbxObjectStore pStoreWhat);
773 
776  virtual const char* FbxGetObjectType() override;
777 
780  virtual const char* FbxGetObjectSubType() override;
781 };
782 
784 // FBModelRoot
787 
789 class FBSDK_DLL FBModelRoot : public FBModel {
791 public:
796  FBModelRoot(const char* pName, HIObject pObject=NULL);
797 
799 };
800 
802 // FBModelMarker
805 
808 {
812 };
813 
816 {
831 };
832 
835 {
840 };
841 
842 FB_DEFINE_ENUM( FBSDK_DLL, MarkerResolutionLevel );
843 FB_DEFINE_ENUM( FBSDK_DLL, MarkerLook );
844 FB_DEFINE_ENUM( FBSDK_DLL, MarkerType );
845 
849 public:
854  FBModelMarker(const char* pName, HIObject pObject=NULL);
855 
864 
868  void SetFKOpacity(double pValue);
869 
874  virtual bool FbxStore(FBFbxObject* pFbxObject, kFbxObjectStore pStoreWhat);
875  virtual bool FbxRetrieve(FBFbxObject* pFbxObject, kFbxObjectStore pStoreWhat);
876 
879  virtual const char* FbxGetObjectType() override;
880 
883  virtual const char* FbxGetObjectSubType() override;
884 };
885 
886 
888 // FBModelSkeleton
891 
894 {
905 };
906 
909 {
913 };
914 
915 FB_DEFINE_ENUM( FBSDK_DLL, SkeletonLook );
916 FB_DEFINE_ENUM( FBSDK_DLL, SkeletonResolutionLevel );
917 
921 public:
926  FBModelSkeleton(const char* pName, HIObject pObject=NULL);
927 
931 
937 
942  void GetSkinModelList(FBModelList& pSkinModelList);
943 };
944 
945 
947 // FBPropertyListModelSkeleton
949 FB_DEFINE_LIST( FBSDK_DLL, ModelSkeleton );
951 
954 {
955 public:
961  FBModelSkeleton* operator[](int pIndex);
962 };
963 
964 
966 // FBModelCube
969 
971 class FBSDK_DLL FBModelCube : public FBModel {
973 public:
978  FBModelCube(const char* pName, HIObject pObject=NULL);
979 };
980 
982 // FBModelPlane
985 
989 public:
994  FBModelPlane(const char* pName, HIObject pObject=NULL);
995 };
996 
997 
999 // FBCluster
1006 };
1007 FB_DEFINE_ENUM( FBSDK_DLL, ClusterMode );
1008 
1010 
1016 
1017 protected:
1021  FBCluster(FBModel* pModel);
1022  friend class DataFBModel;
1023 
1024 public:
1025 
1026  //--- Cluster-level operations
1031  int ClusterBegin(int pIndex = -1);
1032 
1036  int ClusterEnd();
1037 
1038  //--- Link-level operations
1043  void LinkSetName(const char *pName, int pLinkNumber);
1048  const char* LinkGetName(int pLinkNumber);
1052  void LinkRemove(int pLinkNumber);
1056  int LinkGetCount();
1060  void LinkSetModel(FBModel* pModel);
1065  FBModel* LinkGetModel(int pLinkNumber);
1070  FBModel* LinkGetAssociateModel(int pLinkNumber);
1074  void LinkClearUnused( double pThreshold = -1.0 );
1079  void LinkSetCurrentVertex(int pLinkIndex,int pPointIndex);
1084  int LinkGetVertexIndex(int pIndex);
1085 
1086  //--- Vertex level operations.
1092  void VertexSetTransform(FBVector3d pPosition,FBVector3d pRotation, FBVector3d pScaling);
1098  void VertexGetTransform(FBVector3d& pPosition,FBVector3d& pRotation, FBVector3d& pScaling);
1103  void VertexAdd(int pVertexIndex,double pWeight);
1107  void VertexRemove(int pVertexIndex);
1111  int VertexGetCount();
1116  int VertexGetNumber(int pIndex);
1121  double VertexGetWeight(int pIndex);
1126  void VertexSetWeight(double pWeight,int pIndex);
1129  void VertexClear();
1130 
1133 };
1134 
1136 // FBModelVertexData
1139 
1142 
1143 protected:
1144  FBModelVertexData(FBModel* pModel);
1145  friend class DataFBModel;
1146 
1147 public:
1148 
1150  bool IsDeformable();
1151 
1156  bool IsDrawable();
1157 
1159  int GetVertexCount();
1160 
1165 
1167  int GetSubPatchCount();
1168 
1170  int GetSubPatchMaterialId(int pSubPatchIndex);
1171 
1173  FBMaterial* GetSubPatchMaterial(int pSubPatchIndex);
1174 
1181  FBGeometryPrimitiveType GetSubPatchPrimitiveType(int pSubPatchIndex, bool* pIsOptimized = NULL);
1182 
1184  int GetSubPatchIndexOffset(int pSubPatchIndex);
1185 
1187  int GetSubPatchIndexSize(int pSubPatchIndex);
1188 
1193  void DrawSubPatch(int pSubPatchIndex, bool pWireFrame = false);
1194 
1196 
1202 
1204  int GetSubRegionCount();
1205 
1209  FBMaterial* GetSubRegionMaterial(int pSubRegionIndex);
1210 
1215  void DrawSubRegion(int pSubRegionIndex, bool pWireFrame = false);
1216 
1218 
1224  void PushZDepthClipOverride();
1225 
1230  void PopZDepthClipOverride();
1231 
1238  void EnableOGLVertexData(bool pAfterdeform = true);
1239 
1241  void DisableOGLVertexData();
1242 
1248  void VertexArrayMappingRequest();
1249 
1254  void VertexArrayMappingRelease();
1255 
1265  const int* GetVertexArrayDuplicationMap(unsigned int& pDuplicatedVertexCound);
1266 
1268  int* GetIndexArray();
1269 
1271  unsigned int GetIndexArrayVBOId();
1272 
1279  FBGeometryArrayElementType GetVertexArrayType(FBGeometryArrayID pArrayId, bool pAfterDeform = true);
1280 
1287  void* GetVertexArray(FBGeometryArrayID pArrayId, bool pAfterDeform = true);
1288 
1295  unsigned int GetVertexArrayVBOId(FBGeometryArrayID pArrayId, bool pAfterDeform = true);
1296 
1303  void* GetVertexArrayVBOOffset(FBGeometryArrayID pArrayId, bool pAfterDeform = true);
1304 
1306 
1313  void EnableOGLUVSet(FBTextureMapping pTextureMapping = kFBTextureMappingUV, const char* pUVSet = NULL);
1314 
1316  void DisableOGLUVSet();
1317 
1323  FBGeometryArrayElementType GetUVSetArrayFormat(FBTextureMapping pTextureMapping = kFBTextureMappingUV, const char* pUVSet = NULL);
1324 
1330  void* GetUVSetArray(FBTextureMapping pTextureMapping = kFBTextureMappingUV, const char* pUVSet = NULL);
1331 
1337  unsigned int GetUVSetVBOId(FBTextureMapping pTextureMapping = kFBTextureMappingUV, const char* pUVSet = NULL);
1338 
1344  void* GetUVSetVBOOffset(FBTextureMapping pTextureMapping = kFBTextureMappingUV, const char* pUVSet = NULL);
1345 
1347 };
1348 
1350 // FBDeformer
1352 
1364 {
1368 };
1369 
1370 FB_DEFINE_ENUM( FBSDK_DLL, DeformerType );
1371 
1373 
1377 
1378 public:
1383  FBDeformer(const char* pName, HIObject pObject=NULL);
1384 
1386 };
1387 
1389 // FBDeformerPointCache
1392 
1396 
1397 public:
1402  FBDeformerPointCache(const char* pName, HIObject pObject=NULL);
1403 
1405 
1407 
1410 
1417 };
1418 
1420 // FBPointCacheFile
1423 
1427 
1428 public:
1433  FBPointCacheFile(const char* pName, HIObject pObject=NULL);
1434 
1437 
1444 };
1445 
1446 #ifdef FBSDKUseNamespace
1447 }
1448 #endif
1449 #endif
Base Model deformer class.
Definition: fbmodel.h:1394
FBX file interface.
Definition: fbfbx.h:80
FBModelHiercharyTraverserType
Types of hierarchy traverser search type.
Definition: fbmodel.h:222
Wireframe shading.
Definition: fbmodel.h:183
FBPropertyMarkerLook Look
Read Write Property: Look of model marker.
Definition: fbmodel.h:859
FBPropertyString CacheFileName
Read Write Property: Filename of media.
Definition: fbmodel.h:1435
#define __FBClassDeclare(Name, Parent)
For internal use only.
Definition: fbcomponent.h:132
FBSkeletonLook
Look of the skeleton.
Definition: fbmodel.h:893
const double FBMat2EulerDegenerateForPrecision10
Definition: fbmath.h:57
Model class.
Definition: fbmodel.h:273
FBPropertyDouble Size
Read Write Property: Size (not related to scaling).
Definition: fbmodel.h:928
FBPropertyPointCacheFile PointCacheFile
Read Write Property: Point Cache File Object.
Definition: fbmodel.h:1404
FBPropertyDouble Size
Read Write Property: Size (not related to scaling).
Definition: fbmodel.h:765
class FBPropertyBaseAnimatable< bool, kFBPT_bool > FBPropertyAnimatableBool
FBPropertyAnimatableBool type definition.
FBPropertyTime ChannelEnd
Read Only Property: Channel End.
Definition: fbmodel.h:1413
void FBModelTransactionEnd()
FBModelTransactionEnd.
class FBPropertyBaseComponent< FBScene * > FBPropertyScene
Definition: fbcore.h:69
Inverse of transformation plus geometry offset.
Definition: fbmodel.h:177
PropertyList: Material
Definition: fbmaterial.h:179
A box is a fundamental building block in the application architecture.
Definition: fbcore.h:218
PropertyList: Shader
Definition: fbshader.h:690
Base class for Geometry.
FBPropertyMesh TessellatedMesh
Read Only Property: Tessellated Mesh for the model.
Definition: fbmodel.h:307
FBGeometryArrayElementType
Type of data when requesting an array.
Definition: fbgeometry.h:86
#define FB_DEFINE_COMPONENT(DllTag, Type)
Define a component and give it the ability to be a property.
Definition: fbproperties.h:139
FBPropertyTime StartTime
Read Write Property: Start Time.
Definition: fbmodel.h:1438
#define FB_DEFINE_LIST(DllTag, Type)
Define a component list.
Definition: fbproperties.h:161
Inverse translation.
Definition: fbmodel.h:175
Property class: const char * (String).
FBPropertyTime Offset
Read Write Property: Offset.
Definition: fbmodel.h:1441
Material class.
Definition: fbmaterial.h:87
class FBPropertyBaseEnum< enum FBModelRotationOrder > FBPropertyModelRotationOrder
Definition: fbmodel.h:239
class FBPropertyBaseComponent< FBMesh * > FBPropertyMesh
Definition: fbgeometry.h:59
FBPropertyCluster Cluster
Read Only Property: Link Cluster for the model.
Definition: fbmodel.h:309
FBModelCullingMode
Model Culling Mode.
Definition: fbmodel.h:209
FBPropertyColor Color
Read Write Property: Color of model marker.
Definition: fbmodel.h:861
FBPropertyTime ChannelStart
Read Only Property: Channel Start.
Definition: fbmodel.h:1412
Base Model deformer class.
Definition: fbmodel.h:1425
FBSkeletonResolutionLevel
Resolution of skeleton sphere, capsule and stick (Quality).
Definition: fbmodel.h:908
FBPropertyVector3d GeometricScaling
Read Write Property: Geometric scaling.
Definition: fbmodel.h:349
Four x Four (double) Matrix.
Definition: fbtypes.h:289
FBPropertyBool RotationMinZ
Read Write Property: Is model using Minimum Rotation Limits On Z?
Definition: fbmodel.h:325
Cube model class.
Definition: fbmodel.h:971
FBModelRenderPass
Model Render pass.
Definition: fbmodel.h:192
class FBVector3< double > FBVector3d
3D vector.
Definition: fbtypes.h:438
PropertyList: ModelSkeleton.
Definition: fbmodel.h:953
void FBFindModelsOfType(FBModelList &pList, int pTypeInfo, FBModel *pParent=((void *) 0))
Find all models of a certain type in the scene.
Base Model deformer class.
Definition: fbmodel.h:1375
FBPropertyDouble Size
Read Write Property: Size (not related to scaling).
Definition: fbmodel.h:798
FBPropertyBool PrimaryVisibility
Read Write Property: Control the geometry render state.
Definition: fbmodel.h:358
FBPropertyString ChannelName
Read Only Property: Channel Name.
Definition: fbmodel.h:1409
class FBPropertyBaseComponent< FBModel * > FBPropertyModel
Definition: fbcore.h:70
class FBPropertyBaseEnum< enum FBMarkerLook > FBPropertyMarkerLook
Definition: fbmodel.h:843
Lowest resolution.
Definition: fbmodel.h:809
ZXY Euler Order.
Definition: fbmodel.h:203
FBPropertyModel Parent
Read Write Property: Parent model.
Definition: fbmodel.h:302
#define NULL
Definition: kaydara.h:179
ZYX Euler Order.
Definition: fbmodel.h:204
FBPropertyListMaterial Materials
List: Materials for model.
Definition: fbmodel.h:290
#define ICallback_Declare(IsPure)
Forwarding.
Definition: icallback.h:42
FBPropertyModel LookAt
Read Write Property: Look at model (interest point).
Definition: fbmodel.h:303
FBPropertyAnimationNode AnimationNode
Read Only Property: Animation node of the model.
Definition: fbmodel.h:312
virtual bool HasCustomDisplay()
Function to overload to handle custom display.
Definition: fbmodel.h:510
FBPropertyBool FreeRunning
Read Write Property: Free Running.
Definition: fbmodel.h:1442
FBPropertyBool ConstrainDeformable
Read Write Property: Model constraint deformable.
Definition: fbmodel.h:299
Lighted, shaded, textured shading.
Definition: fbmodel.h:188
FBPropertyAnimatableVector3d Rotation
Read Write Property: Lcl rotation.
Definition: fbmodel.h:344
FBPropertyMarkerResolutionLevel ResLevel
Read Write Property: Resolution level of model marker.
Definition: fbmodel.h:858
#define K_IMPLEMENTATION
Definition: iobject.h:53
class FBPropertyBaseEnum< enum FBSkeletonResolutionLevel > FBPropertySkeletonResolutionLevel
Definition: fbmodel.h:916
class FBPropertyBase< int, kFBPT_int > FBPropertyInt
Property: int
void FBModelTransactionBegin()
FBModelTransactionBegin.
FBPropertyVector3d GeometricRotation
Read Write Property: Geometric rotation.
Definition: fbmodel.h:348
YXZ Euler Order.
Definition: fbmodel.h:202
virtual bool ManipulatorNotify(FBSelectionAction pAction)
Callback for component selection in custom FBModel.
Definition: fbmodel.h:666
FBPropertyInt ChannelCount
Read Only Property: Channel Count.
Definition: fbmodel.h:1411
FBPropertyAnimatableVector3d Translation
Read Write Property: Lcl translation.
Definition: fbmodel.h:343
FBPropertyListModel Children
Interface to IObject.
Definition: fbmodel.h:284
Creates custom cameras and manages system cameras.
Definition: fbcamera.h:206
class FBPropertyBase< FBColor, kFBPT_ColorRGB > FBPropertyColor
FBPropertyColor type definition.
Root object class.
Definition: fbmodel.h:919
FBPropertyVector3d IKPivot
Read Write Property: marker Pivot Offset.
Definition: fbmodel.h:862
FBPropertyBool CastsShadows
Read Write Property: If true, the geometry will produce shadows.
Definition: fbmodel.h:359
FBPropertyBool TranslationMinX
Read Write Property: Is model using Translation Limits on Min X.
Definition: fbmodel.h:333
FBPropertyBool IKSync
Read Write Property: Must sync with IK if true.
Definition: fbmodel.h:863
Contains definitions for devices, boxes and models.
Color vector.
Definition: fbtypes.h:447
FBTextureMapping
Texture mapping modes.
Definition: fbtexture.h:83
Add the selected components to the current selection.
Definition: fbmodel.h:230
FBPropertyModelShadingMode ShadingMode
Read Write Property: Shading mode for the model.
Definition: fbmodel.h:311
FBModelRotationOrder
Ways to apply Rotation.
Definition: fbmodel.h:198
FBPropertyDouble ChannelFrameRate
Read Only Property: Channel FrameRate.
Definition: fbmodel.h:1415
FBGeometryPrimitiveType
Definition: fbgeometry.h:61
virtual void CustomModelDisplay(FBCamera *pCamera, FBModelShadingMode pShadingMode, FBModelRenderPass pRenderPass, float pPickingAreaWidth, float pPickingAreaHeight)
Custom display function, called when HasCustomDisplay returns true;.
Definition: fbmodel.h:519
#define FB_DEFINE_ENUM(DllTag, Type)
Define an enum and give it the ability to be a property.
Definition: fbproperties.h:148
FBPropertyInt ChannelIndex
Read Write Property: Channel Index.
Definition: fbmodel.h:1408
FBPropertyBool QuaternionInterpolate
Read Write Property: Use quaternion interpolation.
Definition: fbmodel.h:351
FBPropertyBool SoftSelected
Read Write Property: Is model Soft selected?
Definition: fbmodel.h:294
FBClusterMode
Different clustering modes.
Definition: fbmodel.h:1002
FBPropertySkeletonResolutionLevel Resolution
Read Write Property: Resolution of skeleton node.
Definition: fbmodel.h:933
class FBPropertyBaseComponent< FBModelVertexData * > FBPropertyModelVertexData
Definition: fbmodel.h:85
FBPropertyColor UniqueColorId
Read Only Property: Unique Color Id for color based viewer picking.
Definition: fbmodel.h:356
FBPropertyScene Scene
Read Only Property: Scene containing the model.
Definition: fbmodel.h:310
FBPropertyBool IsConstrained
Read Only Property: Is model constrained?
Definition: fbmodel.h:296
FBMarkerType
Type of the marker.
Definition: fbmodel.h:834
FBPropertyBool TranslationMaxZ
Read Write Property: Is model using Translation Limits on Max Z.
Definition: fbmodel.h:338
FBPropertyVector3d TranslationMin
Read Write Property: Translation Limit Min.
Definition: fbmodel.h:331
FBModelShadingMode
Modes for model shading.
Definition: fbmodel.h:181
Model's deformation task (for deformable model)
Definition: fbmodel.h:218
PropertyList: Texture
Definition: fbtexture.h:158
FBPropertyBool RotationMinX
Read Write Property: Is model using Minimum Rotation Limits On X?
Definition: fbmodel.h:323
FBPropertyBool SkeletonDeformable
Read Write Property: Model skeleton deformable.
Definition: fbmodel.h:297
FBPropertyDeformerType DeformerType
Read Only Property: Deformer Type.
Definition: fbmodel.h:1385
Normalize (values between 0.0 and 1.0 )
Definition: fbmodel.h:1003
Box with a sphere on one end.
Definition: fbmodel.h:825
kFbxObjectStore
Description of the different store/retrieve passes of the FBX format.
Definition: fbtypes.h:74
Model's bouding box computation task (approximately for deformable model)
Definition: fbmodel.h:217
FBPropertySkeletonLook Look
Read Write Property: Look of skeleton node.
Definition: fbmodel.h:932
FBPropertyGeometry Geometry
Read Write Property: Geometry for the model.
Definition: fbmodel.h:305
FBPropertyBool RotationMaxZ
Read Write Property: Is model using Maximum Rotation Limits On Z?
Definition: fbmodel.h:328
Null object class.
Definition: fbmodel.h:756
Breadth-first search.
Definition: fbmodel.h:224
Model marker class.
Definition: fbmodel.h:847
FBPropertyInt GeometryUpdateId
Read Only Property: model geometry (vertex data) related update id.
Definition: fbmodel.h:306
Culling with Clock Wise.
Definition: fbmodel.h:212
FBPropertyBool RotationMaxY
Read Write Property: Is model using Maximum Rotation Limits On Y?
Definition: fbmodel.h:327
Add all components to the current selection.
Definition: fbmodel.h:233
class FBPropertyBaseComponent< FBAnimationNode * > FBPropertyAnimationNode
Definition: fbdata.h:1044
Spheric XYZ Order.
Definition: fbmodel.h:205
Culling Off.
Definition: fbmodel.h:210
Definition: Python-ast.h:18
FBPropertyAnimatableVector3d Scaling
Read Write Property: Lcl scaling.
Definition: fbmodel.h:345
FBPropertyListShader Shaders
List: Shaders for model.
Definition: fbmodel.h:289
FBMarkerResolutionLevel
Resolution of marker mesh sphere and capsule (Quality).
Definition: fbmodel.h:807
class FBPropertyBaseAnimatable< FBVector3d, kFBPT_Vector3D > FBPropertyAnimatableVector3d
FBPropertyAnimatableVector3D type definition.
PropertyList: Concrete class for PropertyList of component
Definition: fbcomponent.h:549
void FBDestroyModelList(FBModelList *pModelList)
Delete a FBModelList object.
FBModel * FBFindModelByLabelName(const char *pModelLabelName)
Find a model in the scene by its label name.
FBPropertyBool PointCacheRecord
Read Write Property: Record Point Cache for model? Not Savable
Definition: fbmodel.h:301
FBPropertyBool Icon3D
Read Write Property: Is model a 3D icon?
Definition: fbmodel.h:293
FBPropertyDouble PlaySpeed
Read Write Property: Play Speed.
Definition: fbmodel.h:1440
#define __FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Definition: fbtypes.h:68
FBModel * FBLoadFbxPrimitivesModel(const char *pModelName)
Load a model.
Highest resolution.
Definition: fbmodel.h:811
FBPropertyBool BlendShapeDeformable
Read Write Property: Model blend-shape deformable.
Definition: fbmodel.h:298
FBPropertyListTexture Textures
List: Textures with Special UseType (Other than "Color" which should connect to materials).
Definition: fbmodel.h:291
void FBBeginChangeAllModels()
Call begin change to all models (need to be closed).
Model's transformation evaluation task (Global )
Definition: fbmodel.h:216
Culling with Counter Clock Wise.
Definition: fbmodel.h:211
void FBEndChangeAllModels()
Call end change to all models (should be first open).
class FBArrayTemplate< FBModel * > FBModelList
typedef class FBSDK_DLL FBArrayTemplate FBModelList;
Definition: fbcharacter.h:597
FBPropertyListDeformer Deformers
List: Deformers (Skeleton Deformer or Point Cache Deformer).
Definition: fbmodel.h:292
FBPropertyModelVertexData ModelVertexData
Read Only Property: ModelVertexData for the model.
Definition: fbmodel.h:308
#define FBSDKNamespace
FBSDKNamespace define.
Definition: fbversion.h:64
FBPropertyBool Loop
Read Write Property: Loop.
Definition: fbmodel.h:1443
class FBPropertyBaseEnum< enum FBMarkerResolutionLevel > FBPropertyMarkerResolutionLevel
Definition: fbmodel.h:842
FBPropertyBool DrawLink
Read Write Property: Whether to draw link to parent node or not.
Definition: fbmodel.h:930
FBModelList * FBCreateModelList()
Create a FBModelList object.
Replaces the current selection by the new selected components.
Definition: fbmodel.h:229
Box with a sphere on one end.
Definition: fbmodel.h:904
Add the values together.
Definition: fbmodel.h:1004
FBPropertyBool IsDeformable
Read Only Property: Is model deformable?
Definition: fbmodel.h:295
FBPropertyBool TranslationActive
Read Write Property: Is model using Translation Limits?
Definition: fbmodel.h:330
FBMarkerLook
Look of the marker.
Definition: fbmodel.h:815
FBPropertyBool TranslationMinZ
Read Write Property: Is model using Translation Limits on Min Z.
Definition: fbmodel.h:335
PropertyList: Component.
Definition: fbcomponent.h:490
Basic class definitions.
FBPropertyAnimatableBool Visibility
Read Write Property: Visibility of model.
Definition: fbmodel.h:341
FBPropertyVector3d GeometricTranslation
Read Write Property: Geometric translation.
Definition: fbmodel.h:347
class FBPropertyBase< FBVector3d, kFBPT_Vector3D > FBPropertyVector3d
FBPropertyVector3d type definition.
Toggle the current selection with the unselected components.
Definition: fbmodel.h:232
FBDeformerType
Determine the deformer type.
Definition: fbmodel.h:1363
Remove all components from the current selection.
Definition: fbmodel.h:234
FBPropertyBool Pickable
Read Write Property: Indicate if a model can be picked in the viewer.
Definition: fbmodel.h:354
FBPropertyBool Transformable
Read Write Property: Indicate if a model can be transformable in the viewer.
Definition: fbmodel.h:355
FBPropertyClusterMode ClusterMode
Read Write Property: Cluster mode.
Definition: fbmodel.h:1131
Inverse transformation.
Definition: fbmodel.h:173
class FBPropertyBaseEnum< enum FBClusterMode > FBPropertyClusterMode
Definition: fbmodel.h:1007
Remove the selected components from the current selection.
Definition: fbmodel.h:231
MotionBuilder SDK base class.
Definition: fbcomponent.h:664
FBModelTransformationType
Types of transformation vector/matrices possible.
Definition: fbmodel.h:167
FBPropertyBool VisibilityInheritance
Read Write Property: //!< when="" this="" value="" is="" set="" to="" true="" the="" visibility="" of="" this="" model="" is="" also="">
Definition: fbmodel.h:342
Weighting interface for meshes.
Definition: fbmodel.h:1014
class FBVector4< float > FBNormal
Normal.
Definition: fbtypes.h:599
XZY Euler Order.
Definition: fbmodel.h:200
class FBPropertyBase< double, kFBPT_double > FBPropertyDouble
Property: double
#define FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Definition: fbtypes.h:62
FBPropertyModel UpVector
Read Write Property: UpVector model.
Definition: fbmodel.h:304
class FBVector2< double > FBVector2d
2D vector.
Definition: fbtypes.h:435
FBPropertyBool TranslationMaxY
Read Write Property: Is model using Translation Limits on Max Y.
Definition: fbmodel.h:337
FBGeometryArrayID
ID to use when requesting a specific array of data for a model.
Definition: fbgeometry.h:76
Transformation plus geometry offset.
Definition: fbmodel.h:172
class FBPropertyBase< FBTime, kFBPT_Time > FBPropertyTime
Property: FBTime
FBModelEvaluationTaskType
Definition: fbmodel.h:215
FBPropertyVector3d RotationMax
Read Write Property: Max Rotation Limit (considered if RotationActive is true)
Definition: fbmodel.h:322
class FBPropertyBaseEnum< enum FBDeformerType > FBPropertyDeformerType
Definition: fbmodel.h:1370
XYZ Euler Order.
Definition: fbmodel.h:199
FBPropertyBool PointCacheDeformable
Read Write Property: Model point cache deformable.
Definition: fbmodel.h:300
FBPropertyTime StopTime
Read Write Property: Stop Time.
Definition: fbmodel.h:1439
The balanced values will add up to 100 percent.
Definition: fbmodel.h:1005
FBPropertyBool RotationSpaceForLimitOnly
Read Write Property: Apply Post Rotation Matrix only for Limits?
Definition: fbmodel.h:317
FBPropertyBool RotationActive
Read Write Property: Is model using Rotation Limits?
Definition: fbmodel.h:318
FBPropertyDouble Length
Read Write Property: Length of skeleton node.
Definition: fbmodel.h:934
FBPropertyVector3d TranslationMax
Read Write Property: Translation Limit Max.
Definition: fbmodel.h:332
FBPropertyBool PreserveLinkEndPosition
Read Write Property: Whether skeleton node must preserve its links' end position to children nodes...
Definition: fbmodel.h:936
class FBPropertyBaseEnum< enum FBModelShadingMode > FBPropertyModelShadingMode
Definition: fbmodel.h:237
Base class for Material.
FBPropertyModelRotationOrder RotationOrder
Read Write Property: Rotation order.
Definition: fbmodel.h:314
class FBPropertyBaseComponent< FBCluster * > FBPropertyCluster
Definition: fbmodel.h:84
FBPropertyBool TranslationMinY
Read Write Property: Is model using Translation Limits on Min Y.
Definition: fbmodel.h:334
FBPropertyBool Active
Read Write Property: Active.
Definition: fbmodel.h:1406
FBPropertyBool RotationMinY
Read Write Property: Is model using Minimum Rotation Limits On Y?
Definition: fbmodel.h:324
class FBPropertyBaseComponent< FBPointCacheFile * > FBPropertyPointCacheFile
Definition: fbmodel.h:86
class FBPropertyBaseEnum< enum FBMarkerType > FBPropertyMarkerType
Definition: fbmodel.h:844
FBPropertyBool ChannelSampleRegular
Read Only Property: Channel Sample Regular.
Definition: fbmodel.h:1414
#define FBSDK_DLL
Be sure that FBSDK_DLL is defined only once...
Definition: fbmodel.h:48
AnimationNodeNotify evaluation information.
class FBPropertyBaseComponent< FBGeometry * > FBPropertyGeometry
Definition: fbgeometry.h:58
FBPropertyVector3d PreRotation
Read Write Property: Pre Rotation (considered if RotationActive is true)
Definition: fbmodel.h:319
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, called when HasCustomDisplay returns true;.
Definition: fbmodel.h:534
FBPropertyBool TranslationMaxX
Read Write Property: Is model using Translation Limits on Max X.
Definition: fbmodel.h:336
const char void * pValue
Definition: fbcontrols.h:2116
Declaration for the classes FBShaderManager, FBShader, FBPropertyListShader and other subclasses...
#define __FBClassDeclareGroup(Name, Parent)
For internal use only.
Definition: fbcomponent.h:169
FBPropertyBool Show
Read Write Property: Indicate if the viewer should show the object, according to its visibility value...
Definition: fbmodel.h:353
FBPropertyDouble Size
Read Write Property: Size (not related to scaling).
Definition: fbmodel.h:856
FBPropertyVector3d RotationMin
Read Write Property: Min Rotation Limit (considered if RotationActive is true)
Definition: fbmodel.h:321
FBSelectionAction
Selection mode when selecting component.
Definition: fbmodel.h:228
FBPropertyVector3d PostRotation
Read Write Property: Post Rotation (considered if RotationActive is true)
Definition: fbmodel.h:320
class FBPropertyBaseEnum< enum FBSkeletonLook > FBPropertySkeletonLook
Definition: fbmodel.h:915
FBPropertyDouble ClusterAccuracy
Read Write Property: Cluster accuracy.
Definition: fbmodel.h:1132
void FBGetSelectedModels(FBModelList &pList, FBModel *pParent=((void *) 0), bool pSelected=true, bool pSortBySelectOrder=false)
Find all models that are selected (if pSelected is true) Searches recursively from a root model for m...
FBModel * FBFindModelByUniqueColorId(const FBColor &pColor, int *pSubItemIndex=((void *) 0))
Find a model in the scene by its unique color id.
FBPropertyBool LinkFollowGeometryOffset
Read Write Property: Whether link to parent node must follow skeleton node or not, when skeleton node has a geometry offset.
Definition: fbmodel.h:935
Plane model class.
Definition: fbmodel.h:987
FBPropertyDouble Length
Read Write Property: Length for capsule (not related to scaling).
Definition: fbmodel.h:857
Root object class.
Definition: fbmodel.h:789
YZX Euler Order.
Definition: fbmodel.h:201
FBPropertyBool ReceiveShadows
Read Write Property: If true, the geometry will receive shadows.
Definition: fbmodel.h:360
FBPropertyBool RotationMaxX
Read Write Property: Is model using Maximum Rotation Limits On X?
Definition: fbmodel.h:326
FBPropertyInt ChannelCount
Read Only Property: Channel Count.
Definition: fbmodel.h:1436
FBPropertyColor Color
Read Write Property: Color of skeleton node.
Definition: fbmodel.h:929
#define IQuery_Declare(IsPure)
Definition: iobject.h:80
FBPropertyInt ChannelPointCount
Read Only Property: Channel Point Count.
Definition: fbmodel.h:1416
Contains routines for vector and matrix manipulation.
FBPropertyMarkerType Type
Read Write Property: Type of model marker.
Definition: fbmodel.h:860
class FBPropertyBase< bool, kFBPT_bool > FBPropertyBool
Property: bool