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
00063 typedef class FBSDK_DLL FBArrayTemplate<HFBModel> FBModelList;
00064
00065 FB_DEFINE_COMPONENT( FBSDK_DLL, Camera );
00066 FB_DEFINE_COMPONENT( FBSDK_DLL, Light );
00067 FB_DEFINE_COMPONENT( FBSDK_DLL, Model );
00068 FB_DEFINE_COMPONENT( FBSDK_DLL, Cluster );
00069 FB_DEFINE_COMPONENT( FBSDK_DLL, Geometry );
00070 FB_DEFINE_COMPONENT( FBSDK_DLL, Mesh );
00071 FB_DEFINE_COMPONENT( FBSDK_DLL, ModelVertexData );
00072 FB_DEFINE_COMPONENT( FBSDK_DLL, Video );
00073 FB_DEFINE_COMPONENT( FBSDK_DLL, AnimationNode );
00074
00078 FBSDK_DLL void FBModelTransactionBegin();
00079
00083 FBSDK_DLL void FBModelTransactionEnd();
00084
00086
00088 __FB_FORWARD( FBModel );
00089 __FB_FORWARD( FBPropertyListModel );
00090 FB_DEFINE_LIST( FBSDK_DLL, Model );
00091
00093 class FBSDK_DLL FBPropertyListModel : public FBPropertyListComponentBase
00094 {
00095 public:
00100 int Add ( HFBModel pItem );
00101
00106 int Remove ( HFBModel pItem );
00107
00111 virtual void RemoveAt( int pIndex );
00112
00117 FBModel* operator[](int pIndex);
00118
00122 virtual int GetCount();
00123 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00124 inline virtual FBComponent* GetAt(int pIndex) { return (FBComponent*)operator[](pIndex); }
00125 private:
00126 inline virtual int Add ( FBComponent* pItem ) { return Add((FBModel*)pItem); }
00127 inline virtual int Remove ( FBComponent* pItem ) { return Remove((FBModel*)pItem); }
00128 #endif
00129 };
00130
00132
00135 __FB_FORWARD( FBMaterial );
00136
00137 class FBSDK_DLL FBPropertyListMaterial : public FBPropertyListComponent
00138 {
00139 public:
00140 FBPropertyListMaterial();
00145 FBMaterial* operator[](int pIndex);
00146 };
00147
00149
00152 __FB_FORWARD( FBTexture );
00153
00154 class FBSDK_DLL FBPropertyListTexture : public FBPropertyListComponent
00155 {
00156 public:
00157 FBPropertyListTexture();
00164 virtual int Add( FBTexture* pItem );
00169 FBTexture* operator[](int pIndex);
00170
00171 private:
00172 inline virtual int Add ( FBComponent* pItem ) { return Add((FBTexture*)pItem); }
00173 };
00174
00176
00178 __FB_FORWARD( FBModel );
00179
00181 enum FBModelTransformationMatrix {
00182 kModelTransformation = 1<<0,
00183 kModelRotation = 1<<1,
00184 kModelTranslation = 1<<2,
00185 kModelScaling = 1<<3,
00186 kModelInverse_Transformation = 1<<4,
00187 kModelInverse_Rotation = 1<<5,
00188 kModelInverse_Translation = 1<<6,
00189 kModelInverse_Scaling = 1<<7,
00190 kModelCenter = 1<<8,
00191 kModelAll = (kModelCenter<<1)-1
00192 };
00193
00195 enum FBModelShadingMode {
00196 kFBModelShadingDefault,
00197 kFBModelShadingWire,
00198 kFBModelShadingFlat,
00199 kFBModelShadingLight,
00200 kFBModelShadingHard,
00201 kFBModelShadingTexture,
00202 kFBModelShadingAll,
00203 };
00204
00206 enum FBModelRenderPass {
00207 kFBModelRenderPassStandard,
00208 kFBModelRenderPassTransparency,
00209 kFBModelRenderPassPick,
00210 };
00211
00213 enum FBModelRotationOrder {
00214 kFBEulerXYZ = 0,
00215 kFBEulerXZY,
00216 kFBEulerYZX,
00217 kFBEulerYXZ,
00218 kFBEulerZXY,
00219 kFBEulerZYX,
00220 kFBSphericXYZ
00221 };
00222
00223 FB_DEFINE_ENUM( FBSDK_DLL, ModelShadingMode );
00224 FB_DEFINE_ENUM( FBSDK_DLL, ModelTransformationMatrix );
00225 FB_DEFINE_ENUM( FBSDK_DLL, ModelRotationOrder );
00226
00258 class FBSDK_DLL FBModel : public FBBox
00259 {
00260 __FBClassDeclare( FBModel,FBBox );
00261 public:
00266 FBModel(char *pName, HIObject pObject=NULL);
00267 virtual void FBDelete();
00268
00269 IQuery_Declare (Implementation);
00270 ICallback_Declare (Implementation);
00271
00272 FBPropertyListModel Children;
00273
00274 FBPropertyListShader Shaders;
00275 FBPropertyListMaterial Materials;
00276 FBPropertyListTexture Textures;
00277 FBPropertyBool Icon3D;
00278 FBPropertyBool SoftSelected;
00279 FBPropertyBool IsDeformable;
00280 FBPropertyBool IsConstrained;
00281 FBPropertyModel Parent;
00282 FBPropertyModel LookAt;
00283 FBPropertyModel UpVector;
00284 FBPropertyGeometry Geometry;
00285 FBPropertyMesh TessellatedMesh;
00286 FBPropertyModelVertexData ModelVertexData;
00287 FBPropertyCluster Cluster;
00288 FBPropertyScene Scene;
00289 FBPropertyModelShadingMode ShadingMode;
00290 FBPropertyAnimationNode AnimationNode;
00291
00292 FBPropertyModelRotationOrder RotationOrder;
00293
00294
00295 FBPropertyBool RotationSpaceForLimitOnly;
00296 FBPropertyBool RotationActive;
00297 FBPropertyVector3d PreRotation;
00298 FBPropertyVector3d PostRotation;
00299 FBPropertyVector3d RotationMin;
00300 FBPropertyVector3d RotationMax;
00301 FBPropertyBool RotationMinX;
00302 FBPropertyBool RotationMinY;
00303 FBPropertyBool RotationMinZ;
00304 FBPropertyBool RotationMaxX;
00305 FBPropertyBool RotationMaxY;
00306 FBPropertyBool RotationMaxZ;
00307
00308
00309 FBPropertyAnimatableDouble Visibility;
00310 FBPropertyAnimatableVector3d Translation;
00311 FBPropertyAnimatableVector3d Rotation;
00312 FBPropertyAnimatableVector3d Scaling;
00313
00314 FBPropertyVector3d GeometricTranslation;
00315 FBPropertyVector3d GeometricRotation;
00316 FBPropertyVector3d GeometricScaling;
00317
00318 FBPropertyBool QuaternionInterpolate;
00319
00320 FBPropertyBool Show;
00321 FBPropertyBool Pickable;
00322
00327 virtual HFBModel Clone();
00328
00336 void SetMatrix(FBMatrix pMatrix, int pWhat=kModelTransformation, bool pGlobalInfo=true, bool pPushUndo = false, HFBEvaluateInfo pEvaluateInfo=NULL);
00337
00344 void GetMatrix(FBMatrix &pMatrix, int pWhat=kModelTransformation, bool pGlobalInfo=true, HFBEvaluateInfo pEvaluateInfo=NULL);
00345
00353 void SetVector(FBVector3d pVector, int pWhat=kModelTranslation, bool pGlobalInfo=true, bool pPushUndo = false, HFBEvaluateInfo pEvaluateInfo=NULL);
00354
00361 void GetVector(FBVector3d &pVector, int pWhat=kModelTranslation, bool pGlobalInfo=true, HFBEvaluateInfo pEvaluateInfo=NULL);
00362
00367 void GetBoundingBox( FBVector3d& pMin, FBVector3d& pMax );
00368
00372 virtual bool HasCustomDisplay() { return false; }
00373
00381 virtual void CustomModelDisplay( FBCamera* pCamera, FBModelShadingMode pShadingMode, FBModelRenderPass pRenderPass, float pPickingAreaWidth, float pPickingAreaHeight) {}
00382
00396 virtual bool CustomModelPicking( int pNbHits, unsigned int *pSelectBuffer, FBCamera* pCamera,
00397 int pMouseX,int pMouseY,
00398 FBTVector* pLocalRaySrc, FBTVector* pLocalRayDir,
00399 FBTVector* pWorldRaySrc, FBTVector* pWorldRayDir,
00400 FBMatrix* pGlobalInverseMatrix,
00401 FBTVector* pOutPickedPoint) { return false; }
00402
00406 unsigned char* GetSelectedPoints();
00407
00411 int GetSelectedPointsCount();
00412
00417 virtual bool FbxStore(HFBFbxObject pFbxObject, kFbxObjectStore pStoreWhat);
00418 virtual bool FbxRetrieve(HFBFbxObject pFbxObject, kFbxObjectStore pStoreWhat);
00419
00427 void SetupPropertiesForShapes();
00428
00431 virtual char* FbxGetObjectType();
00432
00435 virtual char* FbxGetObjectSubType();
00436
00437 };
00438
00440
00442 __FB_FORWARD( FBModelNull);
00443
00445 class FBSDK_DLL FBModelNull : public FBModel {
00446 __FBClassDeclare( FBModelNull,FBModel );
00447 public:
00452 FBModelNull(char *pName, HIObject pObject=NULL);
00453
00454 FBPropertyDouble Size;
00455 };
00456
00458
00460 __FB_FORWARD( FBModelRoot);
00461
00463 class FBSDK_DLL FBModelRoot : public FBModel {
00464 __FBClassDeclare( FBModelRoot,FBModel );
00465 public:
00470 FBModelRoot(char *pName, HIObject pObject=NULL);
00471
00472 FBPropertyDouble Size;
00473 };
00474
00476
00478 __FB_FORWARD( FBModelMarker);
00479
00481 enum FBMarkerResolutionLevel
00482 {
00483 kFBMarkerLowResolution,
00484 kFBMarkerMediumResolution,
00485 kFBMarkerHighResolution
00486 };
00487
00489 enum FBMarkerLook
00490 {
00491 kFBMarkerLookCube,
00492 kFBMarkerLookHardCross,
00493 kFBMarkerLookLightCross,
00494 kFBMarkerLookSphere,
00495 kFBMarkerLookCapsule
00496 };
00497
00499 enum FBMarkerType
00500 {
00501 kFBMarkerTypeStandard,
00502 kFBMarkerTypeOptical,
00503 kFBMarkerTypeFKEffector,
00504 kFBMarkerTypeIKEffector
00505 };
00506
00507 FB_DEFINE_ENUM( FBSDK_DLL, MarkerResolutionLevel );
00508 FB_DEFINE_ENUM( FBSDK_DLL, MarkerLook );
00509 FB_DEFINE_ENUM( FBSDK_DLL, MarkerType );
00510
00512 class FBSDK_DLL FBModelMarker : public FBModel {
00513 __FBClassDeclare( FBModelMarker,FBModel );
00514 public:
00519 FBModelMarker(char *pName, HIObject pObject=NULL);
00520
00521 FBPropertyDouble Size;
00522 FBPropertyDouble Length;
00523 FBPropertyMarkerResolutionLevel ResLevel;
00524 FBPropertyMarkerLook Look;
00525 FBPropertyMarkerType Type;
00526 FBPropertyColor Color;
00527 FBPropertyVector3d IKPivot;
00528 FBPropertyBool IKSync;
00529
00533 void SetFKOpacity(double pValue);
00534 };
00535
00536
00538
00540 __FB_FORWARD( FBModelSkeleton);
00541
00543 class FBSDK_DLL FBModelSkeleton : public FBModel {
00544 __FBClassDeclare( FBModelSkeleton,FBModel );
00545 public:
00550 FBModelSkeleton(char *pName, HIObject pObject=NULL);
00551
00552 FBPropertyDouble Size;
00553 FBPropertyColor Color;
00554 };
00555
00557
00559 __FB_FORWARD( FBModelCube );
00560
00562 class FBSDK_DLL FBModelCube : public FBModel {
00563 __FBClassDeclare( FBModelCube, FBModel );
00564 public:
00569 FBModelCube(char *pName, HIObject pObject=NULL);
00570 };
00571
00573
00575 __FB_FORWARD( FBModelPlane );
00576
00578 class FBSDK_DLL FBModelPlane : public FBModel {
00579 __FBClassDeclare( FBModelPlane, FBModel );
00580 public:
00585 FBModelPlane(char *pName, HIObject pObject=NULL);
00586 };
00587
00589
00591 __FB_FORWARD( FBModelPath3D );
00592
00594 enum FBPathTangeantMode {
00595 kFBPathTangeantInvalid,
00596 kFBPathTangeantLinear,
00597 kFBPathTangeantCubic,
00598 kFBPathTangeantAuto,
00599 kFBPathTangeantUser
00600 };
00601
00602 FB_DEFINE_ENUM(FBSDK_DLL, PathTangeantMode);
00603
00605 class FBSDK_DLL FBModelPath3D : public FBModel
00606 {
00607 __FBClassDeclare(FBModelPath3D, FBModel);
00608
00609 public:
00633 FBModelPath3D(char* pName, HIObject pObject=NULL);
00634
00635
00636 void ShowCurveControls(bool pShow);
00637 void ShowCurvePoints(bool pShow);
00638
00639
00640 int PathKeyGetCount();
00641 FBVector4d PathKeyGet(int pKeyIndex);
00642 void PathKeySet(int pKeyIndex, FBVector4d pTLocal, bool pUpdate=true);
00643
00651 void PathSetKeyLeftRightTangeant(int pKeyIndex, FBVector4d pKeyTLocal, FBVector4d pLeftTangentTLocal, FBVector4d pRightTangentTLocal, bool pUpdate=true);
00652 void PathKeyRemove(int pKeyIndex);
00653 void PathKeyClear();
00654
00655
00656 void PathKeySetLeftTangeant(int pKeyIndex, FBVector4d pTLocal, bool pUpdate=true);
00657 void PathKeySetRightTangeant(int pKeyIndex, FBVector4d pTLocal, bool pUpdate=true);
00658 FBVector4d PathKeyGetLeftTangeant(int pKeyIndex);
00659 FBVector4d PathKeyGetRightTangeant(int pKeyIndex);
00660 void PathKeySetXDerivative(int pKeyIndex, double pDerivative, bool pUpdate);
00661 void PathKeySetYDerivative(int pKeyIndex, double pDerivative, bool pUpdate);
00662 void PathKeySetZDerivative(int pKeyIndex, double pDerivative, bool pUpdate);
00663 void PathKeySetXYZDerivative(int pKeyIndex, FBVector4d pDerivative, bool pUpdate);
00664 FBVector4d PathKeyGetXYZDerivative(int pKeyIndex);
00665 double PatKeyGetLeftTangeantLength(int pKeyIndex);
00666 double PatKeyGetRightTangeantLength(int pKeyIndex);
00667
00668
00669 int GetSelectedPathKeyCount();
00670 void PathKeyRemoveSelected();
00671
00672
00673 int InsertNewStartKey();
00674 int InsertNewEndKey();
00675 int PathKeyStartAdd(FBVector4d pTLocal);
00676 int PathKeyEndAdd(FBVector4d pTLocal);
00677
00678
00679 int Total_PathKeyAdd(double pTotalPercent, FBVector4d pTLocal);
00680 int Total_IsPathKey(double pTotalPercent);
00681 FBVector4d Total_GlobalPathEvaluate(double pTotalPercent);
00682 FBVector4d Total_LocalPathEvaluate(double pTotalPercent);
00683 FBVector4d Total_GlobalPathEvaluateDerivative(double pTotalPercent);
00684 FBVector4d Total_LocalPathEvaluateDerivative(double pTotalPercent);
00685 int Segment_PathKeyAdd(double pSegmentPercent, FBVector4d pTLocal);
00686 int Segment_IsPathKey(double pSegmentPercent);
00687 FBVector4d Segment_GlobalPathEvaluate(double pSegmentPercent);
00688 FBVector4d Segment_LocalPathEvaluate(double pSegmentPercent);
00689 FBVector4d Segment_GlobalPathEvaluateDerivative(double pSegmentPercent);
00690 FBVector4d Segment_LocalPathEvaluateDerivative(double pSegmentPercent);
00691
00692
00693 double ConvertTotalPercentToSegmentPercent(double pPercent);
00694 double ConvertSegmentPercentToTotalPercent(double pPercent);
00695 double ConvertToSegmentPercentFactor();
00696 double ConvertToTotalPercentFactor();
00697
00698
00699 bool SetRightTangeantMode(int pKeyIndex, FBPathTangeantMode pTangeantMode);
00700 bool SetLeftTangeantMode(int pKeyIndex, FBPathTangeantMode pTangeantMode);
00701 FBPathTangeantMode GetRightTangeantMode(int pKeyIndex);
00702 FBPathTangeantMode GetLeftTangeantMode(int pKeyIndex);
00703
00706 void UpdateGeometry();
00707 };
00708
00709
00711
00713 __FB_FORWARD( FBTexture );
00714
00719 enum FBTextureUseType {
00720 kFBTextureUseColor = 1,
00721 kFBTextureUseShadowMap = 2,
00722 kFBTextureUseLightMap = 3,
00723 kFBTextureUseSphericalReflexionMap = 4,
00724 kFBTextureUseSphereReflexionMap = 5,
00725 kFBTextureUseBumpNormalMap = 6
00726 };
00727
00731 enum FBTextureMapping {
00732 kFBTextureMappingUV = 1,
00733 kFBTextureMappingXY = 2,
00734 kFBTextureMappingYZ = 3,
00735 kFBTextureMappingXZ = 4,
00736 kFBTextureMappingSpherical = 5,
00737 kFBTextureMappingCylindrical = 6,
00738 kFBTextureMappingEnvironment = 7,
00739 kFBTextureMappingProjection = 8
00740 };
00741
00745 enum FBTextureBlendMode {
00746 kFBTextureBlendTranslucent,
00747 kFBTextureBlendAdditive,
00748 kFBTextureBlendModulate,
00749 kFBTextureBlendModulate2,
00750 };
00751
00752 FB_DEFINE_ENUM( FBSDK_DLL, TextureUseType );
00753 FB_DEFINE_ENUM( FBSDK_DLL, TextureMapping );
00754 FB_DEFINE_ENUM( FBSDK_DLL, TextureBlendMode );
00755
00757
00758
00759 class FBSDK_DLL FBTexture : public FBBox {
00760 __FBClassDeclare( FBTexture,FBBox );
00761 public:
00766 FBTexture(char *pName, HIObject pObject=NULL);
00767 virtual void FBDelete();
00768
00773 FBTexture* Clone();
00774
00775 FBPropertyString Filename;
00776 FBPropertyInt Width;
00777 FBPropertyInt Height;
00778
00779 FBPropertyTextureUseType UseType;
00780 FBPropertyTextureMapping Mapping;
00781 FBPropertyTextureBlendMode BlendMode;
00782
00783 FBPropertyAnimatableVector3d Translation;
00784 FBPropertyAnimatableVector3d Rotation;
00785 FBPropertyAnimatableVector3d Scaling;
00786 FBPropertyAnimatableDouble Alpha;
00787
00788 FBPropertyBool SwapUV;
00789 FBPropertyInt CroppingX[2];
00790 FBPropertyInt CroppingY[2];
00791
00792 FBPropertyVideo Video;
00793
00794 void OGLInit(HFBRenderOptions pRenderOptions = NULL);
00795 unsigned int GetTextureObject();
00796 double* GetMatrix();
00797 };
00798
00800
00802 __FB_FORWARD( FBLayeredTexture );
00803
00805
00806
00807 class FBSDK_DLL FBLayeredTexture : public FBTexture {
00808 __FBClassDeclare( FBLayeredTexture,FBTexture );
00809 public:
00814 FBLayeredTexture(char *pName, HIObject pObject=NULL);
00815 virtual void FBDelete();
00816
00821 FBLayeredTexture* Clone();
00822
00823 FBPropertyListTexture Layers;
00824 };
00825
00827
00830 enum FBMaterialTextureType {
00831 kFBMaterialTextureEmissive,
00832 kFBMaterialTextureEmissiveFactor,
00833 kFBMaterialTextureAmbient,
00834 kFBMaterialTextureAmbientFactor,
00835 kFBMaterialTextureDiffuse,
00836 kFBMaterialTextureDiffuseFactor,
00837 kFBMaterialTextureSpecular,
00838 kFBMaterialTextureSpecularFactor,
00839 kFBMaterialTextureShiness,
00840 kFBMaterialTextureBump,
00841 kFBMaterialTextureNormalMap,
00842 kFBMaterialTextureTransparent,
00843 kFBMaterialTextureTransparentFactor,
00844 kFBMaterialTextureReflection,
00845 kFBMaterialTextureReflectionFactor,
00846 kFBMaterialTextureDisplacementColor
00847 };
00848
00849
00850
00852 class FBSDK_DLL FBMaterial : public FBBox {
00853 __FBClassDeclare( FBMaterial,FBBox );
00854 public:
00859 FBMaterial(char *pName, HIObject pObject=NULL);
00860
00865 FBMaterial* Clone();
00866
00867 FBPropertyAnimatableColor Ambient;
00868 FBPropertyAnimatableDouble AmbientFactor;
00869
00870 FBPropertyAnimatableColor Emissive;
00871 FBPropertyAnimatableDouble EmissiveFactor;
00872
00873 FBPropertyAnimatableColor Diffuse;
00874 FBPropertyAnimatableDouble DiffuseFactor;
00875
00876 FBPropertyAnimatableColor TransparentColor;
00877 FBPropertyAnimatableDouble TransparencyFactor;
00878
00879 FBPropertyAnimatableColor Bump;
00880 FBPropertyAnimatableColor NormalMap;
00881 FBPropertyAnimatableDouble BumpFactor;
00882
00883 FBPropertyAnimatableColor Specular;
00884 FBPropertyAnimatableDouble SpecularFactor;
00885 FBPropertyAnimatableDouble Shininess;
00886
00887 FBPropertyAnimatableColor Reflection;
00888 FBPropertyAnimatableDouble ReflectionFactor;
00889
00890 FBPropertyAnimatableColor DisplacementColor;
00891 FBPropertyAnimatableDouble DisplacementFactor;
00892
00896 HFBTexture GetTexture(FBMaterialTextureType = kFBMaterialTextureDiffuse);
00897
00902 void SetTexture(FBTexture* pTexture, FBMaterialTextureType pType = kFBMaterialTextureDiffuse);
00903
00905 void OGLInit();
00906 };
00907
00909
00912 enum FBClusterMode {
00913 kFBClusterNormalize,
00914 kFBClusterAdditive,
00915 kFBClusterTotal100
00916 };
00917 FB_DEFINE_ENUM( FBSDK_DLL, ClusterMode );
00918
00919 __FB_FORWARD( FBCluster );
00920
00925 class FBSDK_DLL FBCluster : public FBComponent {
00926 __FBClassDeclare( FBCluster,FBComponent );
00927
00928 protected:
00932 FBCluster(HFBModel pModel);
00933 friend class DataFBModel;
00934
00935 public:
00936
00937
00942 int ClusterBegin(int pIndex = -1);
00943
00948 int ClusterEnd(bool pQueryOnly = false);
00949
00950
00955 void LinkSetName(char *pName, int pLinkNumber);
00960 char* LinkGetName(int pLinkNumber);
00964 void LinkRemove(int pLinkNumber);
00968 int LinkGetCount();
00972 void LinkSetModel(HFBModel pModel);
00977 HFBModel LinkGetModel(int pLinkNumber);
00982 HFBModel LinkGetAssociateModel(int pLinkNumber);
00986 void LinkClearUnused( double pThreshold = -1.0 );
00991 void LinkSetCurrentVertex(int pLinkIndex,int pPointIndex);
00996 int LinkGetVertexIndex(int pIndex);
00997
00998
01004 void VertexSetTransform(FBVector3d pPosition,FBVector3d pRotation, FBVector3d pScaling);
01010 void VertexGetTransform(FBVector3d& pPosition,FBVector3d& pRotation, FBVector3d& pScaling);
01015 void VertexAdd(int pVertexIndex,double pWeight);
01019 void VertexRemove(int pVertexIndex);
01023 int VertexGetCount();
01028 int VertexGetNumber(int pIndex);
01033 double VertexGetWeight(int pIndex);
01038 void VertexSetWeight(double pWeight,int pIndex);
01041 void VertexClear();
01042
01043 FBPropertyClusterMode ClusterMode;
01044 FBPropertyDouble ClusterAccuracy;
01045 };
01046
01048
01050 __FB_FORWARD( FBCamera );
01051
01053 enum FBCameraFrameSizeMode {
01054 kFBFrameSizeWindow,
01055 kFBFrameSizeFixedRatio,
01056 kFBFrameSizeFixedResolution,
01057 kFBFrameSizeFixedWidthResolution,
01058 kFBFrameSizeFixedHeightResolution
01059 };
01061
01062 enum FBCameraResolutionMode {
01063 kFBResolutionCustom,
01064 kFBResolutionD1NTSC,
01065 kFBResolutionNTSC,
01066 kFBResolutionPAL,
01067 kFBResolutionD1PAL,
01068 kFBResolutionHD,
01069 kFBResolution640x480,
01070 kFBResolution320x200,
01071 kFBResolution320x240,
01072 kFBResolution128x128,
01073 kFBResolutionFullScreen
01074 };
01076
01077 enum FBCameraApertureMode {
01078 kFBApertureVertical,
01079 kFBApertureHorizontal,
01080 kFBApertureVertHoriz,
01081 kFBApertureFocalLength
01082 };
01084
01085 enum FBCameraFilmBackType {
01086 kFBFilmBackCustom,
01087 kFBFilmBack16mmTheatrical,
01088 kFBFilmBackSuper16mm,
01089 kFBFilmBack35mmAcademy,
01090 kFBFilmBack35mmTVProjection,
01091 kFBFilmBack35mmFullAperture,
01092 kFBFilmBack35mm185Projection,
01093 kFBFilmBack35mmAnamorphic,
01094 kFBFilmBack70mmProjection,
01095 kFBFilmBackVistaVision,
01096 kFBFilmBackDynavision,
01097 kFBFilmBackIMAX
01098 };
01100
01101 enum FBCameraViewPlaneMode {
01102 kFBViewPlaneDisabled,
01103 kFBViewPlaneAlways,
01104 kFBViewPlaneWhenMedia
01105 };
01107
01108 enum FBCameraDistanceMode {
01109 kFBDistModeRelativeToInterest,
01110 kFBDistModeAbsoluteFromCamera
01111 };
01113
01114 enum FBCameraSafeAreaMode {
01115 kFBSafeAreaSquare,
01116 kFBSafeAreaRound
01117 };
01119
01120 enum FBCameraAntiAliasingMethod {
01121 kFBAntiAliasingSoftware,
01122 kFBAntialiasingMultiSamplingOnyx
01123 };
01125
01126 enum FBCameraSamplingType {
01127 kFBSamplingUniform,
01128 kFBSamplingStochastic
01129 };
01131
01132 enum FBCameraFocusDistanceSource {
01133 kFBFocusDistanceCameraInterest,
01134 kFBFocusDistanceSpecificDistance
01135 };
01136
01138
01139 enum FBCameraType {
01140 kFBCameraTypePerspective,
01141 kFBCameraTypeOrthogonal
01142 };
01143
01145
01146 enum FBCameraMatrixType {
01147 kFBProjection,
01148 kFBModelView
01149 };
01150
01151
01152 FB_DEFINE_ENUM( FBSDK_DLL, CameraType );
01153 FB_DEFINE_ENUM( FBSDK_DLL, CameraApertureMode );
01154 FB_DEFINE_ENUM( FBSDK_DLL, CameraFilmBackType );
01155 FB_DEFINE_ENUM( FBSDK_DLL, CameraFrameSizeMode );
01156 FB_DEFINE_ENUM( FBSDK_DLL, CameraResolutionMode );
01157 FB_DEFINE_ENUM( FBSDK_DLL, CameraViewPlaneMode );
01158 FB_DEFINE_ENUM( FBSDK_DLL, CameraDistanceMode );
01159 FB_DEFINE_ENUM( FBSDK_DLL, CameraSafeAreaMode );
01160 FB_DEFINE_ENUM( FBSDK_DLL, CameraAntiAliasingMethod );
01161 FB_DEFINE_ENUM( FBSDK_DLL, CameraSamplingType );
01162 FB_DEFINE_ENUM( FBSDK_DLL, CameraFocusDistanceSource );
01163 FB_DEFINE_ENUM( FBSDK_DLL, CameraMatrixType );
01164
01181 class FBSDK_DLL FBCamera : public FBModel {
01182 __FBClassDeclare( FBCamera,FBModel );
01183 public:
01188 FBCamera(char * pName, HIObject pObject=NULL);
01189
01190 FBPropertyBool SystemCamera;
01191
01192
01193 FBPropertyCameraFrameSizeMode FrameSizeMode;
01194 FBPropertyCameraResolutionMode ResolutionMode;
01195 FBPropertyDouble ResolutionWidth;
01196 FBPropertyDouble ResolutionHeight;
01197 FBPropertyDouble WindowHeight;
01198 FBPropertyDouble PixelAspectRatio;
01199 FBPropertyDouble NearPlaneDistance;
01200 FBPropertyDouble FarPlaneDistance;
01201 FBPropertyBool MouseLockCamera;
01202 FBPropertyCameraType Type;
01203 FBPropertyCameraApertureMode ApertureMode;
01204 FBPropertyAnimatableDouble FieldOfView;
01205
01206 FBPropertyAnimatableDouble FieldOfViewX;
01207 FBPropertyAnimatableDouble FieldOfViewY;
01208 FBPropertyAnimatableDouble OpticalCenterX;
01209 FBPropertyAnimatableDouble OpticalCenterY;
01210 FBPropertyAnimatableDouble FocalLength;
01211
01212 FBPropertyCameraFilmBackType FilmBackType;
01213 FBPropertyDouble FilmSizeWidth;
01214 FBPropertyDouble FilmSizeHeight;
01215 FBPropertyDouble FilmAspectRatio;
01216 FBPropertyDouble SqueezeRatio;
01217 FBPropertyDouble OrthogonalVerticalSize;
01218
01219
01220 FBPropertyVideo BackGroundMedia;
01221 FBPropertyCameraViewPlaneMode ViewBackGroundPlaneMode;
01222 FBPropertyBool BackGroundImageCenter;
01223 FBPropertyBool BackGroundImageFit;
01224 FBPropertyBool BackGroundImageKeepRatio;
01225 FBPropertyBool BackGroundImageCrop;
01226 FBPropertyDouble BackGroundPlaneDistance;
01227 FBPropertyCameraDistanceMode BackGroundPlaneDistanceMode;
01228
01229
01230 FBPropertyAnimatableDouble ForeGroundAlpha;
01231 FBPropertyDouble ForeGroundMaterialThreshold;
01232 FBPropertyBool ForeGroundTransparent;
01233 FBPropertyVideo ForeGroundMedia;
01234 FBPropertyCameraViewPlaneMode ViewForeGroundPlaneMode;
01235 FBPropertyBool ForeGroundImageCenter;
01236 FBPropertyBool ForeGroundImageFit;
01237 FBPropertyBool ForeGroundImageKeepRatio;
01238 FBPropertyBool ForeGroundImageCrop;
01239 FBPropertyDouble ForeGroundPlaneDistance;
01240 FBPropertyCameraDistanceMode ForeGroundPlaneDistanceMode;
01241
01242
01243 FBPropertyBool ViewCameraInterest;
01244 FBPropertyBool ViewNearFarPlane;
01245 FBPropertyBool ViewShowGrid;
01246 FBPropertyBool ViewShowAxis;
01247 FBPropertyBool ViewShowTimeCode;
01248 FBPropertyBool ViewDisplaySafeArea;
01249 FBPropertyBool ViewOpticalCenter;
01250 FBPropertyCameraSafeAreaMode SafeAreaMode;
01251
01252 FBPropertyAnimatableColor BackGroundColor;
01253 FBPropertyBool UseFrameColor;
01254 FBPropertyColor FrameColor;
01255
01256
01257
01258 FBPropertyBool UseAntiAliasing;
01259 FBPropertyBool UseDepthOfField;
01260 FBPropertyBool InteractiveMode;
01261
01262
01263 FBPropertyDouble AntiAliasingIntensity;
01264 FBPropertyCameraAntiAliasingMethod AntiAliasingMethod;
01265 FBPropertyInt NumberOfSamples;
01266 FBPropertyCameraSamplingType SamplingType;
01267 FBPropertyBool UseAccumulationBuffer;
01268
01269
01270 FBPropertyCameraFocusDistanceSource FocusDistanceSource;
01271 FBPropertyDouble FocusSpecificDistance;
01272 FBPropertyDouble FocusAngle;
01273
01274
01275 FBPropertyBool Use2DMagnifier;
01276 FBPropertyBool Display2DMagnifierFrame;
01277 FBPropertyAnimatableDouble MagnifierZoom;
01278 FBPropertyAnimatableDouble MagnifierPosX;
01279 FBPropertyAnimatableDouble MagnifierPosY;
01280
01281
01282 FBPropertyModel Interest;
01283 FBPropertyAnimatableDouble Roll;
01284 FBPropertyAnimatableDouble TurnTable;
01285 FBPropertyBool DisplayTurnTableIcon;
01286
01291 double* GetMatrix( FBCameraMatrixType pType );
01292 };
01293
01295
01298 class FBSDK_DLL FBPropertyListCamera : public FBPropertyListComponent
01299 {
01300 public:
01301 FBPropertyListCamera();
01306 FBCamera* operator[](int pIndex);
01307 };
01308
01310
01312 __FB_FORWARD( FBCameraSwitcher );
01313
01319 class FBSDK_DLL FBCameraSwitcher : public FBModel
01320 {
01321 __FBClassDeclare( FBCameraSwitcher, FBBox );
01322 public:
01325 FBCameraSwitcher();
01326
01327 FBPropertyCamera CurrentCamera;
01328 FBPropertyInt CurrentCameraIndex;
01329 };
01330
01331
01333
01335 __FB_FORWARD( FBGlobalLight );
01336
01338 enum FBFogMode {
01339 kFBFogModeLinear,
01340 kFBFogModeExponential,
01341 kFBFogModeSquareExponential
01342 };
01343
01344 FB_DEFINE_ENUM( FBSDK_DLL, FogMode );
01345
01347 class FBSDK_DLL FBGlobalLight : public FBBox
01348 {
01349 __FBClassDeclare( FBGlobalLight, FBBox );
01350 public:
01352 FBGlobalLight();
01353
01354 FBPropertyAnimatableColor AmbientColor;
01355
01356
01357 FBPropertyBool FogEnable;
01358
01359 FBPropertyAnimatableColor FogColor;
01360 FBPropertyAnimatableDouble FogBegin;
01361 FBPropertyAnimatableDouble FogEnd;
01362 FBPropertyAnimatableDouble FogDensity;
01363
01364 FBPropertyFogMode FogMode;
01365 };
01366
01368
01370 __FB_FORWARD( FBLight );
01371
01373 enum FBLightType {
01374 kFBLightTypePoint,
01375 kFBLightTypeInfinite,
01376 kFBLightTypeSpot
01377 };
01378
01379 FB_DEFINE_ENUM( FBSDK_DLL, LightType );
01380
01381
01383 enum FBAttenuationType {
01384 kFBAttenuationNone = 0,
01385 kFBAttenuationLinear,
01386 kFBAttenuationQuadratic,
01387 kFBAttenuationCubic
01388 };
01389
01390 FB_DEFINE_ENUM( FBSDK_DLL, AttenuationType );
01391
01393 class FBSDK_DLL FBLight : public FBModel
01394 {
01395 __FBClassDeclare( FBLight,FBModel );
01396 public:
01401 FBLight(char *pName, HIObject pObject=NULL);
01402
01403
01404 FBPropertyLightType LightType;
01405 FBPropertyAttenuationType AttenuationType;
01406 FBPropertyAnimatableDouble Intensity;
01407 FBPropertyAnimatableDouble ConeAngle;
01408 FBPropertyAnimatableDouble FogIntensity;
01409 FBPropertyAnimatableColor DiffuseColor;
01410 FBPropertyBool CastLightOnObject;
01411
01412
01413 FBPropertyBool DrawGroundProjection;
01414 FBPropertyBool DrawVolumetricLight;
01415 FBPropertyBool DrawFrontFacingVolumetric;
01416 FBPropertyVideo GoboMedia;
01417 };
01418
01420
01423 class FBSDK_DLL FBPropertyListLight : public FBPropertyListComponent
01424 {
01425 public:
01426 FBPropertyListLight();
01431 FBLight* operator[](int pIndex);
01432 };
01433
01435
01437 __FB_FORWARD( FBModelVertexData );
01438
01439 enum FBGeometryPrimitiveType
01440 {
01441 kFBGeometry_POINTS = 0x0000,
01442 kFBGeometry_LINES = 0x0001,
01443 kFBGeometry_LINE_LOOP = 0x0002,
01444 kFBGeometry_LINE_STRIP = 0x0003,
01445 kFBGeometry_TRIANGLES = 0x0004,
01446 kFBGeometry_TRIANGLE_STRIP = 0x0005,
01447 kFBGeometry_TRIANGLE_FAN = 0x0006,
01448 kFBGeometry_QUADS = 0x0007,
01449 kFBGeometry_QUADS_STRIP = 0x0008,
01450 kFBGeometry_POLYGON = 0x0009,
01451 };
01452
01454 enum FBGeometryArrayID {
01455 kFBGeometryArrayID_Point,
01456 kFBGeometryArrayID_NormalByPoint,
01457 kFBGeometryArrayID_Tangent,
01458 kFBGeometryArrayID_Binormal,
01459 };
01460
01462 enum FBGeometryArrayElementType {
01463 kFBGeometryArrayElementType_Unknown,
01464 kFBGeometryArrayElementType_Integer,
01465 kFBGeometryArrayElementType_Float,
01466 kFBGeometryArrayElementType_Float2,
01467 kFBGeometryArrayElementType_Float3,
01468 kFBGeometryArrayElementType_Float4,
01469 kFBGeometryArrayElementType_FloatMatrix4x4,
01470 kFBGeometryArrayElementType_IntegerArrayPointer
01471 };
01472
01473 class FBSDK_DLL FBModelVertexData : public FBComponent {
01474 __FBClassDeclare( FBModelVertexData,FBComponent );
01475
01476 protected:
01477 FBModelVertexData(HFBModel pModel);
01478 friend class DataFBModel;
01479
01480 public:
01481
01483 bool IsDeformable();
01484
01486 bool IsDrawable();
01487
01489 int GetVertexCount();
01490
01495
01497 int GetSubPatchCount();
01498
01500 int GetSubPatchMaterialId(int pSubPatchIndex);
01501
01503 FBMaterial* GetSubPatchMaterial(int pSubPatchIndex);
01504
01508 FBGeometryPrimitiveType GetSubPatchPrimitiveType(int pSubPatchIndex);
01509
01511 int GetSubPatchIndexOffset(int pSubPatchIndex);
01512
01514 int GetSubPatchIndexSize(int pSubPatchIndex);
01515
01520 void DrawSubPatch(int pSubPatchIndex, bool pWireFrame = false);
01521
01523
01529
01531 int GetSubRegionCount();
01532
01536 FBMaterial* GetSubRegionMaterial(int pSubRegionIndex);
01537
01542 void DrawSubRegion(int pSubRegionIndex, bool pWireFrame = false);
01543
01545
01552 void EnableOGLVertexData(bool pAfterdeform = true);
01553
01555 void DisableOGLVertexData();
01556
01562 void VertexArrayMappingRequest();
01563
01565 void VertexArrayMappingRelease();
01566
01568 int* GetIndexArray();
01569
01571 unsigned int GetIndexArrayVBOId();
01572
01578 FBGeometryArrayElementType GetVertexArrayType(FBGeometryArrayID pArrayId, bool pAfterDeform = true);
01579
01585 void* GetVertexArray(FBGeometryArrayID pArrayId, bool pAfterDeform = true);
01586
01592 unsigned int GetVertexArrayVBOId(FBGeometryArrayID pArrayId, bool pAfterDeform = true);
01593
01599 void* GetVertexArrayVBOOffset(FBGeometryArrayID pArrayId, bool pAfterDeform = true);
01600
01602
01609 void EnableOGLUVSet(FBTextureMapping pTextrueMapping = kFBTextureMappingUV, const char* pUVSet = NULL);
01610
01612 void DisableOGLUVSet();
01613
01619 FBGeometryArrayElementType GetUVSetArrayFormat(FBTextureMapping pTextrueMapping = kFBTextureMappingUV, const char* pUVSet = NULL);
01620
01626 void* GetUVSetArray(FBTextureMapping pTextrueMapping = kFBTextureMappingUV, const char* pUVSet = NULL);
01627
01633 unsigned int GetUVSetVBOId(FBTextureMapping pTextrueMapping = kFBTextureMappingUV, const char* pUVSet = NULL);
01634
01640 void* GetUVSetVBOOffset(FBTextureMapping pTextrueMapping = kFBTextureMappingUV, const char* pUVSet = NULL);
01641
01643 };
01644
01645
01647
01649 __FB_FORWARD( FBGeometry );
01650
01651
01662 enum FBGeometryMappingMode
01663 {
01664 kFBGeometryMapping_NONE,
01665 kFBGeometryMapping_BY_CONTROL_POINT,
01666 kFBGeometryMapping_BY_POLYGON_VERTEX,
01667 kFBGeometryMapping_BY_POLYGON,
01668 kFBGeometryMapping_BY_EDGE,
01669 kFBGeometryMapping_ALL_SAME
01670 } ;
01671
01683 enum FBGeometryReferenceMode
01684 {
01685 kFBGeometryReference_DIRECT,
01686 kFBGeometryReference_INDEX,
01687 kFBGeometryReference_INDEX_TO_DIRECT
01688 };
01689
01690 FB_DEFINE_ENUM( FBSDK_DLL, GeometryMappingMode );
01691 FB_DEFINE_ENUM( FBSDK_DLL, GeometryReferenceMode );
01692
01693 enum kFBGeometryUpdateFlags
01694 {
01695 kFBGeometryUpdateNone = 0,
01696 kFBGeometryUpdateAll = 1 << 0,
01697 kFBGeometryUpdatePositionAndNormal = 1 << 1,
01698 kFBGeometryUpdateSkinWeight = 1 << 2,
01699 kFBGeometryUpdateInverseNormal = 1 << 3,
01700 kFBGeometryUpdateMappingMode = 1 << 4,
01701 };
01702
01719 class FBSDK_DLL FBGeometry : public FBComponent {
01720 __FBClassDeclare( FBGeometry,FBComponent );
01721
01722 public:
01727 FBGeometry(char *pName, HIObject pObject=NULL);
01728
01737
01741 bool GeometryBegin();
01742 bool GeometryEnd();
01744
01753 void VertexInit (int pSize, bool pResize, bool pInitUV = true);
01754
01759 bool VertexClear ();
01760
01766 int VertexAdd (FBVertex pVertex);
01767
01773 int VertexAdd (FBVertex pVertex, FBNormal pNormal);
01774
01781 int VertexAdd (FBVertex pVertex, FBNormal pNormal, FBUV pUV);
01782
01790 int VertexAdd (double px, double py, double pz);
01791 int VertexAdd (double px, double py, double pz, double nx, double ny, double nz);
01792 int VertexAdd (double px, double py, double pz, double nx, double ny, double nz, double UVu, double UVv);
01793
01799 bool VertexSet (FBVertex pVertex,int pIndex=-1);
01800
01808 bool VertexSet (double px, double py, double pz,int pIndex=-1);
01809
01815 bool VertexNormalSet(FBNormal pVertex,int pIndex=-1);
01816
01824 bool VertexNormalSet(double px, double py, double pz,int pIndex=-1);
01825
01826
01832 bool VertexUVSet(FBUV pUV, int pIndex=-1);
01833
01840 bool VertexUVSet(float pU, float pV, int pIndex=-1);
01841
01843
01848
01852 int VertexCount () const;
01853
01858 FBVertex VertexGet (int pIndex) const;
01859
01863 FBVertex* GetVertexes() const;
01864
01869 FBNormal VertexNormalGet(int pIndex=-1) const;
01870
01875 FBUV VertexUVGet(int pIndex=-1) const;
01876
01878
01879
01884
01885 FBPropertyGeometryMappingMode NormalMappingMode;
01886 FBPropertyGeometryReferenceMode NormalReferenceMode;
01887
01892 int* GetNormalsIndexArray(int& pOutArrayCount) const;
01893
01898 FBNormal* GetNormalsDirectArray(int& pOutArrayCount) const;
01899
01903 FBStringList GetUVSets() const;
01904
01909 FBGeometryMappingMode GetUVSetMappingMode(const char* pUVSetName) const;
01910
01915 FBGeometryReferenceMode GetUVSetReferenceMode(const char* pUVSetName) const;
01916
01922 int* GetVUVSetIndexArray(int& pOutArrayCount, const char* pUVSetName) const;
01923
01929 FBUV* GetUVSetDirectArray(int& pOutArrayCount, const char* pUVsetName = NULL) const;
01930
01931 FBPropertyGeometryMappingMode MaterialMappingMode;
01932
01937 int* GetMaterialIndexArray(int& pOutArrayCount, const char* pUVSetName) const;
01938
01940
01941
01946
01951 bool VertexGetSelected(int pIndex);
01957 bool VertexSetSelected(int pIndex,bool pState);
01958
01963 bool VertexGetVisible(int pIndex);
01969 bool VertexSetVisible(int pIndex,bool pState);
01970
01975 bool VertexGetTransformable(int pIndex);
01977
01982
01984 int ShapeGetCount() const;
01985
01987 const char* ShapeGetName(int pShapeIdx) const;
01988
01993 int ShapeAdd(const char* pName);
01994
01996 void ShapeClearAll();
01997
02003 void ShapeInit(int pShapeIdx, int pDiffSize, bool pWithNormal = false);
02004
02008 int ShapeGetDiffPointCount(int pShapeIdx) const;
02009
02017 bool ShapeSetDiffPoint(int pShapeIdx, int pDiffIndex, int pOriIndex, const FBVertex& pPosDiff);
02018 bool ShapeSetDiffPoint(int pShapeIdx, int pDiffIndex, int pOriIndex, const FBVertex& pPosDiff, const FBNormal& pNormalDiff);
02019
02027 bool ShapeGetDiffPoint(int pShapeIdx, int pDiffIndex, int& pOriIndex, FBVertex& pPosDiff) const;
02028 bool ShapeGetDiffPoint(int pShapeIdx, int pDiffIndex, int& pOriIndex, FBVertex& pPosDiff, FBNormal& pNormalDiff) const;
02029
02031
02032
02037
02043 void ModifyNotify( kFBGeometryUpdateFlags pFlags=kFBGeometryUpdateAll, int pFirstIndex=-1, int pLastIndex=-1 );
02044
02046 };
02047
02049
02051 __FB_FORWARD( FBMesh );
02052
02054 class FBSDK_DLL FBMesh : public FBGeometry {
02055 __FBClassDeclare( FBMesh,FBGeometry );
02056
02057 public:
02062 FBMesh(char *pName, HIObject pObject=NULL);
02063
02064
02068 int PolygonBegin();
02069
02074 bool PolygonVertexAdd(int pVertex);
02075
02080 int PolygonMaterialIdGet(int pIndex=-1);
02081
02086 int PolygonEnd();
02087
02092 int PolygonVertexCount(int pPolygonIndex);
02093
02099 int PolygonVertexIndex(int pPolygonIndex, int pVertexPolygonIndex);
02100
02104 int PolygonCount();
02105
02109 void ComputeVertexNormals(bool pCW = false);
02110
02112 void InverseNormal();
02113 };
02114
02116
02118 __FB_FORWARD( FBSurface );
02119
02121 enum FBSurfaceMode
02122 {
02123 kFBSurfaceModeRaw,
02124 kFBSurfaceModeLowNoNormals,
02125 kFBSurfaceModeLow,
02126 kFBSurfaceModeHighNoNormals,
02127 kFBSurfaceModeHigh
02128 };
02129 FB_DEFINE_ENUM( FBSDK_DLL, SurfaceMode );
02130
02132 enum FBSurfaceType
02133 {
02134 kFBSurfaceTypeBezier,
02135 kFBSurfaceTypeBezierQuadric,
02136 kFBSurfaceTypeCardinal,
02137 kFBSurfaceTypeBspline,
02138 kFBSurfaceTypeLinear,
02139 };
02140 FB_DEFINE_ENUM( FBSDK_DLL, SurfaceType );
02141
02142
02144 class FBSDK_DLL FBSurface : public FBGeometry
02145 {
02146 __FBClassDeclare( FBSurface, FBGeometry );
02147
02148 public:
02153 FBSurface(char* pName, HIObject pObject=NULL);
02154
02155 IObject_Declare( Implementation );
02156
02157 virtual void SurfaceBegin();
02158 virtual void SurfaceEnd();
02159 virtual void SurfaceEditBegin();
02160 virtual void SurfaceEditEnd();
02161 virtual bool GetSurfaceCapped( int pUorV, int pDirection );
02162 virtual int GetVertexCount( int pUorVorGlobal = -1 );
02163 virtual void ControlPointsBegin() = 0;
02164 virtual void SetControlPoint( int pIndex, double pX, double pY, double pZ, double pW );
02165 virtual void GetControlPoint( int pIndex, double &pX, double &pY, double &pZ, double &pW );
02166 virtual void ControlPointsEnd();
02167
02173 bool VertexGetSelected(int pU,int pV);
02180 bool VertexSetSelected(int pU,int pV,bool pState);
02181
02187 bool VertexGetVisible(int pU,int pV);
02188
02195 bool VertexSetVisible(int pU,int pV,bool pState);
02196
02202 bool VertexGetTransformable(int pU,int pV);
02203
02204
02205 FBPropertyInt Size [2];
02206 FBPropertyInt Step [2];
02207 FBPropertyBool Closed [2];
02208
02209 FBPropertySurfaceMode SurfaceMode;
02210
02211 private:
02212 void FBSurfaceInitProperties();
02213 };
02214
02216 enum FBNurbType
02217 {
02218 kFBNurbTypePeriodic,
02219 kFBNurbTypeClosed,
02220 kFBNurbTypeOpen,
02221 };
02222 FB_DEFINE_ENUM( FBSDK_DLL, NurbType );
02223
02224
02226
02228 __FB_FORWARD( FBNurbs );
02229
02231 class FBSDK_DLL FBNurbs : public FBSurface
02232 {
02233 __FBClassDeclare( FBNurbs, FBSurface );
02234
02235 public:
02240 FBNurbs(char *pName, HIObject pObject=NULL);
02241
02244 virtual void SurfaceBegin();
02245
02248 virtual void SurfaceEnd();
02249
02252 virtual void SurfaceEditBegin();
02255 virtual void SurfaceEditEnd();
02258 virtual void ControlPointsBegin();
02261 virtual void ControlPointsEnd();
02266 virtual void SetControlWeight( int pIndex, double pWeight );
02271 virtual double GetControlWeight( int pIndex );
02277 virtual void SetControlMultiplicity( int pUorV, int pIndex, int pMultiplicity );
02282 virtual int GetControlMultiplicity( int pUorV, int pIndex );
02288 virtual void SetControlKnotValue( int pUorV, int pIndex, double pKnotValue );
02293 virtual double GetControlKnotValue( int pUorV, int pIndex );
02298 virtual int GetKnotCount( int pUorV );
02299
02300 FBPropertyInt Order [2];
02301 FBPropertyNurbType NurbType[2];
02302
02303 private:
02304 void FBNurbsInitProperties();
02305 };
02306
02308
02310 __FB_FORWARD( FBPatch );
02311
02313 class FBSDK_DLL FBPatch : public FBSurface
02314 {
02315 __FBClassDeclare( FBPatch, FBSurface );
02316
02317 public:
02322 FBPatch(char *pName, HIObject pObject=NULL);
02323
02324
02327 virtual void SurfaceBegin();
02328
02331 virtual void SurfaceEnd();
02332
02335 virtual void SurfaceEditBegin();
02336
02339 virtual void SurfaceEditEnd();
02340
02343 virtual void ControlPointsBegin();
02346 virtual void ControlPointsEnd();
02347
02348
02349 FBPropertySurfaceType SurfaceType[2];
02350
02351 private:
02352 void FBPatchInitProperties();
02353
02354 };
02355
02357
02359 __FB_FORWARD( FBDeformer );
02360
02362 class FBSDK_DLL FBDeformer : public FBComponent {
02363 __FBClassDeclare( FBDeformer,FBComponent );
02364 public:
02369 FBDeformer(char *pName, HIObject pObject=NULL);
02370 };
02371
02372
02373 #ifdef FBSDKUseNamespace
02374 }
02375 #endif
02376 #endif