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 
895 public:
900  FBModelSkeleton(const char* pName, HIObject pObject=NULL);
901 
905 
910  void GetSkinModelList(FBModelList& pSkinModelList);
911 };
912 
913 
915 // FBPropertyListModelSkeleton
917 FB_DEFINE_LIST( FBSDK_DLL, ModelSkeleton );
919 
922 {
923 public:
929  FBModelSkeleton* operator[](int pIndex);
930 };
931 
932 
934 // FBModelCube
937 
939 class FBSDK_DLL FBModelCube : public FBModel {
941 public:
946  FBModelCube(const char* pName, HIObject pObject=NULL);
947 };
948 
950 // FBModelPlane
953 
957 public:
962  FBModelPlane(const char* pName, HIObject pObject=NULL);
963 };
964 
965 
967 // FBCluster
974 };
975 FB_DEFINE_ENUM( FBSDK_DLL, ClusterMode );
976 
978 
984 
985 protected:
989  FBCluster(FBModel* pModel);
990  friend class DataFBModel;
991 
992 public:
993 
994  //--- Cluster-level operations
999  int ClusterBegin(int pIndex = -1);
1000 
1004  int ClusterEnd();
1005 
1006  //--- Link-level operations
1011  void LinkSetName(const char *pName, int pLinkNumber);
1016  const char* LinkGetName(int pLinkNumber);
1020  void LinkRemove(int pLinkNumber);
1024  int LinkGetCount();
1028  void LinkSetModel(FBModel* pModel);
1033  FBModel* LinkGetModel(int pLinkNumber);
1038  FBModel* LinkGetAssociateModel(int pLinkNumber);
1042  void LinkClearUnused( double pThreshold = -1.0 );
1047  void LinkSetCurrentVertex(int pLinkIndex,int pPointIndex);
1052  int LinkGetVertexIndex(int pIndex);
1053 
1054  //--- Vertex level operations.
1060  void VertexSetTransform(FBVector3d pPosition,FBVector3d pRotation, FBVector3d pScaling);
1066  void VertexGetTransform(FBVector3d& pPosition,FBVector3d& pRotation, FBVector3d& pScaling);
1071  void VertexAdd(int pVertexIndex,double pWeight);
1075  void VertexRemove(int pVertexIndex);
1079  int VertexGetCount();
1084  int VertexGetNumber(int pIndex);
1089  double VertexGetWeight(int pIndex);
1094  void VertexSetWeight(double pWeight,int pIndex);
1097  void VertexClear();
1098 
1101 };
1102 
1104 // FBModelVertexData
1107 
1110 
1111 protected:
1112  FBModelVertexData(FBModel* pModel);
1113  friend class DataFBModel;
1114 
1115 public:
1116 
1118  bool IsDeformable();
1119 
1124  bool IsDrawable();
1125 
1127  int GetVertexCount();
1128 
1133 
1135  int GetSubPatchCount();
1136 
1138  int GetSubPatchMaterialId(int pSubPatchIndex);
1139 
1141  FBMaterial* GetSubPatchMaterial(int pSubPatchIndex);
1142 
1149  FBGeometryPrimitiveType GetSubPatchPrimitiveType(int pSubPatchIndex, bool* pIsOptimized = NULL);
1150 
1152  int GetSubPatchIndexOffset(int pSubPatchIndex);
1153 
1155  int GetSubPatchIndexSize(int pSubPatchIndex);
1156 
1161  void DrawSubPatch(int pSubPatchIndex, bool pWireFrame = false);
1162 
1164 
1170 
1172  int GetSubRegionCount();
1173 
1177  FBMaterial* GetSubRegionMaterial(int pSubRegionIndex);
1178 
1183  void DrawSubRegion(int pSubRegionIndex, bool pWireFrame = false);
1184 
1186 
1192  void PushZDepthClipOverride();
1193 
1198  void PopZDepthClipOverride();
1199 
1206  void EnableOGLVertexData(bool pAfterdeform = true);
1207 
1209  void DisableOGLVertexData();
1210 
1216  void VertexArrayMappingRequest();
1217 
1222  void VertexArrayMappingRelease();
1223 
1233  const int* GetVertexArrayDuplicationMap(unsigned int& pDuplicatedVertexCound);
1234 
1236  int* GetIndexArray();
1237 
1239  unsigned int GetIndexArrayVBOId();
1240 
1247  FBGeometryArrayElementType GetVertexArrayType(FBGeometryArrayID pArrayId, bool pAfterDeform = true);
1248 
1255  void* GetVertexArray(FBGeometryArrayID pArrayId, bool pAfterDeform = true);
1256 
1263  unsigned int GetVertexArrayVBOId(FBGeometryArrayID pArrayId, bool pAfterDeform = true);
1264 
1271  void* GetVertexArrayVBOOffset(FBGeometryArrayID pArrayId, bool pAfterDeform = true);
1272 
1274 
1281  void EnableOGLUVSet(FBTextureMapping pTextureMapping = kFBTextureMappingUV, const char* pUVSet = NULL);
1282 
1284  void DisableOGLUVSet();
1285 
1291  FBGeometryArrayElementType GetUVSetArrayFormat(FBTextureMapping pTextureMapping = kFBTextureMappingUV, const char* pUVSet = NULL);
1292 
1298  void* GetUVSetArray(FBTextureMapping pTextureMapping = kFBTextureMappingUV, const char* pUVSet = NULL);
1299 
1305  unsigned int GetUVSetVBOId(FBTextureMapping pTextureMapping = kFBTextureMappingUV, const char* pUVSet = NULL);
1306 
1312  void* GetUVSetVBOOffset(FBTextureMapping pTextureMapping = kFBTextureMappingUV, const char* pUVSet = NULL);
1313 
1315 };
1316 
1318 // FBDeformer
1320 
1332 {
1336 };
1337 
1338 FB_DEFINE_ENUM( FBSDK_DLL, DeformerType );
1339 
1341 
1345 
1346 public:
1351  FBDeformer(const char* pName, HIObject pObject=NULL);
1352 
1354 };
1355 
1357 // FBDeformerPointCache
1360 
1364 
1365 public:
1370  FBDeformerPointCache(const char* pName, HIObject pObject=NULL);
1371 
1373 
1375 
1378 
1385 };
1386 
1388 // FBPointCacheFile
1391 
1395 
1396 public:
1401  FBPointCacheFile(const char* pName, HIObject pObject=NULL);
1402 
1405 
1412 };
1413 
1414 #ifdef FBSDKUseNamespace
1415 }
1416 #endif
1417 #endif
FBPropertyVector3d GeometricTranslation
Read Write Property: Geometric translation.
Definition: fbmodel.h:347
FBPropertyPointCacheFile PointCacheFile
Read Write Property: Point Cache File Object.
Definition: fbmodel.h:1372
class FBArrayTemplate< FBModel * > FBModelList
typedef class FBSDK_DLL FBArrayTemplate FBModelList;
Definition: fbcharacter.h:597
Breadth-first search.
Definition: fbmodel.h:224
FBPropertyBool Pickable
Read Write Property: Indicate if a model can be picked in the viewer.
Definition: fbmodel.h:354
Model class.
Definition: fbmodel.h:273
#define __FBClassDeclare(Name, Parent)
For internal use only.
Definition: fbcomponent.h:132
FBPropertyColor UniqueColorId
Read Only Property: Unique Color Id for color based viewer picking.
Definition: fbmodel.h:356
FBPropertyCluster Cluster
Read Only Property: Link Cluster for the model.
Definition: fbmodel.h:309
FBMarkerLook
Look of the marker.
Definition: fbmodel.h:815
FBPropertyBool Transformable
Read Write Property: Indicate if a model can be transformable in the viewer.
Definition: fbmodel.h:355
FBPropertyColor Color
Read Write Property: Color of skeleton node.
Definition: fbmodel.h:903
Culling with Counter Clock Wise.
Definition: fbmodel.h:211
FBModelList * FBCreateModelList()
Create a FBModelList object.
FBPropertyVector3d TranslationMin
Read Write Property: Translation Limit Min.
Definition: fbmodel.h:331
FBPropertyBool Loop
Read Write Property: Loop.
Definition: fbmodel.h:1411
FBDeformerType
Determine the deformer type.
Definition: fbmodel.h:1331
Base class for Geometry.
Add the values together.
Definition: fbmodel.h:972
FBPropertyTime ChannelEnd
Read Only Property: Channel End.
Definition: fbmodel.h:1381
#define FB_DEFINE_COMPONENT(DllTag, Type)
Define a component and give it the ability to be a property.
Definition: fbproperties.h:139
#define FB_DEFINE_LIST(DllTag, Type)
Define a component list.
Definition: fbproperties.h:161
class FBPropertyBaseComponent< FBAnimationNode * > FBPropertyAnimationNode
Definition: fbdata.h:554
class FBPropertyBaseEnum< enum FBClusterMode > FBPropertyClusterMode
Definition: fbmodel.h:975
FBPropertyDouble Size
Read Write Property: Size (not related to scaling).
Definition: fbmodel.h:902
Highest resolution.
Definition: fbmodel.h:811
Toggle the current selection with the unselected components.
Definition: fbmodel.h:232
FBPropertyVector3d RotationMax
Read Write Property: Max Rotation Limit (considered if RotationActive is true)
Definition: fbmodel.h:322
Weighting interface for meshes.
Definition: fbmodel.h:982
FBPropertyBool PointCacheDeformable
Read Write Property: Model point cache deformable.
Definition: fbmodel.h:300
Inverse transformation.
Definition: fbmodel.h:173
FBPropertyModel LookAt
Read Write Property: Look at model (interest point).
Definition: fbmodel.h:303
class FBPropertyBase< double, kFBPT_double > FBPropertyDouble
Property: double
class FBVector2< double > FBVector2d
2D vector.
Definition: fbtypes.h:435
FBPropertyTime ChannelStart
Read Only Property: Channel Start.
Definition: fbmodel.h:1380
FBGeometryArrayID
ID to use when requesting a specific array of data for a model.
Definition: fbgeometry.h:76
Replaces the current selection by the new selected components.
Definition: fbmodel.h:229
FBPropertyString ChannelName
Read Only Property: Channel Name.
Definition: fbmodel.h:1377
FBPropertyListShader Shaders
List: Shaders for model.
Definition: fbmodel.h:289
class FBPropertyBase< FBTime, kFBPT_Time > FBPropertyTime
Property: FBTime
FBModelEvaluationTaskType
Definition: fbmodel.h:215
class FBPropertyBaseEnum< enum FBDeformerType > FBPropertyDeformerType
Definition: fbmodel.h:1338
Four x Four (double) Matrix.
Definition: fbtypes.h:289
XZY Euler Order.
Definition: fbmodel.h:200
FBPropertyBool TranslationMinY
Read Write Property: Is model using Translation Limits on Min Y.
Definition: fbmodel.h:334
void FBModelTransactionEnd()
FBModelTransactionEnd.
FBPropertyBool RotationMinY
Read Write Property: Is model using Minimum Rotation Limits On Y?
Definition: fbmodel.h:324
FBPropertyDouble Size
Read Write Property: Size (not related to scaling).
Definition: fbmodel.h:765
Creates custom cameras and manages system cameras.
Definition: fbcamera.h:206
FBPropertyDouble PlaySpeed
Read Write Property: Play Speed.
Definition: fbmodel.h:1408
PropertyList: Texture
Definition: fbtexture.h:158
#define NULL
Definition: kaydara.h:169
class FBPropertyBaseEnum< enum FBMarkerResolutionLevel > FBPropertyMarkerResolutionLevel
Definition: fbmodel.h:842
FBPropertyBool TranslationMaxX
Read Write Property: Is model using Translation Limits on Max X.
Definition: fbmodel.h:336
#define ICallback_Declare(IsPure)
Forwarding.
Definition: icallback.h:42
Remove all components from the current selection.
Definition: fbmodel.h:234
FBPropertyListTexture Textures
List: Textures with Special UseType (Other than "Color" which should connect to materials).
Definition: fbmodel.h:291
FBPropertyTime StopTime
Read Write Property: Stop Time.
Definition: fbmodel.h:1407
FBPropertyModelShadingMode ShadingMode
Read Write Property: Shading mode for the model.
Definition: fbmodel.h:311
FBPropertyInt ChannelCount
Read Only Property: Channel Count.
Definition: fbmodel.h:1379
FBPropertyDouble Size
Read Write Property: Size (not related to scaling).
Definition: fbmodel.h:856
Plane model class.
Definition: fbmodel.h:955
class FBPropertyBase< FBVector3d, kFBPT_Vector3D > FBPropertyVector3d
FBPropertyVector3d type definition.
Remove the selected components from the current selection.
Definition: fbmodel.h:231
#define K_IMPLEMENTATION
Definition: iobject.h:53
FBPropertyModelVertexData ModelVertexData
Read Only Property: ModelVertexData for the model.
Definition: fbmodel.h:308
AnimationNodeNotify evaluation information.
FBPropertyVector3d PostRotation
Read Write Property: Post Rotation (considered if RotationActive is true)
Definition: fbmodel.h:320
FBPropertyBool PrimaryVisibility
Read Write Property: Control the geometry render state.
Definition: fbmodel.h:358
FBPropertyBool TranslationMinZ
Read Write Property: Is model using Translation Limits on Min Z.
Definition: fbmodel.h:335
FBModel * FBLoadFbxPrimitivesModel(const char *pModelName)
Load a model.
Contains definitions for devices, boxes and models.
FBSelectionAction
Selection mode when selecting component.
Definition: fbmodel.h:228
FBModelTransformationType
Types of transformation vector/matrices possible.
Definition: fbmodel.h:167
Transformation plus geometry offset.
Definition: fbmodel.h:172
FBPropertyBool ReceiveShadows
Read Write Property: If true, the geometry will receive shadows.
Definition: fbmodel.h:360
Property class: const char * (String).
Color vector.
Definition: fbtypes.h:447
virtual bool HasCustomDisplay()
Function to overload to handle custom display.
Definition: fbmodel.h:510
class FBVector4< float > FBNormal
Normal.
Definition: fbtypes.h:599
FBPropertyAnimatableVector3d Rotation
Read Write Property: Lcl rotation.
Definition: fbmodel.h:344
XYZ Euler Order.
Definition: fbmodel.h:199
The balanced values will add up to 100 percent.
Definition: fbmodel.h:973
FBPropertyBool TranslationMaxZ
Read Write Property: Is model using Translation Limits on Max Z.
Definition: fbmodel.h:338
#define FB_DEFINE_ENUM(DllTag, Type)
Define an enum and give it the ability to be a property.
Definition: fbproperties.h:148
FBPropertyListModel Children
Interface to IObject.
Definition: fbmodel.h:284
FBPropertyDouble ChannelFrameRate
Read Only Property: Channel FrameRate.
Definition: fbmodel.h:1383
FBX file interface.
Definition: fbfbx.h:80
MotionBuilder SDK base class.
Definition: fbcomponent.h:668
FBPropertyBool TranslationMinX
Read Write Property: Is model using Translation Limits on Min X.
Definition: fbmodel.h:333
FBPropertyInt ChannelIndex
Read Write Property: Channel Index.
Definition: fbmodel.h:1376
FBPropertyString CacheFileName
Read Write Property: Filename of media.
Definition: fbmodel.h:1403
FBPropertyMarkerLook Look
Read Write Property: Look of model marker.
Definition: fbmodel.h:859
FBPropertyGeometry Geometry
Read Write Property: Geometry for the model.
Definition: fbmodel.h:305
class FBPropertyBase< bool, kFBPT_bool > FBPropertyBool
Property: bool
Root object class.
Definition: fbmodel.h:789
class FBPropertyBaseEnum< enum FBModelShadingMode > FBPropertyModelShadingMode
Definition: fbmodel.h:237
FBPropertyInt ChannelCount
Read Only Property: Channel Count.
Definition: fbmodel.h:1404
class FBPropertyBaseComponent< FBCluster * > FBPropertyCluster
Definition: fbmodel.h:84
class FBPropertyBaseComponent< FBPointCacheFile * > FBPropertyPointCacheFile
Definition: fbmodel.h:86
class FBPropertyBaseEnum< enum FBMarkerType > FBPropertyMarkerType
Definition: fbmodel.h:844
void FBFindModelsOfType(FBModelList &pList, int pTypeInfo, FBModel *pParent=((void *) 0))
Find all models of a certain type in the scene.
FBPropertyTime StartTime
Read Write Property: Start Time.
Definition: fbmodel.h:1406
FBPropertyBool RotationActive
Read Write Property: Is model using Rotation Limits?
Definition: fbmodel.h:318
void FBEndChangeAllModels()
Call end change to all models (should be first open).
const double FBMat2EulerDegenerateForPrecision10
Definition: fbmath.h:57
class FBPropertyBaseComponent< FBGeometry * > FBPropertyGeometry
Definition: fbgeometry.h:58
Model's transformation evaluation task (Global )
Definition: fbmodel.h:216
Base Model deformer class.
Definition: fbmodel.h:1362
FBPropertyDeformerType DeformerType
Read Only Property: Deformer Type.
Definition: fbmodel.h:1353
class FBPropertyBaseAnimatable< bool, kFBPT_bool > FBPropertyAnimatableBool
FBPropertyAnimatableBool type definition.
void FBModelTransactionBegin()
FBModelTransactionBegin.
void FBBeginChangeAllModels()
Call begin change to all models (need to be closed).
class FBPropertyBaseComponent< FBScene * > FBPropertyScene
Definition: fbcore.h:69
FBPropertyModelRotationOrder RotationOrder
Read Write Property: Rotation order.
Definition: fbmodel.h:314
FBPropertyScene Scene
Read Only Property: Scene containing the model.
Definition: fbmodel.h:310
PropertyList: Component.
Definition: fbcomponent.h:494
FBPropertyBool IsConstrained
Read Only Property: Is model constrained?
Definition: fbmodel.h:296
FBGeometryArrayElementType
Type of data when requesting an array.
Definition: fbgeometry.h:93
YZX Euler Order.
Definition: fbmodel.h:201
FBPropertyMarkerResolutionLevel ResLevel
Read Write Property: Resolution level of model marker.
Definition: fbmodel.h:858
FBPropertyVector3d GeometricScaling
Read Write Property: Geometric scaling.
Definition: fbmodel.h:349
FBPropertyBool SkeletonDeformable
Read Write Property: Model skeleton deformable.
Definition: fbmodel.h:297
FBPropertyDouble Size
Read Write Property: Size (not related to scaling).
Definition: fbmodel.h:798
FBPropertyBool RotationMinZ
Read Write Property: Is model using Minimum Rotation Limits On Z?
Definition: fbmodel.h:325
class FBPropertyBaseEnum< enum FBModelRotationOrder > FBPropertyModelRotationOrder
Definition: fbmodel.h:239
Definition: Python-ast.h:18
PropertyList: Concrete class for PropertyList of component
Definition: fbcomponent.h:553
FBPropertyBool Show
Read Write Property: Indicate if the viewer should show the object, according to its visibility value...
Definition: fbmodel.h:353
FBModelCullingMode
Model Culling Mode.
Definition: fbmodel.h:209
FBPropertyBool IsDeformable
Read Only Property: Is model deformable?
Definition: fbmodel.h:295
Inverse translation.
Definition: fbmodel.h:175
FBPropertyBool TranslationActive
Read Write Property: Is model using Translation Limits?
Definition: fbmodel.h:330
FBPropertyBool RotationMaxZ
Read Write Property: Is model using Maximum Rotation Limits On Z?
Definition: fbmodel.h:328
#define __FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Definition: fbtypes.h:68
Model marker class.
Definition: fbmodel.h:847
FBPropertyModel Parent
Read Write Property: Parent model.
Definition: fbmodel.h:302
Wireframe shading.
Definition: fbmodel.h:183
FBPropertyListMaterial Materials
List: Materials for model.
Definition: fbmodel.h:290
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...
FBPropertyAnimatableBool Visibility
Read Write Property: Visibility of model.
Definition: fbmodel.h:341
FBPropertyBool RotationMaxY
Read Write Property: Is model using Maximum Rotation Limits On Y?
Definition: fbmodel.h:327
Base Model deformer class.
Definition: fbmodel.h:1393
class FBVector3< double > FBVector3d
3D vector.
Definition: fbtypes.h:438
FBPropertyAnimatableVector3d Scaling
Read Write Property: Lcl scaling.
Definition: fbmodel.h:345
FBModelHiercharyTraverserType
Types of hierarchy traverser search type.
Definition: fbmodel.h:222
Inverse of transformation plus geometry offset.
Definition: fbmodel.h:177
class FBPropertyBaseComponent< FBModel * > FBPropertyModel
Definition: fbcore.h:70
class FBPropertyBaseEnum< enum FBMarkerLook > FBPropertyMarkerLook
Definition: fbmodel.h:843
PropertyList: Material
Definition: fbmaterial.h:179
#define FBSDKNamespace
FBSDKNamespace define.
Definition: fbversion.h:64
PropertyList: Shader
Definition: fbshader.h:696
FBPropertyVector3d GeometricRotation
Read Write Property: Geometric rotation.
Definition: fbmodel.h:348
virtual bool ManipulatorNotify(FBSelectionAction pAction)
Callback for component selection in custom FBModel.
Definition: fbmodel.h:666
FBPropertyAnimatableVector3d Translation
Read Write Property: Lcl translation.
Definition: fbmodel.h:343
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
FBPropertyBool CastsShadows
Read Write Property: If true, the geometry will produce shadows.
Definition: fbmodel.h:359
FBPropertyVector3d IKPivot
Read Write Property: marker Pivot Offset.
Definition: fbmodel.h:862
Basic class definitions.
FBPropertyTime Offset
Read Write Property: Offset.
Definition: fbmodel.h:1409
Material class.
Definition: fbmaterial.h:87
FBPropertyBool BlendShapeDeformable
Read Write Property: Model blend-shape deformable.
Definition: fbmodel.h:298
Lowest resolution.
Definition: fbmodel.h:809
ZXY Euler Order.
Definition: fbmodel.h:203
FBPropertyBool TranslationMaxY
Read Write Property: Is model using Translation Limits on Max Y.
Definition: fbmodel.h:337
FBPropertyClusterMode ClusterMode
Read Write Property: Cluster mode.
Definition: fbmodel.h:1099
FBPropertyListDeformer Deformers
List: Deformers (Skeleton Deformer or Point Cache Deformer).
Definition: fbmodel.h:292
FBPropertyBool FreeRunning
Read Write Property: Free Running.
Definition: fbmodel.h:1410
Lighted, shaded, textured shading.
Definition: fbmodel.h:188
class FBPropertyBaseComponent< FBMesh * > FBPropertyMesh
Definition: fbgeometry.h:59
FBPropertyBool RotationSpaceForLimitOnly
Read Write Property: Apply Post Rotation Matrix only for Limits?
Definition: fbmodel.h:317
A box is a fundamental building block in the application architecture.
Definition: fbcore.h:218
YXZ Euler Order.
Definition: fbmodel.h:202
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
FBPropertyMesh TessellatedMesh
Read Only Property: Tessellated Mesh for the model.
Definition: fbmodel.h:307
FBPropertyVector3d TranslationMax
Read Write Property: Translation Limit Max.
Definition: fbmodel.h:332
FBModelRotationOrder
Ways to apply Rotation.
Definition: fbmodel.h:198
Base Model deformer class.
Definition: fbmodel.h:1343
#define FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Definition: fbtypes.h:62
FBPropertyBool DrawLink
Read Write Property: Whether to draw link to parent node or not.
Definition: fbmodel.h:904
FBGeometryPrimitiveType
Definition: fbgeometry.h:61
Add the selected components to the current selection.
Definition: fbmodel.h:230
ZYX Euler Order.
Definition: fbmodel.h:204
FBPropertyColor Color
Read Write Property: Color of model marker.
Definition: fbmodel.h:861
FBModelRenderPass
Model Render pass.
Definition: fbmodel.h:192
FBPropertyBool RotationMinX
Read Write Property: Is model using Minimum Rotation Limits On X?
Definition: fbmodel.h:323
FBPropertyVector3d PreRotation
Read Write Property: Pre Rotation (considered if RotationActive is true)
Definition: fbmodel.h:319
FBClusterMode
Different clustering modes.
Definition: fbmodel.h:970
FBPropertyBool VisibilityInheritance
Read Write Property: //!< when="" this="" value="" is="" set="" to="" true="" the="" visibility="" of="" this="" model="" is="" also="" />
Definition: fbmodel.h:342
Cube model class.
Definition: fbmodel.h:939
FBPropertyBool Active
Read Write Property: Active.
Definition: fbmodel.h:1374
FBPropertyVector3d RotationMin
Read Write Property: Min Rotation Limit (considered if RotationActive is true)
Definition: fbmodel.h:321
FBPropertyBool ChannelSampleRegular
Read Only Property: Channel Sample Regular.
Definition: fbmodel.h:1382
Base class for Material.
FBPropertyModel UpVector
Read Write Property: UpVector model.
Definition: fbmodel.h:304
FBModel * FBFindModelByUniqueColorId(const FBColor &pColor, int *pSubItemIndex=((void *) 0))
Find a model in the scene by its unique color id.
FBModelShadingMode
Modes for model shading.
Definition: fbmodel.h:181
PropertyList: ModelSkeleton.
Definition: fbmodel.h:921
FBModel * FBFindModelByLabelName(const char *pModelLabelName)
Find a model in the scene by its label name.
FBPropertyInt GeometryUpdateId
Read Only Property: model geometry (vertex data) related update id.
Definition: fbmodel.h:306
#define FBSDK_DLL
Be sure that FBSDK_DLL is defined only once...
Definition: fbmodel.h:48
class FBPropertyBase< int, kFBPT_int > FBPropertyInt
Property: int
kFbxObjectStore
Description of the different store/retrieve passes of the FBX format.
Definition: fbtypes.h:74
Model's deformation task (for deformable model)
Definition: fbmodel.h:218
class FBPropertyBase< FBColor, kFBPT_ColorRGB > FBPropertyColor
FBPropertyColor type definition.
Declaration for the classes FBShaderManager, FBShader, FBPropertyListShader and other subclasses...
FBPropertyBool RotationMaxX
Read Write Property: Is model using Maximum Rotation Limits On X?
Definition: fbmodel.h:326
#define __FBClassDeclareGroup(Name, Parent)
For internal use only.
Definition: fbcomponent.h:169
FBPropertyAnimationNode AnimationNode
Read Only Property: Animation node of the model.
Definition: fbmodel.h:312
FBPropertyBool ConstrainDeformable
Read Write Property: Model constraint deformable.
Definition: fbmodel.h:299
Box with a sphere on one end.
Definition: fbmodel.h:825
FBTextureMapping
Texture mapping modes.
Definition: fbtexture.h:83
Model's bouding box computation task (approximately for deformable model)
Definition: fbmodel.h:217
Null object class.
Definition: fbmodel.h:756
Root object class.
Definition: fbmodel.h:893
FBPropertyBool IKSync
Read Write Property: Must sync with IK if true.
Definition: fbmodel.h:863
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
FBMarkerResolutionLevel
Resolution of marker mesh sphere and capsule (Quality).
Definition: fbmodel.h:807
class FBPropertyBaseAnimatable< FBVector3d, kFBPT_Vector3D > FBPropertyAnimatableVector3d
FBPropertyAnimatableVector3D type definition.
Culling with Clock Wise.
Definition: fbmodel.h:212
FBPropertyDouble ClusterAccuracy
Read Write Property: Cluster accuracy.
Definition: fbmodel.h:1100
FBPropertyInt ChannelPointCount
Read Only Property: Channel Point Count.
Definition: fbmodel.h:1384
Add all components to the current selection.
Definition: fbmodel.h:233
void FBDestroyModelList(FBModelList *pModelList)
Delete a FBModelList object.
Spheric XYZ Order.
Definition: fbmodel.h:205
FBPropertyMarkerType Type
Read Write Property: Type of model marker.
Definition: fbmodel.h:860
#define IQuery_Declare(IsPure)
Definition: iobject.h:80
Culling Off.
Definition: fbmodel.h:210
class FBPropertyBaseComponent< FBModelVertexData * > FBPropertyModelVertexData
Definition: fbmodel.h:85
FBPropertyDouble Length
Read Write Property: Length for capsule (not related to scaling).
Definition: fbmodel.h:857
Normalize (values between 0.0 and 1.0 )
Definition: fbmodel.h:971
Contains routines for vector and matrix manipulation.
FBMarkerType
Type of the marker.
Definition: fbmodel.h:834
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