Open Reality Reference Guide
fbgeometry.h
Go to the documentation of this file.
1 #ifndef __FBGEOMETRY_H__
2 #define __FBGEOMETRY_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 
54 #ifdef FBSDKUseNamespace
55 namespace FBSDKNamespace {
56 #endif
57 
58  FB_DEFINE_COMPONENT( FBSDK_DLL, Geometry );
60 
61  enum FBGeometryPrimitiveType
62  {
63  kFBGeometry_POINTS = 0x0000, //GL_POINTS,
64  kFBGeometry_LINES = 0x0001, //GL_LINES,
65  kFBGeometry_LINE_LOOP = 0x0002, //GL_LINE_LOOP,
66  kFBGeometry_LINE_STRIP = 0x0003, //GL_LINE_STRIP,
67  kFBGeometry_TRIANGLES = 0x0004, //GL_TRIANGLES,
68  kFBGeometry_TRIANGLE_STRIP = 0x0005, //GL_TRIANGLE_STRIP,
69  kFBGeometry_TRIANGLE_FAN = 0x0006, //GL_TRIANGLE_FAN,
70  kFBGeometry_QUADS = 0x0007, //GL_QUADS,
71  kFBGeometry_QUADS_STRIP = 0x0008, //GL_QUAD_STRIP,
72  kFBGeometry_POLYGON = 0x0009, //GL_POLYGON,
73  };
74 
77  {
82  kFBGeometryArrayID_Color = 1 << 4
83  };
84 
87  kFBGeometryArrayElementType_Unknown,
88  kFBGeometryArrayElementType_Integer,
89  kFBGeometryArrayElementType_Float,
90  kFBGeometryArrayElementType_Float2,
93  kFBGeometryArrayElementType_FloatMatrix4x4,
94  kFBGeometryArrayElementType_IntegerArrayPointer
95  };
96 
98  // FBGeometry
101 
102 
114  {
115  kFBGeometryMapping_NONE,
116  kFBGeometryMapping_BY_CONTROL_POINT,
117  kFBGeometryMapping_BY_POLYGON_VERTEX,
118  kFBGeometryMapping_BY_POLYGON,
119  kFBGeometryMapping_BY_EDGE,
120  kFBGeometryMapping_ALL_SAME
121  } ;
122 
135  {
136  kFBGeometryReference_DIRECT,
137  kFBGeometryReference_INDEX,
138  kFBGeometryReference_INDEX_TO_DIRECT
139  };
140 
141  FB_DEFINE_ENUM( FBSDK_DLL, GeometryMappingMode );
142  FB_DEFINE_ENUM( FBSDK_DLL, GeometryReferenceMode );
143 
145  {
152  };
153 
170 
171  protected:
176  FBGeometry(const char* pName, HIObject pObject=NULL);
177 
178  public:
187 
192 
196  bool GeometryEnd();
197 
201  bool IsEditingEnabled() const;
203 
213  void VertexInit (int pSize, bool pResize, bool pInitUV = true, bool pInitVertexColor = false);
214 
220  bool VertexClear ();
221 
227  int VertexAdd (FBVertex pVertex);
228 
234  int VertexAdd (FBVertex pVertex, FBNormal pNormal);
235 
242  int VertexAdd (FBVertex pVertex, FBNormal pNormal, FBUV pUV);
243 
251  int VertexAdd (FBVertex pVertex, FBNormal pNormal, FBUV pUV, FBColorF pVertexColor);
252 
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);
264 
270  bool VertexSet (FBVertex pVertex,int pIndex=-1);
271 
279  bool VertexSet (double px, double py, double pz,int pIndex=-1);
280 
286  bool VertexNormalSet(FBNormal pVertex,int pIndex=-1);
287 
295  bool VertexNormalSet(double px, double py, double pz,int pIndex=-1);
296 
297 
303  bool VertexUVSet(FBUV pUV, int pIndex=-1);
304 
311  bool VertexUVSet(float pU, float pV, int pIndex=-1);
312 
318  bool VertexColorSet(FBColorF pColor, int pIndex=-1);
319 
328  bool VertexColorSet(float pRed, float pGreen, float pBlue, float pAlpha, int pIndex=-1);
329 
331 
336 
340  int VertexCount () const;
341 
346  FBVertex VertexGet (int pIndex) const;
347 
352 
357  FBNormal VertexNormalGet(int pIndex=-1) const;
358 
363  FBUV VertexUVGet(int pIndex=-1) const;
364 
369  FBColorF VertexColorGet(int pIndex=-1) const;
370 
372 
373 
378 
389  bool VertexArrayInit (int pVertexcount, bool pUniqueMaterial, unsigned int pFBGeometryArrayIDs = 0);
390 
397 
403  FBVertex* GetPositionsArray(int& pOutArrayCount) const;
404 
405  FBPropertyGeometryMappingMode NormalMappingMode;
406  FBPropertyGeometryReferenceMode NormalReferenceMode;
407 
413  int* GetNormalsIndexArray(int& pOutArrayCount) const;
414 
420  FBNormal* GetNormalsDirectArray(int& pOutArrayCount) const;
421 
422  FBPropertyGeometryMappingMode TangentMappingMode;
423  FBPropertyGeometryReferenceMode TangentReferenceMode;
424 
430  int* GetTangentsIndexArray(int& pOutArrayCount) const;
431 
437  FBNormal* GetTangentsDirectArray(int& pOutArrayCount) const;
438 
439  FBPropertyGeometryMappingMode BinormalMappingMode;
440  FBPropertyGeometryReferenceMode BinormalReferenceMode;
441 
447  int* GetBinormalsIndexArray(int& pOutArrayCount) const;
448 
454  FBNormal* GetBinormalsDirectArray(int& pOutArrayCount) const;
455 
456  FBPropertyGeometryMappingMode VertexColorMappingMode;
457  FBPropertyGeometryReferenceMode VertexColorReferenceMode;
458 
464  int* GetVertexColorsIndexArray(int& pOutArrayCount) const;
465 
471  FBColorF* GetVertexColorsDirectArray(int& pOutArrayCount) const;
472 
477 
482  FBGeometryMappingMode GetUVSetMappingMode(const char* pUVSetName = NULL) const;
483 
488  FBGeometryReferenceMode GetUVSetReferenceMode(const char* pUVSetName = NULL) const;
489 
496  int* GetUVSetIndexArray(int& pOutArrayCount, const char* pUVSetName = NULL) const;
497 
504  FBUV* GetUVSetDirectArray(int& pOutArrayCount, const char* pUVSetName = NULL) const;
505 
506  FBPropertyGeometryMappingMode MaterialMappingMode;
507 
513  int* GetMaterialIndexArray(int& pOutArrayCount) const;
515 
516 
521 
526  bool VertexGetSelected(int pIndex);
527 
533  bool VertexSetSelected(int pIndex,bool pState);
534 
539  bool VertexGetVisible(int pIndex);
540 
546  bool VertexSetVisible(int pIndex,bool pState);
547 
552  bool VertexGetTransformable(int pIndex);
554 
559 
561  int ShapeGetCount() const;
562 
564  const char* ShapeGetName(int pShapeIdx) const;
565 
570  int ShapeAdd(const char* pName);
571 
574 
580  void ShapeInit(int pShapeIdx, int pDiffSize, bool pWithNormal = false);
581 
585  int ShapeGetDiffPointCount(int pShapeIdx) const;
586 
593  bool ShapeSetDiffPoint(int pShapeIdx, int pDiffIndex, int pOriIndex, const FBVertex& pPosDiff);
594 
602  bool ShapeSetDiffPoint(int pShapeIdx, int pDiffIndex, int pOriIndex, const FBVertex& pPosDiff, const FBNormal& pNormalDiff);
603 
610  bool ShapeGetDiffPoint(int pShapeIdx, int pDiffIndex, int& pOriIndex, FBVertex& pPosDiff) const;
611 
619  bool ShapeGetDiffPoint(int pShapeIdx, int pDiffIndex, int& pOriIndex, FBVertex& pPosDiff, FBNormal& pNormalDiff) const;
620 
622 
627 
633  void ModifyNotify( kFBGeometryUpdateFlags pFlags=kFBGeometryUpdateAll, int pFirstIndex=-1, int pLastIndex=-1 );
634 
636  };
637 
639  // FBMesh
641  __FB_FORWARD( FBMesh );
642 
644  class FBSDK_DLL FBMesh : public FBGeometry {
646 
647  public:
652  FBMesh(const char* pName, HIObject pObject=NULL);
653 
662  bool TriangleListAdd(int pIndexArraySize, int* pIndexArray, int pMaterialId=0);
663 
672  bool TriangleStripAdd(int pIndexArraySize, int* pIndexArray, int pMaterialId=0);
673 
683  bool PolygonListAdd(int pPolygonSize, int pIndexArraySize, int* pIndexArray, int pMaterialId=0);
684 
689  int PolygonBegin(int pMaterialId=0);
690 
695  bool PolygonVertexAdd(int pVertex);
696 
702  int PolygonEnd();
703 
708  int PolygonVertexCount(int pPolygonIndex) const;
709 
715  int PolygonVertexIndex(int pPolygonIndex, int pVertexPolygonIndex) const;
716 
720  int PolygonCount() const;
721 
731  const int* PolygonVertexArrayGet(int& pArraySize) const;
732 
736  bool IsTriangleMesh() const;
737 
742  int PolygonMaterialIdGet(int pIndex=-1) const;
743 
747  void ComputeVertexNormals(bool pCW = false);
748 
751  };
752 
754  // FBSurface
757 
760  {
766  };
767  FB_DEFINE_ENUM( FBSDK_DLL, SurfaceMode );
768 
771  {
777  };
778  FB_DEFINE_ENUM( FBSDK_DLL, SurfaceType );
779 
780 
783  {
785 
786  public:
791  FBSurface(const char* pName, HIObject pObject=NULL);
792 
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();
803 
809  bool VertexGetSelected(int pU,int pV);
816  bool VertexSetSelected(int pU,int pV,bool pState);
817 
823  bool VertexGetVisible(int pU,int pV);
824 
831  bool VertexSetVisible(int pU,int pV,bool pState);
832 
838  bool VertexGetTransformable(int pU,int pV);
839 
840 
847  FBPropertySurfaceMode SurfaceMode;
848 
849  private:
850  void FBSurfaceInitProperties();
851  };
852 
855  {
859  };
860  FB_DEFINE_ENUM( FBSDK_DLL, NurbType );
861 
862 
864  // FBNurbs
867 
869  class FBSDK_DLL FBNurbs : public FBSurface
870  {
872 
873  public:
878  FBNurbs(const char* pName, HIObject pObject=NULL);
879 
882  virtual void SurfaceBegin() override;
883 
886  virtual void SurfaceEnd() override;
887 
890  virtual void SurfaceEditBegin() override;
893  virtual void SurfaceEditEnd() override;
896  virtual void ControlPointsBegin() override;
899  virtual void ControlPointsEnd() override;
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 );
937 
940  FBPropertyNurbType UNurbType;
941  FBPropertyNurbType VNurbType;
942 
943  private:
944  void FBNurbsInitProperties();
945  };
946 
948  // FBPatch
951 
953  class FBSDK_DLL FBPatch : public FBSurface
954  {
956 
957  public:
962  FBPatch(const char* pName, HIObject pObject=NULL);
963 
966  virtual void SurfaceBegin() override;
967 
970  virtual void SurfaceEnd() override;
971 
974  virtual void SurfaceEditBegin() override;
975 
978  virtual void SurfaceEditEnd() override;
979 
982  virtual void ControlPointsBegin() override;
985  virtual void ControlPointsEnd() override;
986 
987 
988  FBPropertySurfaceType USurfaceType;
989  FBPropertySurfaceType VSurfaceType;
990 
991  private:
992  void FBPatchInitProperties();
993 
994  };
995 
996 #ifdef FBSDKUseNamespace
997 }
998 #endif
999 #endif
FBGeometry::VertexNormalSet
bool VertexNormalSet(FBNormal pVertex, int pIndex=-1)
Set a normal at a vertex.
FBVertex
class K_DLLIMPORT FBVector4< float > FBVertex
Vertex.
Definition: fbtypes.h:597
FBGeometry::GetUVSetDirectArray
FBUV * GetUVSetDirectArray(int &pOutArrayCount, const char *pUVSetName=NULL) const
Get a pointer to the direct array of UVset Modify array value will be only effective when geometry ed...
FBGeometry::VertexUVGet
FBUV VertexUVGet(int pIndex=-1) const
Get a UV coordinate.
FBSurface::UStep
FBPropertyInt UStep
Read Write Property: Step in U directions.
Definition: fbgeometry.h:843
FBGeometry::ShapeClearAll
void ShapeClearAll()
Clears all the shapes.
kFBGeometryUpdateAll
@ kFBGeometryUpdateAll
control point add/remove, topology change, cluster/shape change and such events requiring regenerate ...
Definition: fbgeometry.h:147
FBGeometry::GetVertexColorsDirectArray
FBColorF * GetVertexColorsDirectArray(int &pOutArrayCount) const
Get a pointer to the direct array of vertex color.
FBSurface::FBSurface
FBSurface(const char *pName, HIObject pObject=NULL)
Constructor.
FBSDK_DLL
#define FBSDK_DLL
Be sure that FBSDK_DLL is defined only once...
Definition: fbgeometry.h:48
FBGeometry::GetUVSetMappingMode
FBGeometryMappingMode GetUVSetMappingMode(const char *pUVSetName=NULL) const
Get UVSet mapping mode.
FBMesh::ComputeVertexNormals
void ComputeVertexNormals(bool pCW=false)
Compute Mesh Vertex Normal.
kFBGeometryUpdateNone
@ kFBGeometryUpdateNone
no update done
Definition: fbgeometry.h:146
FB_DEFINE_ENUM
#define FB_DEFINE_ENUM(DllTag, Type)
Define an enum and give it the ability to be a property.
Definition: fbproperties.h:150
FBGeometry::GetVertexColorsIndexArray
int * GetVertexColorsIndexArray(int &pOutArrayCount) const
Get a pointer to the index array of vertex color.
kFBGeometryUpdatePositionAndNormal
@ kFBGeometryUpdatePositionAndNormal
only control point's position & normal change, so only update those values in the strip.
Definition: fbgeometry.h:148
FBGeometry::VertexGet
FBVertex VertexGet(int pIndex) const
Get a vertex.
FBGeometry::VertexColorSet
bool VertexColorSet(FBColorF pColor, int pIndex=-1)
Set a Vertex Color.
FBGeometry::GetTangentsIndexArray
int * GetTangentsIndexArray(int &pOutArrayCount) const
Get a pointer to the index array of tangents.
FBGeometry::VertexAdd
int VertexAdd(FBVertex pVertex, FBNormal pNormal, FBUV pUV)
Add a vertex.
FBGeometry::NormalMappingMode
FBPropertyGeometryMappingMode NormalMappingMode
Read Only Property: Normal mapping mode.
Definition: fbgeometry.h:405
kFBSurfaceTypeBezier
@ kFBSurfaceTypeBezier
Bezier surface.
Definition: fbgeometry.h:772
FBPropertyInt
class K_DLLIMPORT FBPropertyBase< int, kFBPT_int > FBPropertyInt
Property: int
Definition: fbproperties.h:1331
FBSurface::VSize
FBPropertyInt VSize
Read Write Property: Size in V directions.
Definition: fbgeometry.h:842
FBGeometry::VertexSetSelected
bool VertexSetSelected(int pIndex, bool pState)
Set the selected state of a vertex.
FBGeometry::VertexSet
bool VertexSet(double px, double py, double pz, int pIndex=-1)
Set a vertex.
FBNurbs::FBNurbs
FBNurbs(const char *pName, HIObject pObject=NULL)
Constructor.
FBNurbs::VNurbType
FBPropertyNurbType VNurbType
Read Write Property: Nurbs Type for V direction.
Definition: fbgeometry.h:941
FBSurface::UClosed
FBPropertyBool UClosed
Read Write Property: U Closed.
Definition: fbgeometry.h:845
kFBSurfaceModeHigh
@ kFBSurfaceModeHigh
High quality.
Definition: fbgeometry.h:765
FBNurbs::GetControlWeight
virtual double GetControlWeight(int pIndex)
Get weight of control point.
FBGeometry::VertexClear
bool VertexClear()
Clear all Vertex arrays.
FBGeometry::ShapeSetDiffPoint
bool ShapeSetDiffPoint(int pShapeIdx, int pDiffIndex, int pOriIndex, const FBVertex &pPosDiff)
Set the differentiate point.
FBGeometry::VertexGetVisible
bool VertexGetVisible(int pIndex)
Get the visible state of a vertex.
FBStringList
String list.
Definition: fbstring.h:208
FBGeometry::ShapeGetName
const char * ShapeGetName(int pShapeIdx) const
Return the shape Name.
FBGeometryReferenceMode
FBGeometryReferenceMode
Determine how the mapping information is stored in the array of coordinate.
Definition: fbgeometry.h:135
FBMesh::FBMesh
FBMesh(const char *pName, HIObject pObject=NULL)
Constructor.
kFBGeometryArrayElementType_Float4
@ kFBGeometryArrayElementType_Float4
Each element is an array of 4 float.
Definition: fbgeometry.h:92
kFBSurfaceTypeLinear
@ kFBSurfaceTypeLinear
Linear surface.
Definition: fbgeometry.h:776
FBSurfaceMode
FBSurfaceMode
Surface modes.
Definition: fbgeometry.h:760
FBColorF
class K_DLLIMPORT FBVector4< float > FBColorF
Color float.
Definition: fbtypes.h:444
FBMesh
Mesh class.
Definition: fbgeometry.h:644
FBSurface::VStep
FBPropertyInt VStep
Read Write Property: Step in V directions.
Definition: fbgeometry.h:844
FBMesh::InverseNormal
void InverseNormal()
Inverse Normal.
FBGeometry::GetVertexes
FBVertex * GetVertexes() const
Get a pointer to the array of vertexes.
FBGeometry::GetUVSetReferenceMode
FBGeometryReferenceMode GetUVSetReferenceMode(const char *pUVSetName=NULL) const
Get UVSet reference mode.
FBNurbs::GetKnotCount
virtual int GetKnotCount(int pUorV)
Number of knot vectors.
FBGeometry::ModifyNotify
void ModifyNotify(kFBGeometryUpdateFlags pFlags=kFBGeometryUpdateAll, int pFirstIndex=-1, int pLastIndex=-1)
The geometry has change, update the necessary flags.
FBNurbs::UOrder
FBPropertyInt UOrder
Read Write Property: Nurbs U order.
Definition: fbgeometry.h:938
FBMesh::PolygonEnd
int PolygonEnd()
End Polygon definition.
FBGeometry::GetNormalsDirectArray
FBNormal * GetNormalsDirectArray(int &pOutArrayCount) const
Get a pointer to the direct array of normals.
FBGeometry::VertexNormalSet
bool VertexNormalSet(double px, double py, double pz, int pIndex=-1)
Set a normal at a vertex.
FBSurface::VertexGetTransformable
bool VertexGetTransformable(int pU, int pV)
Get the Transformable state of a vertex.
FBGeometry::TangentReferenceMode
FBPropertyGeometryReferenceMode TangentReferenceMode
Read Only Property: Tangent reference mode.
Definition: fbgeometry.h:423
FBGeometry::ShapeInit
void ShapeInit(int pShapeIdx, int pDiffSize, bool pWithNormal=false)
Init the shape.
FBMesh::PolygonVertexAdd
bool PolygonVertexAdd(int pVertex)
Add a vertex.
FBGeometry::ShapeSetDiffPoint
bool ShapeSetDiffPoint(int pShapeIdx, int pDiffIndex, int pOriIndex, const FBVertex &pPosDiff, const FBNormal &pNormalDiff)
Set the differentiate point.
FBNurbs
Nurbs class.
Definition: fbgeometry.h:870
FBGeometry::VertexAdd
int VertexAdd(double px, double py, double pz, double nx, double ny, double nz)
Begin geometry editing.
FBGeometry::VertexAdd
int VertexAdd(double px, double py, double pz, double nx, double ny, double nz, double UVu, double UVv)
Begin geometry editing.
FBNormal
class K_DLLIMPORT FBVector4< float > FBNormal
Normal.
Definition: fbtypes.h:599
FBNurbs::SetControlMultiplicity
virtual void SetControlMultiplicity(int pUorV, int pIndex, int pMultiplicity)
Set multiplicity (number of "instances") of control point.
FBGeometry::GetBinormalsIndexArray
int * GetBinormalsIndexArray(int &pOutArrayCount) const
Get a pointer to the index array of binormals.
FBGeometry::VertexAdd
int VertexAdd(FBVertex pVertex)
Add a vertex.
FBNurbs::ControlPointsEnd
virtual void ControlPointsEnd() override
End NURBS control points edition.
FBGeometry::VertexAdd
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)
Begin geometry editing.
FBGeometry::GetMaterialIndexArray
int * GetMaterialIndexArray(int &pOutArrayCount) const
Get a pointer to the index array of Material.
FBNurbs::GetControlMultiplicity
virtual int GetControlMultiplicity(int pUorV, int pIndex)
Get multiplicity (number of "instances") of control point.
FBPatch::SurfaceEnd
virtual void SurfaceEnd() override
End Patch definition.
FBGeometry::VertexAdd
int VertexAdd(double px, double py, double pz)
Add a vertex.
FBSurface::USize
FBPropertyInt USize
Read Write Property: Size in U directions.
Definition: fbgeometry.h:841
FBGeometry::FBGeometry
FBGeometry(const char *pName, HIObject pObject=NULL)
Constructor.
kFBGeometryArrayElementType_Float3
@ kFBGeometryArrayElementType_Float3
Each element is an array of 3 float.
Definition: fbgeometry.h:91
FBMesh::PolygonListAdd
bool PolygonListAdd(int pPolygonSize, int pIndexArraySize, int *pIndexArray, int pMaterialId=0)
Add Polygon List Must be called in-between FBGeometry::GeometryBegin() / GeometryEnd() It's user's re...
FBGeometry::VertexArrayClear
bool VertexArrayClear()
Clear all geometry vertex arrays.
FBNurbs::SetControlKnotValue
virtual void SetControlKnotValue(int pUorV, int pIndex, double pKnotValue)
Set knot vector value of control point.
kFBGeometryArrayID_Point
@ kFBGeometryArrayID_Point
ID to the Point array.
Definition: fbgeometry.h:78
FBGeometry::VertexSetVisible
bool VertexSetVisible(int pIndex, bool pState)
Set the visible state of a vertex.
FBGeometry::VertexColorSet
bool VertexColorSet(float pRed, float pGreen, float pBlue, float pAlpha, int pIndex=-1)
Set a UV coordinate.
FBGeometryMappingMode
FBGeometryMappingMode
Determine how the element is mapped on a surface.
Definition: fbgeometry.h:114
kFBGeometryUpdateMappingMode
@ kFBGeometryUpdateMappingMode
mapping mode request from associated shading network change.
Definition: fbgeometry.h:151
FBGeometry::ShapeGetDiffPoint
bool ShapeGetDiffPoint(int pShapeIdx, int pDiffIndex, int &pOriIndex, FBVertex &pPosDiff) const
Get the differentiate point.
FBSurface::VertexGetVisible
bool VertexGetVisible(int pU, int pV)
Get the visible state of a vertex.
FBSurfaceType
FBSurfaceType
Surface types.
Definition: fbgeometry.h:771
kFBSurfaceModeRaw
@ kFBSurfaceModeRaw
Raw data.
Definition: fbgeometry.h:761
FBGeometry::VertexColorMappingMode
FBPropertyGeometryMappingMode VertexColorMappingMode
Read Only Property: Vertex Color mapping mode.
Definition: fbgeometry.h:456
kFBGeometryArrayID_Binormal
@ kFBGeometryArrayID_Binormal
ID to the Binormal array.
Definition: fbgeometry.h:81
FBGeometry::VertexCount
int VertexCount() const
Get the number of vertices in the geometry.
FBGeometry::ShapeGetCount
int ShapeGetCount() const
Get Shape Count.
FBSurface::VertexSetSelected
bool VertexSetSelected(int pU, int pV, bool pState)
Set the selected state of a vertex.
FBMesh::TriangleStripAdd
bool TriangleStripAdd(int pIndexArraySize, int *pIndexArray, int pMaterialId=0)
Add Triangle Strip Must be called in-between FBGeometry::GeometryBegin() / GeometryEnd() It's user's ...
FBGeometry::ShapeGetDiffPoint
bool ShapeGetDiffPoint(int pShapeIdx, int pDiffIndex, int &pOriIndex, FBVertex &pPosDiff, FBNormal &pNormalDiff) const
Get the differentiate point.
kFBSurfaceTypeBezierQuadric
@ kFBSurfaceTypeBezierQuadric
Bezier Quadric surface.
Definition: fbgeometry.h:773
FBGeometry::VertexAdd
int VertexAdd(FBVertex pVertex, FBNormal pNormal)
Add a vertex.
__FBClassDeclare
#define __FBClassDeclare(Name, Parent)
For internal use only.
Definition: fbcomponent.h:131
FBNurbType
FBNurbType
Surface types.
Definition: fbgeometry.h:855
FBNurbs::SetControlWeight
virtual void SetControlWeight(int pIndex, double pWeight)
Set weight of control point.
FBNurbs::VOrder
FBPropertyInt VOrder
Read Write Property: Nurbs V order.
Definition: fbgeometry.h:939
__FB_FORWARD
#define __FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Definition: fbtypes.h:68
FBPatch::SurfaceBegin
virtual void SurfaceBegin() override
Begin Patch definition.
FBPatch::SurfaceEditBegin
virtual void SurfaceEditBegin() override
Begin patch surface edit.
FBPatch::SurfaceEditEnd
virtual void SurfaceEditEnd() override
End patch surface edit.
FBMesh::PolygonVertexArrayGet
const int * PolygonVertexArrayGet(int &pArraySize) const
Get the array of polygon vertex (i.e.
FBNurbs::SurfaceEnd
virtual void SurfaceEnd() override
End NURBS definition.
FBGeometry::GetPositionsArray
FBVertex * GetPositionsArray(int &pOutArrayCount) const
Get a pointer to the position array.
FBMesh::PolygonMaterialIdGet
int PolygonMaterialIdGet(int pIndex=-1) const
Get a Material ID for the given Polygon index.
FBSurface::SurfaceMode
FBPropertySurfaceMode SurfaceMode
Read Write Property: Surface mode.
Definition: fbgeometry.h:847
FBGeometry::BinormalMappingMode
FBPropertyGeometryMappingMode BinormalMappingMode
Read Only Property: Binormal mapping mode.
Definition: fbgeometry.h:439
FBGeometry::VertexNormalGet
FBNormal VertexNormalGet(int pIndex=-1) const
Get a normal at a vertex.
FBNurbs::SurfaceEditEnd
virtual void SurfaceEditEnd() override
End NURBS surface edition.
FBMesh::PolygonBegin
int PolygonBegin(int pMaterialId=0)
Begin Polygon definition.
kFBNurbTypePeriodic
@ kFBNurbTypePeriodic
Periodic Type Nurb.
Definition: fbgeometry.h:856
kFBGeometryUpdateInverseNormal
@ kFBGeometryUpdateInverseNormal
inverse normal request.
Definition: fbgeometry.h:150
FBGeometry::GeometryEnd
bool GeometryEnd()
End geometry editing.
FBGeometry::VertexUVSet
bool VertexUVSet(FBUV pUV, int pIndex=-1)
Set a UV coordinate.
FBNurbs::GetControlKnotValue
virtual double GetControlKnotValue(int pUorV, int pIndex)
Get knot vector value of control point.
FBGeometry::VertexUVSet
bool VertexUVSet(float pU, float pV, int pIndex=-1)
Set a UV coordinate.
FBGeometry::VertexColorReferenceMode
FBPropertyGeometryReferenceMode VertexColorReferenceMode
Read Only Property: Vertex Color reference mode.
Definition: fbgeometry.h:457
kFBSurfaceTypeBspline
@ kFBSurfaceTypeBspline
BSpline surface.
Definition: fbgeometry.h:775
FBPatch::USurfaceType
FBPropertySurfaceType USurfaceType
Read Write Property: Patch mode for U direction.
Definition: fbgeometry.h:988
FBGeometryArrayElementType
FBGeometryArrayElementType
Type of data when requesting an array.
Definition: fbgeometry.h:86
FBGeometry::GetNormalsIndexArray
int * GetNormalsIndexArray(int &pOutArrayCount) const
Get a pointer to the index array of normals.
kFBGeometryUpdateSkinWeight
@ kFBGeometryUpdateSkinWeight
update skin weight
Definition: fbgeometry.h:149
FBGeometry::GetTangentsDirectArray
FBNormal * GetTangentsDirectArray(int &pOutArrayCount) const
Get a pointer to the direct array of tangents.
FBGeometry::VertexGetTransformable
bool VertexGetTransformable(int pIndex)
Get the Transformable state of a vertex.
FBNurbs::SurfaceEditBegin
virtual void SurfaceEditBegin() override
Begin NURBS surface edition.
FBGeometry::GetUVSets
FBStringList GetUVSets() const
Get available UVSet name.
FBPropertyBool
class K_DLLIMPORT FBPropertyBase< bool, kFBPT_bool > FBPropertyBool
Property: bool
Definition: fbproperties.h:1308
FBGeometry::VertexColorGet
FBColorF VertexColorGet(int pIndex=-1) const
Get a Vertex Color.
FBGeometry::NormalReferenceMode
FBPropertyGeometryReferenceMode NormalReferenceMode
Read Only Property: Normal reference mode.
Definition: fbgeometry.h:406
FBGeometry::ShapeGetDiffPointCount
int ShapeGetDiffPointCount(int pShapeIdx) const
Return the shape's total diff points count.
fbcomponent.h
Basic class definitions.
FBMesh::IsTriangleMesh
bool IsTriangleMesh() const
Determines if the mesh is composed entirely of triangles.
kFBSurfaceModeHighNoNormals
@ kFBSurfaceModeHighNoNormals
High quality, no normals.
Definition: fbgeometry.h:764
FBGeometry::VertexSet
bool VertexSet(FBVertex pVertex, int pIndex=-1)
Set a vertex.
FBSurface::VertexSetVisible
bool VertexSetVisible(int pU, int pV, bool pState)
Set the visible state of a vertex.
kFBNurbTypeOpen
@ kFBNurbTypeOpen
Open Type Nurb.
Definition: fbgeometry.h:858
FBNurbs::SurfaceBegin
virtual void SurfaceBegin() override
Begin NURBS definition.
FBPatch::ControlPointsBegin
virtual void ControlPointsBegin() override
Begin control points edition.
kFBNurbTypeClosed
@ kFBNurbTypeClosed
Closed Type Nurb.
Definition: fbgeometry.h:857
FBSurface
Surface class.
Definition: fbgeometry.h:783
FBGeometry::VertexAdd
int VertexAdd(FBVertex pVertex, FBNormal pNormal, FBUV pUV, FBColorF pVertexColor)
Add a vertex.
fbcore.h
Contains definitions for devices, boxes and models.
FBNurbs::ControlPointsBegin
virtual void ControlPointsBegin() override
Begin NURBS control points edition.
FBGeometry::VertexGetSelected
bool VertexGetSelected(int pIndex)
Get the selected state of a vertex.
FBGeometry::VertexArrayInit
bool VertexArrayInit(int pVertexcount, bool pUniqueMaterial, unsigned int pFBGeometryArrayIDs=0)
Init geometry vertex arrays.
FBGeometry::IsEditingEnabled
bool IsEditingEnabled() const
Is geometry editing enabled.
kFBSurfaceTypeCardinal
@ kFBSurfaceTypeCardinal
Cardinal surface.
Definition: fbgeometry.h:774
FBGeometry::BinormalReferenceMode
FBPropertyGeometryReferenceMode BinormalReferenceMode
Read Only Property: Binormal reference mode.
Definition: fbgeometry.h:440
FB_DEFINE_COMPONENT
FB_DEFINE_COMPONENT(K_DLLIMPORT, AnimationNode)
Animation node class.
FBGeometry::GetUVSetIndexArray
int * GetUVSetIndexArray(int &pOutArrayCount, const char *pUVSetName=NULL) const
Get a pointer to the index array of UVset.
FBPatch::FBPatch
FBPatch(const char *pName, HIObject pObject=NULL)
Constructor.
kFBGeometryArrayID_Color
@ kFBGeometryArrayID_Color
ID to the Vertex Color Array.
Definition: fbgeometry.h:82
FBGeometry::GeometryBegin
bool GeometryBegin()
Begin geometry editing.
FBGeometryArrayID
FBGeometryArrayID
ID to use when requesting a specific array of data for a model.
Definition: fbgeometry.h:77
kFBGeometryArrayID_Tangent
@ kFBGeometryArrayID_Tangent
ID to the Tangent array.
Definition: fbgeometry.h:80
FBMesh::TriangleListAdd
bool TriangleListAdd(int pIndexArraySize, int *pIndexArray, int pMaterialId=0)
Add Triangle List, Must be called in-between FBGeometry::GeometryBegin() / GeometryEnd() It's user's ...
FBSurface::VClosed
FBPropertyBool VClosed
Read Write Property: V Closed
Definition: fbgeometry.h:846
FBPatch::ControlPointsEnd
virtual void ControlPointsEnd() override
End control points edition.
FBMesh::PolygonCount
int PolygonCount() const
Get number of polygons in mesh.
FBNurbs::UNurbType
FBPropertyNurbType UNurbType
Read Write Property: Nurbs Type for U direction.
Definition: fbgeometry.h:940
FBMesh::PolygonVertexIndex
int PolygonVertexIndex(int pPolygonIndex, int pVertexPolygonIndex) const
Get global (for the mesh) index of a vertex from a polygon.
FBGeometry
Geometry class.
Definition: fbgeometry.h:168
FBGeometry::VertexInit
void VertexInit(int pSize, bool pResize, bool pInitUV=true, bool pInitVertexColor=false)
Resize or Reserve vertex, normal and UV array for performance.
FBUV
class K_DLLIMPORT 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...
Definition: fbtypes.h:595
FBComponent
MotionBuilder SDK base class.
Definition: fbcomponent.h:651
FBGeometry::MaterialMappingMode
FBPropertyGeometryMappingMode MaterialMappingMode
Read Property: Material mapping mode.
Definition: fbgeometry.h:506
kFBSurfaceModeLow
@ kFBSurfaceModeLow
Low quality.
Definition: fbgeometry.h:763
FBSurface::VertexGetSelected
bool VertexGetSelected(int pU, int pV)
Get the selected state of a vertex.
kFBSurfaceModeLowNoNormals
@ kFBSurfaceModeLowNoNormals
Low quality, no normals.
Definition: fbgeometry.h:762
FBPatch
Patch class.
Definition: fbgeometry.h:954
FBMesh::PolygonVertexCount
int PolygonVertexCount(int pPolygonIndex) const
Get Polygon vertex count.
FBGeometry::TangentMappingMode
FBPropertyGeometryMappingMode TangentMappingMode
Read Only Property: Tangent mapping mode.
Definition: fbgeometry.h:422
FBGeometry::GetBinormalsDirectArray
FBNormal * GetBinormalsDirectArray(int &pOutArrayCount) const
Get a pointer to the direct array of binormals.
FBPatch::VSurfaceType
FBPropertySurfaceType VSurfaceType
Read Write Property: Patch mode for V direction.
Definition: fbgeometry.h:989
kFBGeometryUpdateFlags
kFBGeometryUpdateFlags
Definition: fbgeometry.h:145
kFBGeometryArrayID_Normal
@ kFBGeometryArrayID_Normal
ID to the Normal by Point array.
Definition: fbgeometry.h:79
FBGeometry::ShapeAdd
int ShapeAdd(const char *pName)
Add new shape.