1 #ifndef __FBGEOMETRY_H__
2 #define __FBGEOMETRY_H__
48 #define FBSDK_DLL K_DLLIMPORT
54 #ifdef FBSDKUseNamespace
198 bool GeometryBegin();
208 bool IsEditingEnabled()
const;
220 void VertexInit (
int pSize,
bool pResize,
bool pInitUV =
true,
bool pInitVertexColor =
false);
267 int VertexAdd (
double px,
double py,
double pz);
268 int VertexAdd (
double px,
double py,
double pz,
double nx,
double ny,
double nz);
269 int VertexAdd (
double px,
double py,
double pz,
double nx,
double ny,
double nz,
double UVu,
double UVv);
270 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);
277 bool VertexSet (
FBVertex pVertex,
int pIndex=-1);
286 bool VertexSet (
double px,
double py,
double pz,
int pIndex=-1);
293 bool VertexNormalSet(
FBNormal pVertex,
int pIndex=-1);
302 bool VertexNormalSet(
double px,
double py,
double pz,
int pIndex=-1);
310 bool VertexUVSet(
FBUV pUV,
int pIndex=-1);
318 bool VertexUVSet(
float pU,
float pV,
int pIndex=-1);
325 bool VertexColorSet(
FBColorF pColor,
int pIndex=-1);
335 bool VertexColorSet(
float pRed,
float pGreen,
float pBlue,
float pAlpha,
int pIndex=-1);
347 int VertexCount ()
const;
353 FBVertex VertexGet (
int pIndex)
const;
364 FBNormal VertexNormalGet(
int pIndex=-1)
const;
370 FBUV VertexUVGet(
int pIndex=-1)
const;
376 FBColorF VertexColorGet(
int pIndex=-1)
const;
396 bool VertexArrayInit (
int pVertexcount,
bool pUniqueMaterial,
unsigned int pFBGeometryArrayIDs = 0);
403 bool VertexArrayClear();
410 FBVertex* GetPositionsArray(
int& pOutArrayCount)
const;
420 int* GetNormalsIndexArray(
int& pOutArrayCount)
const;
427 FBNormal* GetNormalsDirectArray(
int& pOutArrayCount)
const;
437 int* GetTangentsIndexArray(
int& pOutArrayCount)
const;
444 FBNormal* GetTangentsDirectArray(
int& pOutArrayCount)
const;
454 int* GetBinormalsIndexArray(
int& pOutArrayCount)
const;
461 FBNormal* GetBinormalsDirectArray(
int& pOutArrayCount)
const;
471 int* GetVertexColorsIndexArray(
int& pOutArrayCount)
const;
478 FBColorF* GetVertexColorsDirectArray(
int& pOutArrayCount)
const;
503 int* GetUVSetIndexArray(
int& pOutArrayCount,
const char* pUVSetName =
NULL)
const;
511 FBUV* GetUVSetDirectArray(
int& pOutArrayCount,
const char* pUVSetName =
NULL)
const;
520 int* GetMaterialIndexArray(
int& pOutArrayCount)
const;
533 bool VertexGetSelected(
int pIndex);
540 bool VertexSetSelected(
int pIndex,
bool pState);
546 bool VertexGetVisible(
int pIndex);
553 bool VertexSetVisible(
int pIndex,
bool pState);
559 bool VertexGetTransformable(
int pIndex);
568 int ShapeGetCount()
const;
571 const char* ShapeGetName(
int pShapeIdx)
const;
577 int ShapeAdd(
const char* pName);
580 void ShapeClearAll();
587 void ShapeInit(
int pShapeIdx,
int pDiffSize,
bool pWithNormal =
false);
592 int ShapeGetDiffPointCount(
int pShapeIdx)
const;
600 bool ShapeSetDiffPoint(
int pShapeIdx,
int pDiffIndex,
int pOriIndex,
const FBVertex& pPosDiff);
609 bool ShapeSetDiffPoint(
int pShapeIdx,
int pDiffIndex,
int pOriIndex,
const FBVertex& pPosDiff,
const FBNormal& pNormalDiff);
617 bool ShapeGetDiffPoint(
int pShapeIdx,
int pDiffIndex,
int& pOriIndex,
FBVertex& pPosDiff)
const;
626 bool ShapeGetDiffPoint(
int pShapeIdx,
int pDiffIndex,
int& pOriIndex,
FBVertex& pPosDiff,
FBNormal& pNormalDiff)
const;
669 bool TriangleListAdd(
int pIndexArraySize,
int* pIndexArray,
int pMaterialId=0);
679 bool TriangleStripAdd(
int pIndexArraySize,
int* pIndexArray,
int pMaterialId=0);
690 bool PolygonListAdd(
int pPolygonSize,
int pIndexArraySize,
int* pIndexArray,
int pMaterialId=0);
696 int PolygonBegin(
int pMaterialId=0);
702 bool PolygonVertexAdd(
int pVertex);
715 int PolygonVertexCount(
int pPolygonIndex)
const;
722 int PolygonVertexIndex(
int pPolygonIndex,
int pVertexPolygonIndex)
const;
727 int PolygonCount()
const;
738 const int* PolygonVertexArrayGet(
int& pArraySize)
const;
743 bool IsTriangleMesh()
const;
749 int PolygonMaterialIdGet(
int pIndex=-1)
const;
754 void ComputeVertexNormals(
bool pCW =
false);
757 void InverseNormal();
800 virtual void SurfaceBegin();
801 virtual void SurfaceEnd();
802 virtual void SurfaceEditBegin();
803 virtual void SurfaceEditEnd();
804 virtual bool GetSurfaceCapped(
int pUorV,
int pDirection );
805 virtual int GetVertexCount(
int pUorVorGlobal = -1 );
806 virtual void ControlPointsBegin() = 0;
807 virtual void SetControlPoint(
int pIndex,
double pX,
double pY,
double pZ,
double pW );
808 virtual void GetControlPoint(
int pIndex,
double &pX,
double &pY,
double &pZ,
double &pW );
809 virtual void ControlPointsEnd();
816 bool VertexGetSelected(
int pU,
int pV);
823 bool VertexSetSelected(
int pU,
int pV,
bool pState);
830 bool VertexGetVisible(
int pU,
int pV);
838 bool VertexSetVisible(
int pU,
int pV,
bool pState);
845 bool VertexGetTransformable(
int pU,
int pV);
857 void FBSurfaceInitProperties();
889 virtual void SurfaceBegin();
893 virtual void SurfaceEnd();
897 virtual void SurfaceEditBegin();
900 virtual void SurfaceEditEnd();
903 virtual void ControlPointsBegin();
906 virtual void ControlPointsEnd();
911 virtual void SetControlWeight(
int pIndex,
double pWeight );
916 virtual double GetControlWeight(
int pIndex );
922 virtual void SetControlMultiplicity(
int pUorV,
int pIndex,
int pMultiplicity );
927 virtual int GetControlMultiplicity(
int pUorV,
int pIndex );
933 virtual void SetControlKnotValue(
int pUorV,
int pIndex,
double pKnotValue );
938 virtual double GetControlKnotValue(
int pUorV,
int pIndex );
943 virtual int GetKnotCount(
int pUorV );
951 void FBNurbsInitProperties();
973 virtual void SurfaceBegin();
977 virtual void SurfaceEnd();
981 virtual void SurfaceEditBegin();
985 virtual void SurfaceEditEnd();
989 virtual void ControlPointsBegin();
992 virtual void ControlPointsEnd();
999 void FBPatchInitProperties();
1003 #ifdef FBSDKUseNamespace
class FBPropertyBaseEnum< enum FBGeometryMappingMode > FBPropertyGeometryMappingMode
FBPropertyBool VClosed
Read Write Property: V Closed
#define __FBClassDeclare(Name, Parent)
For internal use only.
FBPropertySurfaceType USurfaceType
Read Write Property: Patch mode for U direction.
#define FB_DEFINE_COMPONENT(DllTag, Type)
Define a component and give it the ability to be a property.
Each element is an array of 3 float.
ID to the Binormal array.
FBPropertyInt VStep
Read Write Property: Step in V directions.
ID to the Normal by Point array.
FBGeometryArrayID
ID to use when requesting a specific array of data for a model.
#define FBSDK_DLL
Be sure that FBSDK_DLL is defined only once...
FBPropertyGeometryMappingMode BinormalMappingMode
Read Only Property: Binormal mapping mode.
class FBPropertyBaseEnum< enum FBNurbType > FBPropertyNurbType
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...
FBPropertySurfaceType VSurfaceType
Read Write Property: Patch mode for V direction.
FBPropertyGeometryReferenceMode VertexColorReferenceMode
Read Only Property: Vertex Color reference mode.
only control point's position & normal change, so only update those values in the strip...
control point add/remove, topology change, cluster/shape change and such events requiring regenerate ...
Contains definitions for devices, boxes and models.
High quality, no normals.
class FBVector4< float > FBNormal
Normal.
class FBPropertyBaseEnum< enum FBSurfaceMode > FBPropertySurfaceMode
FBPropertyGeometryMappingMode MaterialMappingMode
Read Property: Material mapping mode.
FBPropertyGeometryMappingMode NormalMappingMode
Read Only Property: Normal mapping mode.
#define FB_DEFINE_ENUM(DllTag, Type)
Define an enum and give it the ability to be a property.
MotionBuilder SDK base class.
FBPropertyBool UClosed
Read Write Property: U Closed.
FBPropertyInt VOrder
Read Write Property: Nurbs V order.
FBPropertyGeometryReferenceMode NormalReferenceMode
Read Only Property: Normal reference mode.
class FBPropertyBase< bool, kFBPT_bool > FBPropertyBool
Property: bool
ID to the Vertex Color Array.
FBPropertyNurbType VNurbType
Read Write Property: Nurbs Type for V direction.
FBGeometryArrayElementType
Type of data when requesting an array.
class FBVector4< float > FBVertex
Vertex.
class FBVector4< float > FBColorF
Color float.
#define __FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
FBPropertyGeometryReferenceMode TangentReferenceMode
Read Only Property: Tangent reference mode.
FBPropertyInt VSize
Read Write Property: Size in V directions.
FBSurfaceMode
Surface modes.
FBPropertyInt USize
Read Write Property: Size in U directions.
#define FBSDKNamespace
FBSDKNamespace define.
FBPropertySurfaceMode SurfaceMode
Read Write Property: Surface mode.
FBGeometryMappingMode
Determine how the element is mapped on a surface.
FBPropertyNurbType UNurbType
Read Write Property: Nurbs Type for U direction.
mapping mode request from associated shading network change.
FBPropertyInt UOrder
Read Write Property: Nurbs U order.
#define K_DEPRECATED_2014
Each element is an array of 4 float.
class FBPropertyBaseEnum< enum FBSurfaceType > FBPropertySurfaceType
FBPropertyInt UStep
Read Write Property: Step in U directions.
FBGeometryReferenceMode
Determine how the mapping information is stored in the array of coordinate.
class FBPropertyBaseEnum< enum FBGeometryReferenceMode > FBPropertyGeometryReferenceMode
class FBPropertyBase< int, kFBPT_int > FBPropertyInt
Property: int
FBSurfaceType
Surface types.
const int kFBGeometryArrayID_VertexColor
const int kFBGeometryArrayID_NormalByPoint
FBPropertyGeometryMappingMode TangentMappingMode
Read Only Property: Tangent mapping mode.
FBPropertyGeometryReferenceMode BinormalReferenceMode
Read Only Property: Binormal reference mode.
FBPropertyGeometryMappingMode VertexColorMappingMode
Read Only Property: Vertex Color mapping mode.