AnimaL |
Tutorial |
Documentation |
00001 00002 #ifndef X3DTK_X3D_DEFORMABLEOCTREESHAPENODE_H 00003 #define X3DTK_X3D_DEFORMABLEOCTREESHAPENODE_H 00004 00005 00006 //#include <X3DTK/private/X3D_X3DChildNode.h> 00007 #include <animal/X3DTK/X4DNode.h> 00008 #include <X3DTK/private/X3D_Coordinate.h> 00009 #include <X3DTK/private/X3D_IndexedFaceSet.h> 00010 #include <X3DTK/private/X3D_Appearance.h> 00011 #include <X3DTK/private/X3D_X3DShapeNode.h> 00012 00013 #include "Octree.h" 00014 00015 //#include "CGRenderingMachine.h" 00016 00017 00018 namespace X3DTK { 00019 00021 00022 namespace X3D { 00023 00024 enum { DOSN_METHOD_VA=0, DOSN_METHOD_CG, DOSN_METHOD_BOURRIN, DOSN_METHOD_NOTHING }; 00025 00026 class DeformableOctreeShapeNode : 00027 public X4DNode 00028 // public X3DShapeNode 00029 { 00030 public: 00032 DeformableOctreeShapeNode(); 00034 ~DeformableOctreeShapeNode(); 00035 00036 00037 void setIFS( IndexedFaceSet *ifs ); 00038 00039 Coordinate* getCoordinate() const; 00040 00041 00042 virtual void postInit(); 00043 00044 virtual void draw() const; 00045 00046 MFVec3f computeNormals() const; 00047 00048 00049 void setOctree( animal::octree::Octree *octree ); 00050 00051 // Warning : the methods should correspond to the methods in the designer dialog box 00052 void setRenderingMethod( int method ); 00053 int getRenderingMethod( ) const; 00054 00055 protected: 00056 Coordinate *_coordinate; 00057 IndexedFaceSet *_ifs; 00058 Appearance *_appearance; 00059 00060 animal::octree::Octree *_octree; 00061 00062 // animal::octree::CGRenderingMachine *_cgRM; 00063 00064 /* 00065 void setMethodWithCG( bool withCG ); 00066 bool getMethodWithCG() const; 00067 00068 void setMethodWithArrays( bool withArrays ); 00069 bool getMethodWithArrays() const; 00070 00071 // options 00072 bool _withCG; 00073 bool _withArrays; 00074 */ 00075 int _renderingMethod; 00076 00077 }; 00078 00079 } 00080 } 00081 00082 #endif