1 #ifndef __FBGEOMETRY_H__
2 #define __FBGEOMETRY_H__
48 #define FBSDK_DLL K_DLLIMPORT
54 #ifdef FBSDKUseNamespace
191 bool GeometryBegin();
201 bool IsEditingEnabled()
const;
213 void VertexInit (
int pSize,
bool pResize,
bool pInitUV =
true,
bool pInitVertexColor =
false);
260 int VertexAdd (
double px,
double py,
double pz);
261 int VertexAdd (
double px,
double py,
double pz,
double nx,
double ny,
double nz);
262 int VertexAdd (
double px,
double py,
double pz,
double nx,
double ny,
double nz,
double UVu,
double UVv);
263 int VertexAdd (
double px,
double py,
double pz,
double nx,
double ny,
double nz,
double UVu,
double UVv,
double pRed,
double pGreen,
double pBlue,
double pAlpha);
270 bool VertexSet (
FBVertex pVertex,
int pIndex=-1);
279 bool VertexSet (
double px,
double py,
double pz,
int pIndex=-1);
286 bool VertexNormalSet(
FBNormal pVertex,
int pIndex=-1);
295 bool VertexNormalSet(
double px,
double py,
double pz,
int pIndex=-1);
303 bool VertexUVSet(
FBUV pUV,
int pIndex=-1);
311 bool VertexUVSet(
float pU,
float pV,
int pIndex=-1);
318 bool VertexColorSet(
FBColorF pColor,
int pIndex=-1);
328 bool VertexColorSet(
float pRed,
float pGreen,
float pBlue,
float pAlpha,
int pIndex=-1);
340 int VertexCount ()
const;
346 FBVertex VertexGet (
int pIndex)
const;
357 FBNormal VertexNormalGet(
int pIndex=-1)
const;
363 FBUV VertexUVGet(
int pIndex=-1)
const;
369 FBColorF VertexColorGet(
int pIndex=-1)
const;
389 bool VertexArrayInit (
int pVertexcount,
bool pUniqueMaterial,
unsigned int pFBGeometryArrayIDs = 0);
396 bool VertexArrayClear();
403 FBVertex* GetPositionsArray(
int& pOutArrayCount)
const;
413 int* GetNormalsIndexArray(
int& pOutArrayCount)
const;
420 FBNormal* GetNormalsDirectArray(
int& pOutArrayCount)
const;
430 int* GetTangentsIndexArray(
int& pOutArrayCount)
const;
437 FBNormal* GetTangentsDirectArray(
int& pOutArrayCount)
const;
447 int* GetBinormalsIndexArray(
int& pOutArrayCount)
const;
454 FBNormal* GetBinormalsDirectArray(
int& pOutArrayCount)
const;
464 int* GetVertexColorsIndexArray(
int& pOutArrayCount)
const;
471 FBColorF* GetVertexColorsDirectArray(
int& pOutArrayCount)
const;
496 int* GetUVSetIndexArray(
int& pOutArrayCount,
const char* pUVSetName =
NULL)
const;
504 FBUV* GetUVSetDirectArray(
int& pOutArrayCount,
const char* pUVSetName =
NULL)
const;
513 int* GetMaterialIndexArray(
int& pOutArrayCount)
const;
526 bool VertexGetSelected(
int pIndex);
533 bool VertexSetSelected(
int pIndex,
bool pState);
539 bool VertexGetVisible(
int pIndex);
546 bool VertexSetVisible(
int pIndex,
bool pState);
552 bool VertexGetTransformable(
int pIndex);
561 int ShapeGetCount()
const;
564 const char* ShapeGetName(
int pShapeIdx)
const;
570 int ShapeAdd(
const char* pName);
573 void ShapeClearAll();
580 void ShapeInit(
int pShapeIdx,
int pDiffSize,
bool pWithNormal =
false);
585 int ShapeGetDiffPointCount(
int pShapeIdx)
const;
593 bool ShapeSetDiffPoint(
int pShapeIdx,
int pDiffIndex,
int pOriIndex,
const FBVertex& pPosDiff);
602 bool ShapeSetDiffPoint(
int pShapeIdx,
int pDiffIndex,
int pOriIndex,
const FBVertex& pPosDiff,
const FBNormal& pNormalDiff);
610 bool ShapeGetDiffPoint(
int pShapeIdx,
int pDiffIndex,
int& pOriIndex,
FBVertex& pPosDiff)
const;
619 bool ShapeGetDiffPoint(
int pShapeIdx,
int pDiffIndex,
int& pOriIndex,
FBVertex& pPosDiff,
FBNormal& pNormalDiff)
const;
662 bool TriangleListAdd(
int pIndexArraySize,
int* pIndexArray,
int pMaterialId=0);
672 bool TriangleStripAdd(
int pIndexArraySize,
int* pIndexArray,
int pMaterialId=0);
683 bool PolygonListAdd(
int pPolygonSize,
int pIndexArraySize,
int* pIndexArray,
int pMaterialId=0);
689 int PolygonBegin(
int pMaterialId=0);
695 bool PolygonVertexAdd(
int pVertex);
708 int PolygonVertexCount(
int pPolygonIndex)
const;
715 int PolygonVertexIndex(
int pPolygonIndex,
int pVertexPolygonIndex)
const;
720 int PolygonCount()
const;
731 const int* PolygonVertexArrayGet(
int& pArraySize)
const;
736 bool IsTriangleMesh()
const;
742 int PolygonMaterialIdGet(
int pIndex=-1)
const;
747 void ComputeVertexNormals(
bool pCW =
false);
750 void InverseNormal();
793 virtual void SurfaceBegin();
794 virtual void SurfaceEnd();
795 virtual void SurfaceEditBegin();
796 virtual void SurfaceEditEnd();
797 virtual bool GetSurfaceCapped(
int pUorV,
int pDirection );
798 virtual int GetVertexCount(
int pUorVorGlobal = -1 );
799 virtual void ControlPointsBegin() = 0;
800 virtual void SetControlPoint(
int pIndex,
double pX,
double pY,
double pZ,
double pW );
801 virtual void GetControlPoint(
int pIndex,
double &pX,
double &pY,
double &pZ,
double &pW );
802 virtual void ControlPointsEnd();
809 bool VertexGetSelected(
int pU,
int pV);
816 bool VertexSetSelected(
int pU,
int pV,
bool pState);
823 bool VertexGetVisible(
int pU,
int pV);
831 bool VertexSetVisible(
int pU,
int pV,
bool pState);
838 bool VertexGetTransformable(
int pU,
int pV);
850 void FBSurfaceInitProperties();
882 virtual void SurfaceBegin();
886 virtual void SurfaceEnd();
890 virtual void SurfaceEditBegin();
893 virtual void SurfaceEditEnd();
896 virtual void ControlPointsBegin();
899 virtual void ControlPointsEnd();
904 virtual void SetControlWeight(
int pIndex,
double pWeight );
909 virtual double GetControlWeight(
int pIndex );
915 virtual void SetControlMultiplicity(
int pUorV,
int pIndex,
int pMultiplicity );
920 virtual int GetControlMultiplicity(
int pUorV,
int pIndex );
926 virtual void SetControlKnotValue(
int pUorV,
int pIndex,
double pKnotValue );
931 virtual double GetControlKnotValue(
int pUorV,
int pIndex );
936 virtual int GetKnotCount(
int pUorV );
944 void FBNurbsInitProperties();
966 virtual void SurfaceBegin();
970 virtual void SurfaceEnd();
974 virtual void SurfaceEditBegin();
978 virtual void SurfaceEditEnd();
982 virtual void ControlPointsBegin();
985 virtual void ControlPointsEnd();
992 void FBPatchInitProperties();
996 #ifdef FBSDKUseNamespace
FBPropertyBool VClosed
Read Write Property: V Closed
FBPropertyGeometryReferenceMode BinormalReferenceMode
Read Only Property: Binormal reference mode.
#define __FBClassDeclare(Name, Parent)
For internal use only.
FBPropertyGeometryMappingMode TangentMappingMode
Read Only Property: Tangent mapping mode.
FBGeometryArrayElementType
Type of data when requesting an array.
#define FB_DEFINE_COMPONENT(DllTag, Type)
Define a component and give it the ability to be a property.
class FBVector4< float > FBVertex
Vertex.
FBPropertyInt VStep
Read Write Property: Step in V directions.
mapping mode request from associated shading network change.
FBSurfaceMode
Surface modes.
FBGeometryReferenceMode
Determine how the mapping information is stored in the array of coordinate.
#define FBSDK_DLL
Be sure that FBSDK_DLL is defined only once...
class FBPropertyBase< int, kFBPT_int > FBPropertyInt
Property: int
FBPropertyGeometryMappingMode MaterialMappingMode
Read Property: Material mapping mode.
FBPropertyGeometryMappingMode VertexColorMappingMode
Read Only Property: Vertex Color mapping mode.
FBGeometryMappingMode
Determine how the element is mapped on a surface.
Contains definitions for devices, boxes and models.
FBSurfaceType
Surface types.
Each element is an array of 4 float.
#define FB_DEFINE_ENUM(DllTag, Type)
Define an enum and give it the ability to be a property.
class FBPropertyBaseEnum< enum FBSurfaceType > FBPropertySurfaceType
FBPropertyBool UClosed
Read Write Property: U Closed.
FBPropertyGeometryMappingMode NormalMappingMode
Read Only Property: Normal mapping mode.
class FBPropertyBaseEnum< enum FBGeometryMappingMode > FBPropertyGeometryMappingMode
class FBPropertyBaseEnum< enum FBGeometryReferenceMode > FBPropertyGeometryReferenceMode
FBPropertySurfaceType VSurfaceType
Read Write Property: Patch mode for V direction.
FBPropertyGeometryReferenceMode NormalReferenceMode
Read Only Property: Normal reference mode.
ID to the Binormal array.
FBPropertySurfaceType USurfaceType
Read Write Property: Patch mode for U direction.
#define __FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
FBPropertyInt VSize
Read Write Property: Size in V directions.
FBPropertyInt USize
Read Write Property: Size in U directions.
FBPropertySurfaceMode SurfaceMode
Read Write Property: Surface mode.
#define FBSDKNamespace
FBSDKNamespace define.
FBPropertyGeometryReferenceMode VertexColorReferenceMode
Read Only Property: Vertex Color reference mode.
Each element is an array of 3 float.
class FBPropertyBaseEnum< enum FBNurbType > FBPropertyNurbType
ID to the Normal by Point array.
MotionBuilder SDK base class.
class FBVector4< float > FBNormal
Normal.
FBGeometryArrayID
ID to use when requesting a specific array of data for a model.
FBPropertyInt VOrder
Read Write Property: Nurbs V order.
High quality, no normals.
FBPropertyNurbType VNurbType
Read Write Property: Nurbs Type for V direction.
FBPropertyInt UStep
Read Write Property: Step in U directions.
only control point's position & normal change, so only update those values in the strip...
class FBVector2< float > FBUV
Represents a UV coordinate as a FBVector2 of floats in the range of 0.0f to 1.0f; value 0 is the U va...
control point add/remove, topology change, cluster/shape change and such events requiring regenerate ...
ID to the Vertex Color Array.
FBPropertyGeometryReferenceMode TangentReferenceMode
Read Only Property: Tangent reference mode.
class FBPropertyBaseEnum< enum FBSurfaceMode > FBPropertySurfaceMode
FBPropertyNurbType UNurbType
Read Write Property: Nurbs Type for U direction.
FBPropertyInt UOrder
Read Write Property: Nurbs U order.
class FBVector4< float > FBColorF
Color float.
FBPropertyGeometryMappingMode BinormalMappingMode
Read Only Property: Binormal mapping mode.
class FBPropertyBase< bool, kFBPT_bool > FBPropertyBool
Property: bool