00001 #ifndef __FBMODEL_H__
00002 #define __FBMODEL_H__
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00043 #include <kaydaradef.h>
00044 #ifndef FBSDK_DLL
00045
00048 #define FBSDK_DLL K_DLLIMPORT
00049 #endif
00050
00051 #include <fbsdk/fbcore.h>
00052 #include <fbsdk/fbcomponent.h>
00053 #include <fbsdk/fbshader.h>
00054
00055
00056
00057 #undef Status
00058
00059 #ifdef FBSDKUseNamespace
00060 namespace FBSDKNamespace {
00061 #endif
00062
00066 #define FBStorableCustomModelImplementation(ClassName, Type)\
00067 char* ClassName::FbxGetObjectSubType(){ return #ClassName; }\
00068 HIObject RegisterStorable##ClassName##Create(HIObject , char* pName, void* ){\
00069 ClassName* Class = new ClassName(pName);\
00070 Class->mAllocated = true;\
00071 Class->EnableObjectFlags(kFBFlagCustomNode);\
00072 if( Class->FBCreate() ){\
00073 return Class->GetHIObject();\
00074 } else {\
00075 delete Class;\
00076 return NULL;}}\
00077 FBLibraryModule(ClassName##Storable){\
00078 FBString lGroup = "FbxStorable/";\
00079 lGroup += #Type;\
00080 FBRegisterObject(ClassName##R2, lGroup, #ClassName, "", RegisterStorable##ClassName##Create, true, NULL);\
00081 FBSetStoreableCustomModelReigstered();}\
00082
00083
00084 typedef class FBSDK_DLL FBArrayTemplate<HFBModel> FBModelList;
00085
00086 FB_DEFINE_COMPONENT( FBSDK_DLL, Camera );
00087 FB_DEFINE_COMPONENT( FBSDK_DLL, CameraStereo );
00088 FB_DEFINE_COMPONENT( FBSDK_DLL, Light );
00089 FB_DEFINE_COMPONENT( FBSDK_DLL, Model );
00090 FB_DEFINE_COMPONENT( FBSDK_DLL, Cluster );
00091 FB_DEFINE_COMPONENT( FBSDK_DLL, Geometry );
00092 FB_DEFINE_COMPONENT( FBSDK_DLL, Mesh );
00093 FB_DEFINE_COMPONENT( FBSDK_DLL, ModelVertexData );
00094 FB_DEFINE_COMPONENT( FBSDK_DLL, Video );
00095 FB_DEFINE_COMPONENT( FBSDK_DLL, PointCacheFile );
00096 FB_DEFINE_COMPONENT( FBSDK_DLL, AnimationNode );
00097
00101 FBSDK_DLL void FBModelTransactionBegin();
00102
00106 FBSDK_DLL void FBModelTransactionEnd();
00107
00109
00111 __FB_FORWARD( FBModel );
00112 __FB_FORWARD( FBPropertyListModel );
00113 FB_DEFINE_LIST( FBSDK_DLL, Model );
00114
00116 class FBSDK_DLL FBPropertyListModel : public FBPropertyListComponentBase
00117 {
00118 public:
00123 int Add ( HFBModel pItem );
00124
00129 int Remove ( HFBModel pItem );
00130
00134 virtual void RemoveAt( int pIndex );
00135
00140 FBModel* operator[](int pIndex);
00141
00145 virtual int GetCount();
00146 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00147 inline virtual FBComponent* GetAt(int pIndex) { return (FBComponent*)operator[](pIndex); }
00148 private:
00149 inline virtual int Add ( FBComponent* pItem ) { return Add((FBModel*)pItem); }
00150 inline virtual int Remove ( FBComponent* pItem ) { return Remove((FBModel*)pItem); }
00151 #endif
00152 };
00153
00155
00158 __FB_FORWARD( FBMaterial );
00159
00160 class FBSDK_DLL FBPropertyListMaterial : public FBPropertyListComponent
00161 {
00162 public:
00163 FBPropertyListMaterial();
00168 FBMaterial* operator[](int pIndex);
00169 };
00170
00172
00175 __FB_FORWARD( FBTexture );
00176
00177 class FBSDK_DLL FBPropertyListTexture : public FBPropertyListComponent
00178 {
00179 public:
00180 FBPropertyListTexture();
00187 virtual int Add( FBTexture* pItem );
00192 FBTexture* operator[](int pIndex);
00193
00194 private:
00195 inline virtual int Add ( FBComponent* pItem ) { return Add((FBTexture*)pItem); }
00196 };
00197
00199
00202 __FB_FORWARD( FBDeformer );
00203
00204 class FBSDK_DLL FBPropertyListDeformer : public FBPropertyListComponent
00205 {
00206 public:
00207 FBPropertyListDeformer();
00214 virtual int Add( FBDeformer* pItem );
00219 FBDeformer* operator[](int pIndex);
00220
00221 private:
00222 inline virtual int Add ( FBComponent* pItem ) { return Add((FBDeformer*)pItem); }
00223 };
00224
00226
00228 __FB_FORWARD( FBModel );
00229
00231 enum FBModelTransformationMatrix {
00232 kModelTransformation = 1<<0,
00233 kModelRotation = 1<<1,
00234 kModelTranslation = 1<<2,
00235 kModelScaling = 1<<3,
00236 kModelInverse_Transformation = 1<<4,
00237 kModelInverse_Rotation = 1<<5,
00238 kModelInverse_Translation = 1<<6,
00239 kModelInverse_Scaling = 1<<7,
00240 kModelParentOffset = 1<<8
00241 };
00242
00244 enum FBModelShadingMode {
00245 kFBModelShadingDefault,
00246 kFBModelShadingWire,
00247 kFBModelShadingFlat,
00248 kFBModelShadingLight,
00249 kFBModelShadingHard,
00250 kFBModelShadingTexture,
00251 kFBModelShadingAll,
00252 };
00253
00255 enum FBModelRenderPass {
00256 kFBModelRenderPassStandard,
00257 kFBModelRenderPassTransparency,
00258 kFBModelRenderPassPick,
00259 };
00260
00262 enum FBModelRotationOrder {
00263 kFBEulerXYZ = 0,
00264 kFBEulerXZY,
00265 kFBEulerYZX,
00266 kFBEulerYXZ,
00267 kFBEulerZXY,
00268 kFBEulerZYX,
00269 kFBSphericXYZ
00270 };
00271
00272 FB_DEFINE_ENUM( FBSDK_DLL, ModelShadingMode );
00273 FB_DEFINE_ENUM( FBSDK_DLL, ModelTransformationMatrix );
00274 FB_DEFINE_ENUM( FBSDK_DLL, ModelRotationOrder );
00275
00307 class FBSDK_DLL FBModel : public FBBox
00308 {
00309 __FBClassDeclare( FBModel,FBBox );
00310 public:
00315 FBModel(char *pName, HIObject pObject=NULL);
00316 virtual void FBDelete();
00317
00318 IQuery_Declare (Implementation);
00319 ICallback_Declare (Implementation);
00320
00321 FBPropertyListModel Children;
00322
00323 FBPropertyListShader Shaders;
00324 FBPropertyListMaterial Materials;
00325 FBPropertyListTexture Textures;
00326 FBPropertyListDeformer Deformers;
00327 FBPropertyBool Icon3D;
00328 FBPropertyBool SoftSelected;
00329 FBPropertyBool IsDeformable;
00330 FBPropertyBool IsConstrained;
00331 FBPropertyBool SkeletonDeformable;
00332 FBPropertyBool BlendShapeDeformable;
00333 FBPropertyBool ConstrainDeformable;
00334 FBPropertyBool PointCacheDeformable;
00335 FBPropertyBool PointCacheRecord;
00336 FBPropertyModel Parent;
00337 FBPropertyModel LookAt;
00338 FBPropertyModel UpVector;
00339 FBPropertyGeometry Geometry;
00340 FBPropertyMesh TessellatedMesh;
00341 FBPropertyModelVertexData ModelVertexData;
00342 FBPropertyCluster Cluster;
00343 FBPropertyScene Scene;
00344 FBPropertyModelShadingMode ShadingMode;
00345 FBPropertyAnimationNode AnimationNode;
00346
00347 FBPropertyModelRotationOrder RotationOrder;
00348
00349
00350 FBPropertyBool RotationSpaceForLimitOnly;
00351 FBPropertyBool RotationActive;
00352 FBPropertyVector3d PreRotation;
00353 FBPropertyVector3d PostRotation;
00354 FBPropertyVector3d RotationMin;
00355 FBPropertyVector3d RotationMax;
00356 FBPropertyBool RotationMinX;
00357 FBPropertyBool RotationMinY;
00358 FBPropertyBool RotationMinZ;
00359 FBPropertyBool RotationMaxX;
00360 FBPropertyBool RotationMaxY;
00361 FBPropertyBool RotationMaxZ;
00362
00363
00364 FBPropertyAnimatableBool Visibility;
00365 FBPropertyBool VisibilityInheritance;
00366 FBPropertyAnimatableVector3d Translation;
00367 FBPropertyAnimatableVector3d Rotation;
00368 FBPropertyAnimatableVector3d Scaling;
00369
00370 FBPropertyVector3d GeometricTranslation;
00371 FBPropertyVector3d GeometricRotation;
00372 FBPropertyVector3d GeometricScaling;
00373
00374 FBPropertyBool QuaternionInterpolate;
00375
00376 FBPropertyBool Show;
00377 FBPropertyBool Pickable;
00378
00383 virtual HFBModel Clone();
00384
00392 void SetMatrix(FBMatrix pMatrix, int pWhat=kModelTransformation, bool pGlobalInfo=true, bool pPushUndo = false, HFBEvaluateInfo pEvaluateInfo=NULL);
00393
00400 void GetMatrix(FBMatrix &pMatrix, int pWhat=kModelTransformation, bool pGlobalInfo=true, HFBEvaluateInfo pEvaluateInfo=NULL);
00401
00409 void SetVector(FBVector3d pVector, int pWhat=kModelTranslation, bool pGlobalInfo=true, bool pPushUndo = false, HFBEvaluateInfo pEvaluateInfo=NULL);
00410
00417 void GetVector(FBVector3d &pVector, int pWhat=kModelTranslation, bool pGlobalInfo=true, HFBEvaluateInfo pEvaluateInfo=NULL);
00418
00423 void SetSchematicPosition(int pX,int pY);
00424
00428 void SetSchematicPosition(FBVector2d pVector2d);
00429
00433 FBVector2d GetSchematicPosition();
00434
00439 void GetBoundingBox( FBVector3d& pMin, FBVector3d& pMax );
00440
00444 int NoFrustumCullingRequire();
00445
00449 int NoFrustumCullingRelease();
00450
00454 bool UseFrustumCulling();
00455
00459 virtual bool HasCustomDisplay() { return false; }
00460
00468 virtual void CustomModelDisplay( FBCamera* pCamera, FBModelShadingMode pShadingMode, FBModelRenderPass pRenderPass, float pPickingAreaWidth, float pPickingAreaHeight) {}
00469
00483 virtual bool CustomModelPicking( int pNbHits, unsigned int *pSelectBuffer, FBCamera* pCamera,
00484 int pMouseX,int pMouseY,
00485 FBTVector* pLocalRaySrc, FBTVector* pLocalRayDir,
00486 FBTVector* pWorldRaySrc, FBTVector* pWorldRayDir,
00487 FBMatrix* pGlobalInverseMatrix,
00488 FBTVector* pOutPickedPoint) { return false; }
00489
00493 unsigned char* GetSelectedPoints();
00494
00498 int GetSelectedPointsCount();
00499
00504 virtual bool FbxStore(HFBFbxObject pFbxObject, kFbxObjectStore pStoreWhat);
00505 virtual bool FbxRetrieve(HFBFbxObject pFbxObject, kFbxObjectStore pStoreWhat);
00506
00514 void SetupPropertiesForShapes();
00515
00518 virtual char* FbxGetObjectType();
00519
00522 virtual char* FbxGetObjectSubType();
00523
00524 };
00525
00527
00529 __FB_FORWARD( FBModelNull);
00530
00532 class FBSDK_DLL FBModelNull : public FBModel {
00533 __FBClassDeclare( FBModelNull,FBModel );
00534 public:
00539 FBModelNull(char *pName, HIObject pObject=NULL);
00540
00541 FBPropertyDouble Size;
00542 };
00543
00545
00547 __FB_FORWARD( FBModelRoot);
00548
00550 class FBSDK_DLL FBModelRoot : public FBModel {
00551 __FBClassDeclare( FBModelRoot,FBModel );
00552 public:
00557 FBModelRoot(char *pName, HIObject pObject=NULL);
00558
00559 FBPropertyDouble Size;
00560 };
00561
00563
00565 __FB_FORWARD( FBModelMarker);
00566
00568 enum FBMarkerResolutionLevel
00569 {
00570 kFBMarkerLowResolution,
00571 kFBMarkerMediumResolution,
00572 kFBMarkerHighResolution
00573 };
00574
00576 enum FBMarkerLook
00577 {
00578 kFBMarkerLookCube,
00579 kFBMarkerLookHardCross,
00580 kFBMarkerLookLightCross,
00581 kFBMarkerLookSphere,
00582 kFBMarkerLookCapsule,
00583 kFBMarkerLookSquare,
00584 kFBMarkerLookCircle,
00585 kFBMarkerLookBone,
00586 kFBMarkerLookStick,
00587 kFBMarkerLookBox,
00588 kFBMarkerLookNone
00589 };
00590
00592 enum FBMarkerType
00593 {
00594 kFBMarkerTypeStandard,
00595 kFBMarkerTypeOptical,
00596 kFBMarkerTypeFKEffector,
00597 kFBMarkerTypeIKEffector
00598 };
00599
00600 FB_DEFINE_ENUM( FBSDK_DLL, MarkerResolutionLevel );
00601 FB_DEFINE_ENUM( FBSDK_DLL, MarkerLook );
00602 FB_DEFINE_ENUM( FBSDK_DLL, MarkerType );
00603
00605 class FBSDK_DLL FBModelMarker : public FBModel {
00606 __FBClassDeclare( FBModelMarker,FBModel );
00607 public:
00612 FBModelMarker(char *pName, HIObject pObject=NULL);
00613
00614 FBPropertyDouble Size;
00615 FBPropertyDouble Length;
00616 FBPropertyMarkerResolutionLevel ResLevel;
00617 FBPropertyMarkerLook Look;
00618 FBPropertyMarkerType Type;
00619 FBPropertyColor Color;
00620 FBPropertyVector3d IKPivot;
00621 FBPropertyBool IKSync;
00622
00626 void SetFKOpacity(double pValue);
00627 };
00628
00629
00631
00633 __FB_FORWARD( FBModelSkeleton);
00634
00636 class FBSDK_DLL FBModelSkeleton : public FBModel {
00637 __FBClassDeclare( FBModelSkeleton,FBModel );
00638 public:
00643 FBModelSkeleton(char *pName, HIObject pObject=NULL);
00644
00645 FBPropertyDouble Size;
00646 FBPropertyColor Color;
00647
00652 void GetSkinModelList(FBModelList& pSkinModelList);
00653 };
00654
00656
00658 __FB_FORWARD( FBModelCube );
00659
00661 class FBSDK_DLL FBModelCube : public FBModel {
00662 __FBClassDeclare( FBModelCube, FBModel );
00663 public:
00668 FBModelCube(char *pName, HIObject pObject=NULL);
00669 };
00670
00672
00674 __FB_FORWARD( FBModelPlane );
00675
00677 class FBSDK_DLL FBModelPlane : public FBModel {
00678 __FBClassDeclare( FBModelPlane, FBModel );
00679 public:
00684 FBModelPlane(char *pName, HIObject pObject=NULL);
00685 };
00686
00688
00690 __FB_FORWARD( FBModelPath3D );
00691
00693 enum FBPathTangeantMode {
00694 kFBPathTangeantInvalid,
00695 kFBPathTangeantLinear,
00696 kFBPathTangeantCubic,
00697 kFBPathTangeantAuto,
00698 kFBPathTangeantUser
00699 };
00700
00701 FB_DEFINE_ENUM(FBSDK_DLL, PathTangeantMode);
00702
00704 class FBSDK_DLL FBModelPath3D : public FBModel
00705 {
00706 __FBClassDeclare(FBModelPath3D, FBModel);
00707
00708 public:
00732 FBModelPath3D(char* pName, HIObject pObject=NULL);
00733
00734
00735 void ShowCurveControls(bool pShow);
00736 void ShowCurvePoints(bool pShow);
00737
00738
00739 int PathKeyGetCount();
00740 FBVector4d PathKeyGet(int pKeyIndex);
00741 void PathKeySet(int pKeyIndex, FBVector4d pTLocal, bool pUpdate=true);
00742
00750 void PathSetKeyLeftRightTangeant(int pKeyIndex, FBVector4d pKeyTLocal, FBVector4d pLeftTangentTLocal, FBVector4d pRightTangentTLocal, bool pUpdate=true);
00751 void PathKeyRemove(int pKeyIndex);
00752 void PathKeyClear();
00753
00754
00755 void PathKeySetLeftTangeant(int pKeyIndex, FBVector4d pTLocal, bool pUpdate=true);
00756 void PathKeySetRightTangeant(int pKeyIndex, FBVector4d pTLocal, bool pUpdate=true);
00757 FBVector4d PathKeyGetLeftTangeant(int pKeyIndex);
00758 FBVector4d PathKeyGetRightTangeant(int pKeyIndex);
00759 void PathKeySetXDerivative(int pKeyIndex, double pDerivative, bool pUpdate);
00760 void PathKeySetYDerivative(int pKeyIndex, double pDerivative, bool pUpdate);
00761 void PathKeySetZDerivative(int pKeyIndex, double pDerivative, bool pUpdate);
00762 void PathKeySetXYZDerivative(int pKeyIndex, FBVector4d pDerivative, bool pUpdate);
00763 FBVector4d PathKeyGetXYZDerivative(int pKeyIndex);
00764 double PatKeyGetLeftTangeantLength(int pKeyIndex);
00765 double PatKeyGetRightTangeantLength(int pKeyIndex);
00766
00767
00768 int GetSelectedPathKeyCount();
00769 void PathKeyRemoveSelected();
00770
00771
00772 int InsertNewStartKey();
00773 int InsertNewEndKey();
00774 int PathKeyStartAdd(FBVector4d pTLocal);
00775 int PathKeyEndAdd(FBVector4d pTLocal);
00776
00777
00778 int Total_PathKeyAdd(double pTotalPercent, FBVector4d pTLocal);
00779 int Total_IsPathKey(double pTotalPercent);
00780 FBVector4d Total_GlobalPathEvaluate(double pTotalPercent);
00781 FBVector4d Total_LocalPathEvaluate(double pTotalPercent);
00782 FBVector4d Total_GlobalPathEvaluateDerivative(double pTotalPercent);
00783 FBVector4d Total_LocalPathEvaluateDerivative(double pTotalPercent);
00784 int Segment_PathKeyAdd(double pSegmentPercent, FBVector4d pTLocal);
00785 int Segment_IsPathKey(double pSegmentPercent);
00786 FBVector4d Segment_GlobalPathEvaluate(double pSegmentPercent);
00787 FBVector4d Segment_LocalPathEvaluate(double pSegmentPercent);
00788 FBVector4d Segment_GlobalPathEvaluateDerivative(double pSegmentPercent);
00789 FBVector4d Segment_LocalPathEvaluateDerivative(double pSegmentPercent);
00790
00791
00792 double ConvertTotalPercentToSegmentPercent(double pPercent);
00793 double ConvertSegmentPercentToTotalPercent(double pPercent);
00794 double ConvertToSegmentPercentFactor();
00795 double ConvertToTotalPercentFactor();
00796
00797
00798 bool SetRightTangeantMode(int pKeyIndex, FBPathTangeantMode pTangeantMode);
00799 bool SetLeftTangeantMode(int pKeyIndex, FBPathTangeantMode pTangeantMode);
00800 FBPathTangeantMode GetRightTangeantMode(int pKeyIndex);
00801 FBPathTangeantMode GetLeftTangeantMode(int pKeyIndex);
00802
00805 void UpdateGeometry();
00806 };
00807
00808
00810
00812 __FB_FORWARD( FBTexture );
00813
00818 enum FBTextureUseType {
00819 kFBTextureUseColor = 1,
00820 kFBTextureUseShadowMap = 2,
00821 kFBTextureUseLightMap = 3,
00822 kFBTextureUseSphericalReflexionMap = 4,
00823 kFBTextureUseSphereReflexionMap = 5,
00824 kFBTextureUseBumpNormalMap = 6
00825 };
00826
00830 enum FBTextureMapping {
00831 kFBTextureMappingUV = 1,
00832 kFBTextureMappingXY = 2,
00833 kFBTextureMappingYZ = 3,
00834 kFBTextureMappingXZ = 4,
00835 kFBTextureMappingSpherical = 5,
00836 kFBTextureMappingCylindrical = 6,
00837 kFBTextureMappingEnvironment = 7,
00838 kFBTextureMappingProjection = 8
00839 };
00840
00844 enum FBTextureBlendMode {
00845 kFBTextureBlendTranslucent,
00846 kFBTextureBlendAdditive,
00847 kFBTextureBlendModulate,
00848 kFBTextureBlendModulate2,
00849 };
00850
00851 FB_DEFINE_ENUM( FBSDK_DLL, TextureUseType );
00852 FB_DEFINE_ENUM( FBSDK_DLL, TextureMapping );
00853 FB_DEFINE_ENUM( FBSDK_DLL, TextureBlendMode );
00854
00856
00857
00858 class FBSDK_DLL FBTexture : public FBBox {
00859 __FBClassDeclare( FBTexture,FBBox );
00860 public:
00865 FBTexture(char *pName, HIObject pObject=NULL);
00866 virtual void FBDelete();
00867
00872 FBTexture* Clone();
00873
00874 FBPropertyString Filename;
00875 FBPropertyInt Width;
00876 FBPropertyInt Height;
00877
00878 FBPropertyTextureUseType UseType;
00879 FBPropertyTextureMapping Mapping;
00880 FBPropertyTextureBlendMode BlendMode;
00881
00882 FBPropertyAnimatableVector3d Translation;
00883 FBPropertyAnimatableVector3d Rotation;
00884 FBPropertyAnimatableVector3d Scaling;
00885 FBPropertyAnimatableDouble Alpha;
00886
00887 FBPropertyBool SwapUV;
00888 FBPropertyInt CroppingX[2];
00889 FBPropertyInt CroppingY[2];
00890
00891 FBPropertyVideo Video;
00892
00893 FBPropertyBool TakeBased;
00894
00895 void OGLInit(HFBRenderOptions pRenderOptions = NULL);
00896 unsigned int GetTextureObject();
00897 double* GetMatrix();
00898 };
00899
00901
00903 __FB_FORWARD( FBLayeredTexture );
00904
00906
00907
00908 class FBSDK_DLL FBLayeredTexture : public FBTexture {
00909 __FBClassDeclare( FBLayeredTexture,FBTexture );
00910 public:
00915 FBLayeredTexture(char *pName, HIObject pObject=NULL);
00916 virtual void FBDelete();
00917
00922 FBLayeredTexture* Clone();
00923
00924 FBPropertyListTexture Layers;
00925 };
00926
00928
00931 enum FBMaterialTextureType {
00932 kFBMaterialTextureEmissive,
00933 kFBMaterialTextureEmissiveFactor,
00934 kFBMaterialTextureAmbient,
00935 kFBMaterialTextureAmbientFactor,
00936 kFBMaterialTextureDiffuse,
00937 kFBMaterialTextureDiffuseFactor,
00938 kFBMaterialTextureSpecular,
00939 kFBMaterialTextureSpecularFactor,
00940 kFBMaterialTextureShiness,
00941 kFBMaterialTextureBump,
00942 kFBMaterialTextureNormalMap,
00943 kFBMaterialTextureTransparent,
00944 kFBMaterialTextureTransparentFactor,
00945 kFBMaterialTextureReflection,
00946 kFBMaterialTextureReflectionFactor,
00947 kFBMaterialTextureDisplacementColor
00948 };
00949
00950
00951
00953 class FBSDK_DLL FBMaterial : public FBBox {
00954 __FBClassDeclare( FBMaterial,FBBox );
00955 public:
00960 FBMaterial(char *pName, HIObject pObject=NULL);
00961
00966 FBMaterial* Clone();
00967
00968 FBPropertyAnimatableColor Ambient;
00969 FBPropertyAnimatableDouble AmbientFactor;
00970
00971 FBPropertyAnimatableColor Emissive;
00972 FBPropertyAnimatableDouble EmissiveFactor;
00973
00974 FBPropertyAnimatableColor Diffuse;
00975 FBPropertyAnimatableDouble DiffuseFactor;
00976
00977 FBPropertyAnimatableColor TransparentColor;
00978 FBPropertyAnimatableDouble TransparencyFactor;
00979
00980 FBPropertyAnimatableColor Bump;
00981 FBPropertyAnimatableColor NormalMap;
00982 FBPropertyAnimatableDouble BumpFactor;
00983
00984 FBPropertyAnimatableColor Specular;
00985 FBPropertyAnimatableDouble SpecularFactor;
00986 FBPropertyAnimatableDouble Shininess;
00987
00988 FBPropertyAnimatableColor Reflection;
00989 FBPropertyAnimatableDouble ReflectionFactor;
00990
00991 FBPropertyAnimatableColor DisplacementColor;
00992 FBPropertyAnimatableDouble DisplacementFactor;
00993
00997 HFBTexture GetTexture(FBMaterialTextureType = kFBMaterialTextureDiffuse);
00998
01003 void SetTexture(FBTexture* pTexture, FBMaterialTextureType pType = kFBMaterialTextureDiffuse);
01004
01006 void OGLInit();
01007 };
01008
01010
01013 enum FBClusterMode {
01014 kFBClusterNormalize,
01015 kFBClusterAdditive,
01016 kFBClusterTotal100
01017 };
01018 FB_DEFINE_ENUM( FBSDK_DLL, ClusterMode );
01019
01020 __FB_FORWARD( FBCluster );
01021
01025 class FBSDK_DLL FBCluster : public FBComponent {
01026 __FBClassDeclare( FBCluster,FBComponent );
01027
01028 protected:
01032 FBCluster(HFBModel pModel);
01033 friend class DataFBModel;
01034
01035 public:
01036
01037
01042 int ClusterBegin(int pIndex = -1);
01043
01047 int ClusterEnd();
01048
01049
01054 void LinkSetName(char *pName, int pLinkNumber);
01059 char* LinkGetName(int pLinkNumber);
01063 void LinkRemove(int pLinkNumber);
01067 int LinkGetCount();
01071 void LinkSetModel(HFBModel pModel);
01076 HFBModel LinkGetModel(int pLinkNumber);
01081 HFBModel LinkGetAssociateModel(int pLinkNumber);
01085 void LinkClearUnused( double pThreshold = -1.0 );
01090 void LinkSetCurrentVertex(int pLinkIndex,int pPointIndex);
01095 int LinkGetVertexIndex(int pIndex);
01096
01097
01103 void VertexSetTransform(FBVector3d pPosition,FBVector3d pRotation, FBVector3d pScaling);
01109 void VertexGetTransform(FBVector3d& pPosition,FBVector3d& pRotation, FBVector3d& pScaling);
01114 void VertexAdd(int pVertexIndex,double pWeight);
01118 void VertexRemove(int pVertexIndex);
01122 int VertexGetCount();
01127 int VertexGetNumber(int pIndex);
01132 double VertexGetWeight(int pIndex);
01137 void VertexSetWeight(double pWeight,int pIndex);
01140 void VertexClear();
01141
01142 FBPropertyClusterMode ClusterMode;
01143 FBPropertyDouble ClusterAccuracy;
01144 };
01145
01147
01149 __FB_FORWARD( FBCamera );
01150
01152 enum FBCameraFrameSizeMode {
01153 kFBFrameSizeWindow,
01154 kFBFrameSizeFixedRatio,
01155 kFBFrameSizeFixedResolution,
01156 kFBFrameSizeFixedWidthResolution,
01157 kFBFrameSizeFixedHeightResolution
01158 };
01160
01161 enum FBCameraResolutionMode {
01162 kFBResolutionCustom,
01163 kFBResolutionD1NTSC,
01164 kFBResolutionNTSC,
01165 kFBResolutionPAL,
01166 kFBResolutionD1PAL,
01167 kFBResolutionHD,
01168 kFBResolution640x480,
01169 kFBResolution320x200,
01170 kFBResolution320x240,
01171 kFBResolution128x128,
01172 kFBResolutionFullScreen
01173 };
01175
01176 enum FBCameraApertureMode {
01177 kFBApertureVertical,
01178 kFBApertureHorizontal,
01179 kFBApertureVertHoriz,
01180 kFBApertureFocalLength
01181 };
01183
01184 enum FBCameraFilmBackType {
01185 kFBFilmBackCustom,
01186 kFBFilmBack16mmTheatrical,
01187 kFBFilmBackSuper16mm,
01188 kFBFilmBack35mmAcademy,
01189 kFBFilmBack35mmTVProjection,
01190 kFBFilmBack35mmFullAperture,
01191 kFBFilmBack35mm185Projection,
01192 kFBFilmBack35mmAnamorphic,
01193 kFBFilmBack70mmProjection,
01194 kFBFilmBackVistaVision,
01195 kFBFilmBackDynavision,
01196 kFBFilmBackIMAX
01197 };
01199
01200 enum FBCameraViewPlaneMode {
01201 kFBViewPlaneDisabled,
01202 kFBViewPlaneAlways,
01203 kFBViewPlaneWhenMedia
01204 };
01206
01207 enum FBCameraDistanceMode {
01208 kFBDistModeRelativeToInterest,
01209 kFBDistModeAbsoluteFromCamera
01210 };
01212
01213 enum FBCameraSafeAreaMode {
01214 kFBSafeAreaSquare,
01215 kFBSafeAreaRound
01216 };
01218
01219 enum FBCameraAntiAliasingMethod {
01220 kFBAntiAliasingSoftware,
01221 kFBAntialiasingMultiSamplingOnyx
01222 };
01224
01225 enum FBCameraSamplingType {
01226 kFBSamplingUniform,
01227 kFBSamplingStochastic
01228 };
01230
01231 enum FBCameraFocusDistanceSource {
01232 kFBFocusDistanceCameraInterest,
01233 kFBFocusDistanceSpecificDistance
01234 };
01235
01237
01238 enum FBCameraType {
01239 kFBCameraTypePerspective,
01240 kFBCameraTypeOrthogonal
01241 };
01242
01244
01245 enum FBCameraMatrixType {
01246 kFBProjection,
01247 kFBModelView
01248 };
01249
01250
01251 FB_DEFINE_ENUM( FBSDK_DLL, CameraType );
01252 FB_DEFINE_ENUM( FBSDK_DLL, CameraApertureMode );
01253 FB_DEFINE_ENUM( FBSDK_DLL, CameraFilmBackType );
01254 FB_DEFINE_ENUM( FBSDK_DLL, CameraFrameSizeMode );
01255 FB_DEFINE_ENUM( FBSDK_DLL, CameraResolutionMode );
01256 FB_DEFINE_ENUM( FBSDK_DLL, CameraViewPlaneMode );
01257 FB_DEFINE_ENUM( FBSDK_DLL, CameraDistanceMode );
01258 FB_DEFINE_ENUM( FBSDK_DLL, CameraSafeAreaMode );
01259 FB_DEFINE_ENUM( FBSDK_DLL, CameraAntiAliasingMethod );
01260 FB_DEFINE_ENUM( FBSDK_DLL, CameraSamplingType );
01261 FB_DEFINE_ENUM( FBSDK_DLL, CameraFocusDistanceSource );
01262 FB_DEFINE_ENUM( FBSDK_DLL, CameraMatrixType );
01263
01280 class FBSDK_DLL FBCamera : public FBModel {
01281 __FBClassDeclare( FBCamera,FBModel );
01282 public:
01287 FBCamera(char * pName, HIObject pObject=NULL);
01288
01289 FBPropertyBool SystemCamera;
01290
01291
01292 FBPropertyCameraFrameSizeMode FrameSizeMode;
01293 FBPropertyCameraResolutionMode ResolutionMode;
01294 FBPropertyDouble ResolutionWidth;
01295 FBPropertyDouble ResolutionHeight;
01296 FBPropertyDouble WindowHeight;
01297 FBPropertyDouble PixelAspectRatio;
01298 FBPropertyDouble NearPlaneDistance;
01299 FBPropertyDouble FarPlaneDistance;
01300 FBPropertyBool MouseLockCamera;
01301 FBPropertyCameraType Type;
01302 FBPropertyCameraApertureMode ApertureMode;
01303 FBPropertyAnimatableDouble FieldOfView;
01304
01305 FBPropertyAnimatableDouble FieldOfViewX;
01306 FBPropertyAnimatableDouble FieldOfViewY;
01307 FBPropertyAnimatableDouble OpticalCenterX;
01308 FBPropertyAnimatableDouble OpticalCenterY;
01309 FBPropertyAnimatableDouble FocalLength;
01310
01311 FBPropertyCameraFilmBackType FilmBackType;
01312 FBPropertyDouble FilmSizeWidth;
01313 FBPropertyDouble FilmSizeHeight;
01314 FBPropertyDouble FilmAspectRatio;
01315 FBPropertyDouble SqueezeRatio;
01316 FBPropertyDouble OrthogonalVerticalSize;
01317
01318
01319 FBPropertyVideo BackGroundMedia;
01320 FBPropertyCameraViewPlaneMode ViewBackGroundPlaneMode;
01321 FBPropertyBool BackGroundImageCenter;
01322 FBPropertyBool BackGroundImageFit;
01323 FBPropertyBool BackGroundImageKeepRatio;
01324 FBPropertyBool BackGroundImageCrop;
01325 FBPropertyDouble BackGroundPlaneDistance;
01326 FBPropertyCameraDistanceMode BackGroundPlaneDistanceMode;
01327
01328
01329 FBPropertyAnimatableDouble ForeGroundAlpha;
01330 FBPropertyDouble ForeGroundMaterialThreshold;
01331 FBPropertyBool ForeGroundTransparent;
01332 FBPropertyVideo ForeGroundMedia;
01333 FBPropertyCameraViewPlaneMode ViewForeGroundPlaneMode;
01334 FBPropertyBool ForeGroundImageCenter;
01335 FBPropertyBool ForeGroundImageFit;
01336 FBPropertyBool ForeGroundImageKeepRatio;
01337 FBPropertyBool ForeGroundImageCrop;
01338 FBPropertyDouble ForeGroundPlaneDistance;
01339 FBPropertyCameraDistanceMode ForeGroundPlaneDistanceMode;
01340
01341
01342 FBPropertyBool ViewCameraInterest;
01343 FBPropertyBool ViewNearFarPlane;
01344 FBPropertyBool ViewShowGrid;
01345 FBPropertyBool ViewShowAxis;
01346 FBPropertyBool ViewShowTimeCode;
01347 FBPropertyBool ViewDisplaySafeArea;
01348 FBPropertyBool ViewOpticalCenter;
01349 FBPropertyCameraSafeAreaMode SafeAreaMode;
01350
01351 FBPropertyAnimatableColor BackGroundColor;
01352 FBPropertyBool UseFrameColor;
01353 FBPropertyColor FrameColor;
01354
01355
01356
01357 FBPropertyBool UseAntiAliasing;
01358 FBPropertyBool UseDepthOfField;
01359 FBPropertyBool InteractiveMode;
01360
01361
01362 FBPropertyDouble AntiAliasingIntensity;
01363 FBPropertyCameraAntiAliasingMethod AntiAliasingMethod;
01364 FBPropertyInt NumberOfSamples;
01365 FBPropertyCameraSamplingType SamplingType;
01366 FBPropertyBool UseAccumulationBuffer;
01367
01368
01369 FBPropertyCameraFocusDistanceSource FocusDistanceSource;
01370 FBPropertyDouble FocusSpecificDistance;
01371 FBPropertyDouble FocusAngle;
01372
01373
01374 FBPropertyBool Use2DMagnifier;
01375 FBPropertyBool Display2DMagnifierFrame;
01376 FBPropertyAnimatableDouble MagnifierZoom;
01377 FBPropertyAnimatableDouble MagnifierPosX;
01378 FBPropertyAnimatableDouble MagnifierPosY;
01379
01380
01381 FBPropertyModel Interest;
01382 FBPropertyAnimatableDouble Roll;
01383 FBPropertyAnimatableDouble TurnTable;
01384 FBPropertyBool DisplayTurnTableIcon;
01385
01390 double* GetMatrix( FBCameraMatrixType pType );
01391 };
01392
01394
01396 __FB_FORWARD( FBCameraStereo );
01397
01399
01400 enum FBCameraStereoType
01401 {
01402 kFBCameraStereoNone,
01403 kFBCameraStereoConverged,
01404 kFBCameraStereoOff_Axis,
01405 kFBCameraStereoParallel
01406 };
01407
01408 FB_DEFINE_ENUM( FBSDK_DLL, CameraStereoType);
01409
01410 class FBSDK_DLL FBCameraStereo : public FBCamera
01411 {
01412 __FBClassDeclare(FBCameraStereo, FBCamera);
01413 public:
01418 FBCameraStereo(char * pName, HIObject pObject=NULL);
01419
01420 FBPropertyCameraStereoType Stereo;
01421 FBPropertyAnimatableDouble InteraxialSeparation;
01422 FBPropertyAnimatableDouble ZeroParallax;
01423 FBPropertyAnimatableDouble ToeInAdjust;
01424 FBPropertyAnimatableDouble FilmOffsetRightCam;
01425 FBPropertyAnimatableDouble FilmOffsetLeftCam;
01426
01427 FBPropertyCamera RightCamera;
01428 FBPropertyCamera LeftCamera;
01429 FBPropertyCamera CenterCamera;
01430
01431 FBPropertyString PrecompFileName;
01432 FBPropertyString RelativePrecompFileName;
01433
01434 FBPropertyBool DisplayZeroParallaxPlane;
01435 FBPropertyDouble ZeroParallaxPlaneTransparency;
01436 FBPropertyColor ZeroParallaxPlaneColor;
01437 };
01438
01440
01443 class FBSDK_DLL FBPropertyListCamera : public FBPropertyListComponent
01444 {
01445 public:
01446 FBPropertyListCamera();
01451 FBCamera* operator[](int pIndex);
01452 };
01453
01455
01457 __FB_FORWARD( FBCameraSwitcher );
01458
01464 class FBSDK_DLL FBCameraSwitcher : public FBModel
01465 {
01466 __FBClassDeclare( FBCameraSwitcher, FBBox );
01467 public:
01470 FBCameraSwitcher();
01471
01472 FBPropertyCamera CurrentCamera;
01473 FBPropertyInt CurrentCameraIndex;
01474 };
01475
01476
01478
01480 __FB_FORWARD( FBGlobalLight );
01481
01483 enum FBFogMode {
01484 kFBFogModeLinear,
01485 kFBFogModeExponential,
01486 kFBFogModeSquareExponential
01487 };
01488
01489 FB_DEFINE_ENUM( FBSDK_DLL, FogMode );
01490
01492 class FBSDK_DLL FBGlobalLight : public FBBox
01493 {
01494 __FBClassDeclare( FBGlobalLight, FBBox );
01495 public:
01497 FBGlobalLight();
01498
01499 FBPropertyAnimatableColor AmbientColor;
01500
01501
01502 FBPropertyBool FogEnable;
01503
01504 FBPropertyAnimatableColor FogColor;
01505 FBPropertyAnimatableDouble FogBegin;
01506 FBPropertyAnimatableDouble FogEnd;
01507 FBPropertyAnimatableDouble FogDensity;
01508
01509 FBPropertyFogMode FogMode;
01510 };
01511
01513
01515 __FB_FORWARD( FBLight );
01516
01518 enum FBLightType {
01519 kFBLightTypePoint,
01520 kFBLightTypeInfinite,
01521 kFBLightTypeSpot
01522 };
01523
01524 FB_DEFINE_ENUM( FBSDK_DLL, LightType );
01525
01526
01528 enum FBAttenuationType {
01529 kFBAttenuationNone = 0,
01530 kFBAttenuationLinear,
01531 kFBAttenuationQuadratic,
01532 kFBAttenuationCubic
01533 };
01534
01535 FB_DEFINE_ENUM( FBSDK_DLL, AttenuationType );
01536
01538 class FBSDK_DLL FBLight : public FBModel
01539 {
01540 __FBClassDeclare( FBLight,FBModel );
01541 public:
01546 FBLight(char *pName, HIObject pObject=NULL);
01547
01548
01549 FBPropertyLightType LightType;
01550 FBPropertyAttenuationType AttenuationType;
01551 FBPropertyAnimatableDouble Intensity;
01552 FBPropertyAnimatableDouble ConeAngle;
01553 FBPropertyAnimatableDouble FogIntensity;
01554 FBPropertyAnimatableColor DiffuseColor;
01555 FBPropertyBool CastLightOnObject;
01556
01557
01558 FBPropertyBool DrawGroundProjection;
01559 FBPropertyBool DrawVolumetricLight;
01560 FBPropertyBool DrawFrontFacingVolumetric;
01561 FBPropertyVideo GoboMedia;
01562 };
01563
01565
01568 class FBSDK_DLL FBPropertyListLight : public FBPropertyListComponent
01569 {
01570 public:
01571 FBPropertyListLight();
01576 FBLight* operator[](int pIndex);
01577 };
01578
01580
01582 __FB_FORWARD( FBModelVertexData );
01583
01584 enum FBGeometryPrimitiveType
01585 {
01586 kFBGeometry_POINTS = 0x0000,
01587 kFBGeometry_LINES = 0x0001,
01588 kFBGeometry_LINE_LOOP = 0x0002,
01589 kFBGeometry_LINE_STRIP = 0x0003,
01590 kFBGeometry_TRIANGLES = 0x0004,
01591 kFBGeometry_TRIANGLE_STRIP = 0x0005,
01592 kFBGeometry_TRIANGLE_FAN = 0x0006,
01593 kFBGeometry_QUADS = 0x0007,
01594 kFBGeometry_QUADS_STRIP = 0x0008,
01595 kFBGeometry_POLYGON = 0x0009,
01596 };
01597
01599 enum FBGeometryArrayID {
01600 kFBGeometryArrayID_Point,
01601 kFBGeometryArrayID_NormalByPoint,
01602 kFBGeometryArrayID_Tangent,
01603 kFBGeometryArrayID_Binormal,
01604 kFBGeometryArrayID_VertexColor
01605 };
01606
01608 enum FBGeometryArrayElementType {
01609 kFBGeometryArrayElementType_Unknown,
01610 kFBGeometryArrayElementType_Integer,
01611 kFBGeometryArrayElementType_Float,
01612 kFBGeometryArrayElementType_Float2,
01613 kFBGeometryArrayElementType_Float3,
01614 kFBGeometryArrayElementType_Float4,
01615 kFBGeometryArrayElementType_FloatMatrix4x4,
01616 kFBGeometryArrayElementType_IntegerArrayPointer
01617 };
01618
01619 class FBSDK_DLL FBModelVertexData : public FBComponent {
01620 __FBClassDeclare( FBModelVertexData,FBComponent );
01621
01622 protected:
01623 FBModelVertexData(HFBModel pModel);
01624 friend class DataFBModel;
01625
01626 public:
01627
01629 bool IsDeformable();
01630
01632 bool IsDrawable();
01633
01635 int GetVertexCount();
01636
01641
01643 int GetSubPatchCount();
01644
01646 int GetSubPatchMaterialId(int pSubPatchIndex);
01647
01649 FBMaterial* GetSubPatchMaterial(int pSubPatchIndex);
01650
01654 FBGeometryPrimitiveType GetSubPatchPrimitiveType(int pSubPatchIndex);
01655
01657 int GetSubPatchIndexOffset(int pSubPatchIndex);
01658
01660 int GetSubPatchIndexSize(int pSubPatchIndex);
01661
01666 void DrawSubPatch(int pSubPatchIndex, bool pWireFrame = false);
01667
01669
01675
01677 int GetSubRegionCount();
01678
01682 FBMaterial* GetSubRegionMaterial(int pSubRegionIndex);
01683
01688 void DrawSubRegion(int pSubRegionIndex, bool pWireFrame = false);
01689
01691
01698 void EnableOGLVertexData(bool pAfterdeform = true);
01699
01701 void DisableOGLVertexData();
01702
01708 void VertexArrayMappingRequest();
01709
01719 const int* GetVertexArrayDuplicationMap(unsigned int& pDuplicatedVertexCound);
01720
01722 void VertexArrayMappingRelease();
01723
01725 int* GetIndexArray();
01726
01728 unsigned int GetIndexArrayVBOId();
01729
01735 FBGeometryArrayElementType GetVertexArrayType(FBGeometryArrayID pArrayId, bool pAfterDeform = true);
01736
01742 void* GetVertexArray(FBGeometryArrayID pArrayId, bool pAfterDeform = true);
01743
01749 unsigned int GetVertexArrayVBOId(FBGeometryArrayID pArrayId, bool pAfterDeform = true);
01750
01756 void* GetVertexArrayVBOOffset(FBGeometryArrayID pArrayId, bool pAfterDeform = true);
01757
01759
01766 void EnableOGLUVSet(FBTextureMapping pTextrueMapping = kFBTextureMappingUV, const char* pUVSet = NULL);
01767
01769 void DisableOGLUVSet();
01770
01776 FBGeometryArrayElementType GetUVSetArrayFormat(FBTextureMapping pTextrueMapping = kFBTextureMappingUV, const char* pUVSet = NULL);
01777
01783 void* GetUVSetArray(FBTextureMapping pTextrueMapping = kFBTextureMappingUV, const char* pUVSet = NULL);
01784
01790 unsigned int GetUVSetVBOId(FBTextureMapping pTextrueMapping = kFBTextureMappingUV, const char* pUVSet = NULL);
01791
01797 void* GetUVSetVBOOffset(FBTextureMapping pTextrueMapping = kFBTextureMappingUV, const char* pUVSet = NULL);
01798
01800 };
01801
01802
01804
01806 __FB_FORWARD( FBGeometry );
01807
01808
01819 enum FBGeometryMappingMode
01820 {
01821 kFBGeometryMapping_NONE,
01822 kFBGeometryMapping_BY_CONTROL_POINT,
01823 kFBGeometryMapping_BY_POLYGON_VERTEX,
01824 kFBGeometryMapping_BY_POLYGON,
01825 kFBGeometryMapping_BY_EDGE,
01826 kFBGeometryMapping_ALL_SAME
01827 } ;
01828
01840 enum FBGeometryReferenceMode
01841 {
01842 kFBGeometryReference_DIRECT,
01843 kFBGeometryReference_INDEX,
01844 kFBGeometryReference_INDEX_TO_DIRECT
01845 };
01846
01847 FB_DEFINE_ENUM( FBSDK_DLL, GeometryMappingMode );
01848 FB_DEFINE_ENUM( FBSDK_DLL, GeometryReferenceMode );
01849
01850 enum kFBGeometryUpdateFlags
01851 {
01852 kFBGeometryUpdateNone = 0,
01853 kFBGeometryUpdateAll = 1 << 0,
01854 kFBGeometryUpdatePositionAndNormal = 1 << 1,
01855 kFBGeometryUpdateSkinWeight = 1 << 2,
01856 kFBGeometryUpdateInverseNormal = 1 << 3,
01857 kFBGeometryUpdateMappingMode = 1 << 4,
01858 };
01859
01876 class FBSDK_DLL FBGeometry : public FBComponent {
01877 __FBClassDeclare( FBGeometry,FBComponent );
01878
01883 FBGeometry(char *pName, HIObject pObject=NULL);
01884
01885 public:
01894
01898 bool GeometryBegin();
01899 bool GeometryEnd();
01901
01911 void VertexInit (int pSize, bool pResize, bool pInitUV = true, bool pInitVertexColor = false);
01912
01917 bool VertexClear ();
01918
01924 int VertexAdd (FBVertex pVertex);
01925
01931 int VertexAdd (FBVertex pVertex, FBNormal pNormal);
01932
01939 int VertexAdd (FBVertex pVertex, FBNormal pNormal, FBUV pUV);
01940
01948 int VertexAdd (FBVertex pVertex, FBNormal pNormal, FBUV pUV, FBColorF pVertexColor);
01949
01957 int VertexAdd (double px, double py, double pz);
01958
01959 int VertexAdd (double px, double py, double pz, double nx, double ny, double nz);
01960 int VertexAdd (double px, double py, double pz, double nx, double ny, double nz, double UVu, double UVv);
01961 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);
01962
01968 bool VertexSet (FBVertex pVertex,int pIndex=-1);
01969
01977 bool VertexSet (double px, double py, double pz,int pIndex=-1);
01978
01984 bool VertexNormalSet(FBNormal pVertex,int pIndex=-1);
01985
01993 bool VertexNormalSet(double px, double py, double pz,int pIndex=-1);
01994
01995
02001 bool VertexUVSet(FBUV pUV, int pIndex=-1);
02002
02009 bool VertexUVSet(float pU, float pV, int pIndex=-1);
02010
02016 bool VertexColorSet(FBColorF pColor, int pIndex=-1);
02017
02026 bool VertexColorSet(float pRed, float pGreen, float pBlue, float pAlpha, int pIndex=-1);
02027
02029
02034
02038 int VertexCount () const;
02039
02044 FBVertex VertexGet (int pIndex) const;
02045
02049 FBVertex* GetVertexes() const;
02050
02055 FBNormal VertexNormalGet(int pIndex=-1) const;
02056
02061 FBUV VertexUVGet(int pIndex=-1) const;
02062
02067 FBColorF VertexColorGet(int pIndex=-1) const;
02068
02070
02071
02076
02077 FBPropertyGeometryMappingMode NormalMappingMode;
02078 FBPropertyGeometryReferenceMode NormalReferenceMode;
02079
02084 int* GetNormalsIndexArray(int& pOutArrayCount) const;
02085
02090 FBNormal* GetNormalsDirectArray(int& pOutArrayCount) const;
02091
02092 FBPropertyGeometryMappingMode VertexColorMappingMode;
02093 FBPropertyGeometryReferenceMode VertexColorReferenceMode;
02094
02099 int* GetVertexColorsIndexArray(int& pOutArrayCount) const;
02100
02105 FBColorF* GetVertexColorsDirectArray(int& pOutArrayCount) const;
02106
02110 FBStringList GetUVSets() const;
02111
02116 FBGeometryMappingMode GetUVSetMappingMode(const char* pUVSetName) const;
02117
02122 FBGeometryReferenceMode GetUVSetReferenceMode(const char* pUVSetName) const;
02123
02129 int* GetVUVSetIndexArray(int& pOutArrayCount, const char* pUVSetName) const;
02130
02136 FBUV* GetUVSetDirectArray(int& pOutArrayCount, const char* pUVsetName = NULL) const;
02137
02138 FBPropertyGeometryMappingMode MaterialMappingMode;
02139
02144 int* GetMaterialIndexArray(int& pOutArrayCount, const char* pUVSetName) const;
02145
02147
02148
02153
02158 bool VertexGetSelected(int pIndex);
02164 bool VertexSetSelected(int pIndex,bool pState);
02165
02170 bool VertexGetVisible(int pIndex);
02176 bool VertexSetVisible(int pIndex,bool pState);
02177
02182 bool VertexGetTransformable(int pIndex);
02184
02189
02191 int ShapeGetCount() const;
02192
02194 const char* ShapeGetName(int pShapeIdx) const;
02195
02200 int ShapeAdd(const char* pName);
02201
02203 void ShapeClearAll();
02204
02210 void ShapeInit(int pShapeIdx, int pDiffSize, bool pWithNormal = false);
02211
02215 int ShapeGetDiffPointCount(int pShapeIdx) const;
02216
02224 bool ShapeSetDiffPoint(int pShapeIdx, int pDiffIndex, int pOriIndex, const FBVertex& pPosDiff);
02225 bool ShapeSetDiffPoint(int pShapeIdx, int pDiffIndex, int pOriIndex, const FBVertex& pPosDiff, const FBNormal& pNormalDiff);
02226
02234 bool ShapeGetDiffPoint(int pShapeIdx, int pDiffIndex, int& pOriIndex, FBVertex& pPosDiff) const;
02235 bool ShapeGetDiffPoint(int pShapeIdx, int pDiffIndex, int& pOriIndex, FBVertex& pPosDiff, FBNormal& pNormalDiff) const;
02236
02238
02239
02244
02250 void ModifyNotify( kFBGeometryUpdateFlags pFlags=kFBGeometryUpdateAll, int pFirstIndex=-1, int pLastIndex=-1 );
02251
02253 };
02254
02256
02258 __FB_FORWARD( FBMesh );
02259
02261 class FBSDK_DLL FBMesh : public FBGeometry {
02262 __FBClassDeclare( FBMesh,FBGeometry );
02263
02264 public:
02269 FBMesh(char *pName, HIObject pObject=NULL);
02270
02271
02275 int PolygonBegin();
02276
02281 bool PolygonVertexAdd(int pVertex);
02282
02287 int PolygonMaterialIdGet(int pIndex=-1);
02288
02293 int PolygonEnd();
02294
02299 int PolygonVertexCount(int pPolygonIndex);
02300
02306 int PolygonVertexIndex(int pPolygonIndex, int pVertexPolygonIndex);
02307
02311 int PolygonCount();
02312
02316 void ComputeVertexNormals(bool pCW = false);
02317
02319 void InverseNormal();
02320 };
02321
02323
02325 __FB_FORWARD( FBSurface );
02326
02328 enum FBSurfaceMode
02329 {
02330 kFBSurfaceModeRaw,
02331 kFBSurfaceModeLowNoNormals,
02332 kFBSurfaceModeLow,
02333 kFBSurfaceModeHighNoNormals,
02334 kFBSurfaceModeHigh
02335 };
02336 FB_DEFINE_ENUM( FBSDK_DLL, SurfaceMode );
02337
02339 enum FBSurfaceType
02340 {
02341 kFBSurfaceTypeBezier,
02342 kFBSurfaceTypeBezierQuadric,
02343 kFBSurfaceTypeCardinal,
02344 kFBSurfaceTypeBspline,
02345 kFBSurfaceTypeLinear,
02346 };
02347 FB_DEFINE_ENUM( FBSDK_DLL, SurfaceType );
02348
02349
02351 class FBSDK_DLL FBSurface : public FBGeometry
02352 {
02353 __FBClassDeclare( FBSurface, FBGeometry );
02354
02359 FBSurface(char* pName, HIObject pObject=NULL);
02360
02361 public:
02362
02363 IObject_Declare( Implementation );
02364
02365 virtual void SurfaceBegin();
02366 virtual void SurfaceEnd();
02367 virtual void SurfaceEditBegin();
02368 virtual void SurfaceEditEnd();
02369 virtual bool GetSurfaceCapped( int pUorV, int pDirection );
02370 virtual int GetVertexCount( int pUorVorGlobal = -1 );
02371 virtual void ControlPointsBegin() = 0;
02372 virtual void SetControlPoint( int pIndex, double pX, double pY, double pZ, double pW );
02373 virtual void GetControlPoint( int pIndex, double &pX, double &pY, double &pZ, double &pW );
02374 virtual void ControlPointsEnd();
02375
02381 bool VertexGetSelected(int pU,int pV);
02388 bool VertexSetSelected(int pU,int pV,bool pState);
02389
02395 bool VertexGetVisible(int pU,int pV);
02396
02403 bool VertexSetVisible(int pU,int pV,bool pState);
02404
02410 bool VertexGetTransformable(int pU,int pV);
02411
02412
02413 FBPropertyInt USize;
02414 FBPropertyInt VSize;
02415 FBPropertyInt UStep;
02416 FBPropertyInt VStep;
02417 FBPropertyBool UClosed;
02418 FBPropertyBool VClosed;
02419 FBPropertySurfaceMode SurfaceMode;
02420
02421 private:
02422 void FBSurfaceInitProperties();
02423 };
02424
02426 enum FBNurbType
02427 {
02428 kFBNurbTypePeriodic,
02429 kFBNurbTypeClosed,
02430 kFBNurbTypeOpen,
02431 };
02432 FB_DEFINE_ENUM( FBSDK_DLL, NurbType );
02433
02434
02436
02438 __FB_FORWARD( FBNurbs );
02439
02441 class FBSDK_DLL FBNurbs : public FBSurface
02442 {
02443 __FBClassDeclare( FBNurbs, FBSurface );
02444
02445 public:
02450 FBNurbs(char *pName, HIObject pObject=NULL);
02451
02454 virtual void SurfaceBegin();
02455
02458 virtual void SurfaceEnd();
02459
02462 virtual void SurfaceEditBegin();
02465 virtual void SurfaceEditEnd();
02468 virtual void ControlPointsBegin();
02471 virtual void ControlPointsEnd();
02476 virtual void SetControlWeight( int pIndex, double pWeight );
02481 virtual double GetControlWeight( int pIndex );
02487 virtual void SetControlMultiplicity( int pUorV, int pIndex, int pMultiplicity );
02492 virtual int GetControlMultiplicity( int pUorV, int pIndex );
02498 virtual void SetControlKnotValue( int pUorV, int pIndex, double pKnotValue );
02503 virtual double GetControlKnotValue( int pUorV, int pIndex );
02508 virtual int GetKnotCount( int pUorV );
02509
02510 FBPropertyInt UOrder;
02511 FBPropertyInt VOrder;
02512 FBPropertyNurbType UNurbType;
02513 FBPropertyNurbType VNurbType;
02514
02515 private:
02516 void FBNurbsInitProperties();
02517 };
02518
02520
02522 __FB_FORWARD( FBPatch );
02523
02525 class FBSDK_DLL FBPatch : public FBSurface
02526 {
02527 __FBClassDeclare( FBPatch, FBSurface );
02528
02529 public:
02534 FBPatch(char *pName, HIObject pObject=NULL);
02535
02536
02539 virtual void SurfaceBegin();
02540
02543 virtual void SurfaceEnd();
02544
02547 virtual void SurfaceEditBegin();
02548
02551 virtual void SurfaceEditEnd();
02552
02555 virtual void ControlPointsBegin();
02558 virtual void ControlPointsEnd();
02559
02560
02561 FBPropertySurfaceType USurfaceType;
02562 FBPropertySurfaceType VSurfaceType;
02563
02564 private:
02565 void FBPatchInitProperties();
02566
02567 };
02568
02570
02572
02583 enum FBDeformerType
02584 {
02585 kFBDeformerUnkown,
02586 kFBDeformerSkeleton,
02587 kFBDeformerPointCache
02588 };
02589
02590 FB_DEFINE_ENUM( FBSDK_DLL, DeformerType );
02591
02592 __FB_FORWARD( FBDeformer );
02593
02595 class FBSDK_DLL FBDeformer : public FBComponent {
02596 __FBClassDeclare( FBDeformer,FBComponent );
02597
02598 public:
02603 FBDeformer(char *pName, HIObject pObject=NULL);
02604
02605 FBPropertyDeformerType DeformerType;
02606 };
02607
02609
02611 __FB_FORWARD( FBDeformerPointCache );
02612
02614 class FBSDK_DLL FBDeformerPointCache : public FBDeformer {
02615 __FBClassDeclare( FBDeformerPointCache,FBDeformer );
02616
02617 public:
02622 FBDeformerPointCache(char *pName, HIObject pObject=NULL);
02623
02624 FBPropertyPointCacheFile PointCacheFile;
02625
02626 FBPropertyBool Active;
02627
02628 FBPropertyInt ChannelIndex;
02629 FBPropertyString ChannelName;
02630
02631 FBPropertyInt ChannelCount;
02632 FBPropertyTime ChannelStart;
02633 FBPropertyTime ChannelEnd;
02634 FBPropertyBool ChannelSampleRegular;
02635 FBPropertyDouble ChannelFrameRate;
02636 FBPropertyInt ChannelPointCount;
02637 };
02638
02640
02642 __FB_FORWARD( FBPointCacheFile );
02643
02645 class FBSDK_DLL FBPointCacheFile : public FBComponent {
02646 __FBClassDeclare( FBPointCacheFile,FBComponent );
02647
02648 public:
02653 FBPointCacheFile(char *pName, HIObject pObject=NULL);
02654
02655 FBPropertyString CacheFileName;
02656 FBPropertyInt ChannelCount;
02657
02658 FBPropertyTime StartTime;
02659 FBPropertyTime StopTime;
02660 FBPropertyDouble PlaySpeed;
02661 FBPropertyTime Offset;
02662 FBPropertyBool FreeRunning;
02663 FBPropertyBool Loop;
02664 };
02665
02666 #ifdef FBSDKUseNamespace
02667 }
02668 #endif
02669 #endif