43 #include <kaydaradef.h> 48 #define FBSDK_DLL K_DLLIMPORT 54 #include <fbsdk/fbtexture.h> 57 #include <fbsdk/fbtexture.h> 60 #ifdef FBSDKUseNamespace 67 #define FBStorableCustomModelImplementation(ClassName, Desc)\ 68 const char* ClassName::FbxGetObjectSubType(){ return #ClassName; }\ 69 HIObject RegisterStorable##ClassName##Create(HIObject , const char* pName, void* ){\ 70 ClassName* Class = new ClassName(pName);\ 71 Class->mAllocated = true;\ 72 if( Class->FBCreate() ){\ 73 __FBRemoveModelFromScene( Class->GetHIObject() ); \ 74 return Class->GetHIObject();\ 78 FBLibraryModule(ClassName##Storable){\ 79 FBString lGroup = "FbxStorable/Model";\ 80 FBRegisterObject(ClassName##R2, lGroup, #ClassName, Desc, RegisterStorable##ClassName##Create, true, NULL);\ 81 FBSetStoreableCustomModelRegistered();}\ 114 virtual void RemoveAt(
int pIndex );
120 FBModel* operator[](
int pIndex);
125 virtual int GetCount();
126 #ifndef DOXYGEN_SHOULD_SKIP_THIS 281 FBModel(
const char* pName, HIObject pObject=NULL);
282 virtual void FBDelete();
284 IQuery_Declare (K_IMPLEMENTATION);
285 ICallback_Declare (K_IMPLEMENTATION);
441 void SetSchematicPosition(
int pX,
int pY);
446 void SetSchematicPosition(
FBVector2d pVector2d);
486 void ForceAlwaysEvaluate();
490 bool IsForceAlwaysEvaluate();
495 int NoFrustumCullingRequire();
500 int NoFrustumCullingRelease();
505 bool UseFrustumCulling();
535 int pMouseX,
int pMouseY,
539 FBTVector* pOutPickedPoint) {
return false; }
554 unsigned char* GetSelectedPoints();
559 int GetSelectedPointsCount();
575 bool SetAdditionalUniqueColorIDCount(
unsigned int pCount);
580 unsigned int GetAdditionalUniqueColorIDCount()
const;
586 FBColor GetAdditionalUniqueColorID(
unsigned int pIndex)
const;
606 void SetupPropertiesForShapes();
620 virtual const char* FbxGetObjectType()
override;
624 virtual const char* FbxGetObjectSubType()
override;
635 FBEvaluateInfo* pEvaluateInfo=NULL,
double pPrecision = FBMat2EulerDegenerateForPrecision10);
651 void CollapseInSchematic();
655 void ExpandInSchematic();
660 bool IsCollapsedInSchematic()
const;
763 FBModelNull(
const char* pName, HIObject pObject=NULL);
776 virtual const char* FbxGetObjectType()
override;
780 virtual const char* FbxGetObjectSubType()
override;
796 FBModelRoot(
const char* pName, HIObject pObject=NULL);
868 void SetFKOpacity(
double pValue);
879 virtual const char* FbxGetObjectType()
override;
883 virtual const char* FbxGetObjectSubType()
override;
942 void GetSkinModelList(
FBModelList& pSkinModelList);
978 FBModelCube(
const char* pName, HIObject pObject=NULL);
1022 friend class DataFBModel;
1031 int ClusterBegin(
int pIndex = -1);
1043 void LinkSetName(
const char *pName,
int pLinkNumber);
1048 const char* LinkGetName(
int pLinkNumber);
1052 void LinkRemove(
int pLinkNumber);
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);
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);
1145 friend class DataFBModel;
1150 bool IsDeformable();
1159 int GetVertexCount();
1167 int GetSubPatchCount();
1170 int GetSubPatchMaterialId(
int pSubPatchIndex);
1173 FBMaterial* GetSubPatchMaterial(
int pSubPatchIndex);
1181 FBGeometryPrimitiveType GetSubPatchPrimitiveType(
int pSubPatchIndex,
bool* pIsOptimized = NULL);
1184 int GetSubPatchIndexOffset(
int pSubPatchIndex);
1187 int GetSubPatchIndexSize(
int pSubPatchIndex);
1193 void DrawSubPatch(
int pSubPatchIndex,
bool pWireFrame =
false);
1204 int GetSubRegionCount();
1209 FBMaterial* GetSubRegionMaterial(
int pSubRegionIndex);
1215 void DrawSubRegion(
int pSubRegionIndex,
bool pWireFrame =
false);
1224 void PushZDepthClipOverride();
1230 void PopZDepthClipOverride();
1238 void EnableOGLVertexData(
bool pAfterdeform =
true);
1241 void DisableOGLVertexData();
1248 void VertexArrayMappingRequest();
1254 void VertexArrayMappingRelease();
1265 const int* GetVertexArrayDuplicationMap(
unsigned int& pDuplicatedVertexCound);
1268 int* GetIndexArray();
1271 unsigned int GetIndexArrayVBOId();
1295 unsigned int GetVertexArrayVBOId(
FBGeometryArrayID pArrayId,
bool pAfterDeform =
true);
1303 void* GetVertexArrayVBOOffset(
FBGeometryArrayID pArrayId,
bool pAfterDeform =
true);
1313 void EnableOGLUVSet(FBTextureMapping pTextureMapping = kFBTextureMappingUV,
const char* pUVSet = NULL);
1316 void DisableOGLUVSet();
1323 FBGeometryArrayElementType GetUVSetArrayFormat(FBTextureMapping pTextureMapping = kFBTextureMappingUV,
const char* pUVSet = NULL);
1330 void* GetUVSetArray(FBTextureMapping pTextureMapping = kFBTextureMappingUV,
const char* pUVSet = NULL);
1337 unsigned int GetUVSetVBOId(FBTextureMapping pTextureMapping = kFBTextureMappingUV,
const char* pUVSet = NULL);
1344 void* GetUVSetVBOOffset(FBTextureMapping pTextureMapping = kFBTextureMappingUV,
const char* pUVSet = NULL);
1366 kFBDeformerSkeleton,
1367 kFBDeformerPointCache
1383 FBDeformer(
const char* pName, HIObject pObject=NULL);
1446 #ifdef FBSDKUseNamespace FBPropertyBool SoftSelected
Read Write Property: Is model Soft selected?
kFbxObjectStore
Description of the different store/retrieve passes of the FBX format.
class K_DLLIMPORT FBPropertyBase< double, kFBPT_double > FBPropertyDouble
Property: double
virtual bool HasCustomDisplay()
Function to overload to handle custom display.
FBPropertyDouble Length
Read Write Property: Length of skeleton node. (Note: Only effective when the look is set to: Capsule)...
Base Model deformer class.
#define __FBClassDeclare(Name, Parent)
For internal use only.
FBPropertySkeletonResolutionLevel Resolution
Read Write Property: Resolution of skeleton node. (Note: Only effective when the look is set to: Sphe...
FBClusterMode
Different clustering modes.
FBPropertyTime StartTime
Read Write Property: Start Time.
FBPropertyVector3d RotationMax
Read Write Property: Max Rotation Limit (considered if RotationActive is true)
FBPropertyVector3d PostRotation
Read Write Property: Post Rotation (considered if RotationActive is true)
#define FB_DEFINE_LIST(DllTag, Type)
Define a component list.
PropertyList: Concrete class for PropertyList of component
Transformation plus geometry offset.
FBPropertyBool PreserveLinkEndPosition
Read Write Property: Whether skeleton node must preserve its links' end position to children nodes...
FB_DEFINE_COMPONENT(K_DLLIMPORT, AnimationNode)
Animation node class.
FBPropertyModelVertexData ModelVertexData
Read Only Property: ModelVertexData for the model.
FBPropertyBool RotationSpaceForLimitOnly
Read Write Property: Apply Post Rotation Matrix only for Limits?
FBModelRenderPass
Model Render pass.
K_DLLIMPORT FBModel * FBLoadFbxPrimitivesModel(const char *pModelName)
Load a model.
Template class to contain an array of items.
FBDeformerType
Determine the deformer type.
FBPropertyVector3d PreRotation
Read Write Property: Pre Rotation (considered if RotationActive is true)
FBPropertyScene Scene
Read Only Property: Scene containing the model.
FBPropertyAnimatableVector3d Translation
Read Write Property: Lcl translation.
FBPropertyGeometry Geometry
Read Write Property: Geometry for the model.
FBSkeletonResolutionLevel
Resolution of skeleton sphere, capsule and stick (Quality).
FBPropertyBool Pickable
Read Write Property: Indicate if a model can be picked in the viewer. This has a default value of 'tr...
FBPropertyBool PointCacheDeformable
Read Write Property: Model point cache deformable. Not Savable
FBPropertyColor Color
Read Write Property: Color of skeleton node.
FBPropertyVector3d GeometricTranslation
Read Write Property: Geometric translation.
FBPropertyTime StopTime
Read Write Property: Stop Time.
FBPropertyBool Show
Read Write Property: Indicate if the viewer should show the object, according to its visibility value...
class K_DLLIMPORT FBVector4< float > FBNormal
Normal.
FBPropertyBool TranslationMinY
Read Write Property: Is model using Translation Limits on Min Y.
FBPropertyVector3d TranslationMax
Read Write Property: Translation Limit Max.
FBPropertyBool TranslationMinX
Read Write Property: Is model using Translation Limits on Min X.
FBPropertyInt GeometryUpdateId
Read Only Property: model geometry (vertex data) related update id.
K_DLLIMPORT void FBFindModelsOfType(FBModelList &pList, int pTypeInfo, FBModel *pParent=NULL)
Find all models of a certain type in the scene.
FBMarkerResolutionLevel
Resolution of marker mesh sphere and capsule (Quality).
FBPropertyDouble Size
Read Write Property: Size (not related to scaling).
FBPropertyTime Offset
Read Write Property: Offset.
FBPropertyDouble Length
Read Write Property: Length for capsule (not related to scaling).
FBPropertyBool Loop
Read Write Property: Loop.
FBPropertyVector3d RotationMin
Read Write Property: Min Rotation Limit (considered if RotationActive is true)
FBPropertyBool RotationMinZ
Read Write Property: Is model using Minimum Rotation Limits On Z?
class K_DLLIMPORT FBPropertyBaseAnimatable< bool, kFBPT_bool > FBPropertyAnimatableBool
FBPropertyAnimatableBool type definition.
FBPropertyBool TranslationMaxY
Read Write Property: Is model using Translation Limits on Max Y.
virtual bool ManipulatorNotify(FBSelectionAction pAction)
Callback for component selection in custom FBModel.
FBPropertyBool PrimaryVisibility
Read Write Property: Control the geometry render state. Geometry can still cast shadows even if this ...
Contains definitions for devices, boxes and models.
FBPropertyVector3d TranslationMin
Read Write Property: Translation Limit Min.
FBPropertyModelShadingMode ShadingMode
Read Write Property: Shading mode for the model.
The balanced values will add up to 100 percent.
Model's deformation task (for deformable model)
#define FB_DEFINE_ENUM(DllTag, Type)
Define an enum and give it the ability to be a property.
FBPropertyBool RotationActive
Read Write Property: Is model using Rotation Limits?
FBGeometryArrayElementType
Type of data when requesting an array.
Model's bouding box computation task (approximately for deformable model)
FBPropertyVector3d GeometricRotation
Read Write Property: Geometric rotation.
Creates custom cameras and manages system cameras.
Box with a sphere on one end.
FBPropertyModel Parent
Read Write Property: Parent model.
class K_DLLIMPORT FBPropertyBase< bool, kFBPT_bool > FBPropertyBool
Property: bool
FBPropertyDouble Size
Read Write Property: Size (not related to scaling).
FBPropertyModel LookAt
Read Write Property: Look at model (interest point).
FBPropertyDouble ClusterAccuracy
Read Write Property: Cluster accuracy.
FBPropertyString CacheFileName
Read Write Property: Filename of media.
FBPropertyDouble Size
Read Write Property: Size (not related to scaling).
FBSelectionAction
Selection mode when selecting component.
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;.
FBPropertyAnimatableBool Visibility
Read Write Property: Visibility of model. This can be overridden by the 'Show' property.
Culling with Counter Clock Wise.
FBPropertyListDeformer Deformers
List: Deformers (Skeleton Deformer or Point Cache Deformer).
FBModelEvaluationTaskType
K_DLLIMPORT void FBEndChangeAllModels()
Call end change to all models (should be first open).
Add the selected components to the current selection.
class K_DLLIMPORT FBArrayTemplate< FBModel * > FBModelList
typedef class FBSDK_DLL
FBPropertyVector3d GeometricScaling
Read Write Property: Geometric scaling.
FBPropertyBool VisibilityInheritance
Read Write Property: //!< When this value is set to True the Visibility of this model is also applied...
FBPropertyBool IsConstrained
Read Only Property: Is model constrained?
FBPropertyColor UniqueColorId
Read Only Property: Unique Color Id for color based viewer picking. Color channel values are in the ...
Four x Four (double) Matrix.
FBPropertyBool TranslationMinZ
Read Write Property: Is model using Translation Limits on Min Z.
K_DLLIMPORT void FBModelTransactionBegin()
FBModelTransactionBegin.
FBPropertyBool Transformable
Read Write Property: Indicate if a model can be transformable in the viewer. This has a default value...
FBPropertyBool ConstrainDeformable
Read Write Property: Model constraint deformable. Not Savable
FBPropertyClusterMode ClusterMode
Read Write Property: Cluster mode.
FBPropertyMarkerLook Look
Read Write Property: Look of model marker.
FBPropertyBool SkeletonDeformable
Read Write Property: Model skeleton deformable. Not Savable
FBPropertyModel UpVector
Read Write Property: UpVector model.
Weighting interface for meshes.
K_DLLIMPORT FBModelList * FBCreateModelList()
Create a FBModelList object.
FBPropertyInt ChannelCount
Read Only Property: Channel Count.
FBMarkerType
Type of the marker.
FBPropertyVector3d IKPivot
Read Write Property: marker Pivot Offset.
Inverse of transformation plus geometry offset.
FBModelRotationOrder
Ways to apply Rotation.
FBModelCullingMode
Model Culling Mode.
FBGeometryArrayID
ID to use when requesting a specific array of data for a model.
FBPropertyBool CastsShadows
Read Write Property: If true, the geometry will produce shadows.
FBPropertyListMaterial Materials
List: Materials for model.
FBPropertySkeletonLook Look
Read Write Property: Look of skeleton node.
FBPropertyBool RotationMinX
Read Write Property: Is model using Minimum Rotation Limits On X?
FBPropertyBool Icon3D
Read Write Property: Is model a 3D icon?
FBPropertyListModel Children
List: Children for model.
K_DLLIMPORT FBModel * FBFindModelByLabelName(const char *pModelLabelName)
Find a model in the scene by its label name.
Normalize (values between 0.0 and 1.0 )
Model's transformation evaluation task (Global )
FBPropertyDouble Size
Read Write Property: Size (not related to scaling).
class K_DLLIMPORT FBArrayTemplate< FBModel * > FBModelList
typedef class FBSDK_DLL FBArrayTemplate<FBModel*> FBModelList;
#define FBSDKNamespace
FBSDKNamespace define.
K_DLLIMPORT void FBGetSelectedModels(FBModelList &pList, FBModel *pParent=NULL, bool pSelected=true, bool pSortBySelectOrder=false)
Find all models that are selected (if pSelected is true) Searches recursively from a root model for m...
class K_DLLIMPORT FBPropertyBase< FBColor, kFBPT_ColorRGB > FBPropertyColor
FBPropertyColor type definition.
FBPropertyDouble PlaySpeed
Read Write Property: Play Speed.
class K_DLLIMPORT FBPropertyBaseAnimatable< FBVector3d, kFBPT_Vector3D > FBPropertyAnimatableVector3d
FBPropertyAnimatableVector3D type definition.
FBPropertyMesh TessellatedMesh
Read Only Property: Tessellated Mesh for the model.
Property class: const char * (String).
FBPropertyMarkerType Type
Read Write Property: Type of model marker.
FBPropertyBool QuaternionInterpolate
Read Write Property: Use quaternion interpolation.
FBPropertyBool TranslationMaxZ
Read Write Property: Is model using Translation Limits on Max Z.
FBPropertyBool FreeRunning
Read Write Property: Free Running.
FBPropertyAnimatableVector3d Rotation
Read Write Property: Lcl rotation.
Remove the selected components from the current selection.
FBMarkerLook
Look of the marker.
A box is a fundamental building block in the application architecture.
K_DLLIMPORT void FBDestroyModelList(FBModelList *pModelList)
Delete a FBModelList object.
#define FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
FBPropertyBool RotationMinY
Read Write Property: Is model using Minimum Rotation Limits On Y?
PropertyList: ModelSkeleton.
K_DLLIMPORT FBModel * FBFindModelByUniqueColorId(const FBColor &pColor, int *pSubItemIndex=NULL)
Find a model in the scene by its unique color id.
FBPropertyBool RotationMaxZ
Read Write Property: Is model using Maximum Rotation Limits On Z?
FBPropertyMarkerResolutionLevel ResLevel
Read Write Property: Resolution level of model marker.
FBPropertyModelRotationOrder RotationOrder
Read Write Property: Rotation order.
K_DLLIMPORT void FBModelTransactionEnd()
FBModelTransactionEnd.
FBModelTransformationType
Types of transformation vector/matrices possible.
class K_DLLIMPORT FBPropertyBase< int, kFBPT_int > FBPropertyInt
Property: int
FBPropertyBool PointCacheRecord
Read Write Property: Record Point Cache for model? Not Savable
FBPropertyAnimatableVector3d Scaling
Read Write Property: Lcl scaling.
Toggle the current selection with the unselected components.
class K_DLLIMPORT FBVector3< double > FBVector3d
3D vector.
FBPropertyBool DrawLink
Read Write Property: Whether to draw link to parent node or not.
FBPropertyBool LinkFollowGeometryOffset
Read Write Property: Whether link to parent node must follow skeleton node or not, when skeleton node has a geometry offset.
class K_DLLIMPORT FBPropertyBase< FBTime, kFBPT_Time > FBPropertyTime
Property: FBTime
FBModelShadingMode
Modes for model shading.
#define FBSDK_DLL
Be sure that FBSDK_DLL is defined only once...
Add all components to the current selection.
FBPropertyColor Color
Read Write Property: Color of model marker.
FBPropertyBool TranslationActive
Read Write Property: Is model using Translation Limits?
FBPropertyBool BlendShapeDeformable
Read Write Property: Model blend-shape deformable. Not Savable
Declaration for the classes FBShaderManager, FBShader, FBPropertyListShader and other subclasses...
FBPropertyBool ReceiveShadows
Read Write Property: If true, the geometry will receive shadows.
#define __FBClassDeclareGroup(Name, Parent)
For internal use only.
Box with a sphere on one end.
MotionBuilder SDK base class.
FBModelHiercharyTraverserType
Types of hierarchy traverser search type.
FBPropertyBool TranslationMaxX
Read Write Property: Is model using Translation Limits on Max X.
FBPropertyBool RotationMaxX
Read Write Property: Is model using Maximum Rotation Limits On X?
class K_DLLIMPORT FBPropertyBase< FBVector3d, kFBPT_Vector3D > FBPropertyVector3d
FBPropertyVector3d type definition.
K_DLLIMPORT void FBBeginChangeAllModels()
Call begin change to all models (need to be closed).
FBPropertyBool IKSync
Read Write Property: Must sync with IK if true.
FBPropertyCluster Cluster
Read Only Property: Link Cluster for the model.
Replaces the current selection by the new selected components.
Remove all components from the current selection.
__FB_FORWARD(FBDeformer)
PropertyList: Texture
FBPropertyBool IsDeformable
Read Only Property: Is model deformable?
Lighted, shaded, textured shading.
FBPropertyAnimationNode AnimationNode
Read Only Property: Animation node of the model.
FBSkeletonLook
Look of the skeleton.
FBPropertyListTexture Textures
List: Textures with Special UseType (Other than "Color" which should connect to materials).
virtual void CustomModelDisplay(FBCamera *pCamera, FBModelShadingMode pShadingMode, FBModelRenderPass pRenderPass, float pPickingAreaWidth, float pPickingAreaHeight)
Custom display function, called when HasCustomDisplay returns true;.
AnimationNodeNotify evaluation information.
FBPropertyListShader Shaders
List: Shaders for model.
Contains routines for vector and matrix manipulation.
class K_DLLIMPORT FBVector2< double > FBVector2d
2D vector.
FBPropertyBool RotationMaxY
Read Write Property: Is model using Maximum Rotation Limits On Y?