Blender V2.61 - r43446
|
00001 00004 /****************************************************************************** 00005 * 00006 * El'Beem - Free Surface Fluid Simulation with the Lattice Boltzmann Method 00007 * Copyright 2003-2006 Nils Thuerey 00008 * 00009 * Base class for geometry shaders and objects 00010 * 00011 *****************************************************************************/ 00012 00013 00014 #ifndef NTL_GEOMETRYCLASS_H 00015 #define NTL_GEOMETRYCLASS_H 00016 00017 #include "attributes.h" 00018 00020 #define GEOCLASSTID_OBJECT 1 00021 #define GEOCLASSTID_SHADER 2 00022 #define GEOCLASSTID_BOX (GEOCLASSTID_OBJECT| 4) 00023 #define GEOCLASSTID_OBJMODEL (GEOCLASSTID_OBJECT| 8) 00024 #define GEOCLASSTID_SPHERE (GEOCLASSTID_OBJECT| 16) 00025 00026 class ntlGeometryClass 00027 { 00028 00029 public: 00030 00032 inline ntlGeometryClass() : 00033 mVisible( 1 ), mName( "[ObjNameUndef]" ), 00034 mObjectId(-1), mpAttrs( NULL ), mGeoInitId(-1) 00035 { 00036 mpAttrs = new AttributeList("objAttrs"); 00037 mpSwsAttrs = new AttributeList("swsAttrs"); 00038 }; 00039 00041 virtual ~ntlGeometryClass() { 00042 delete mpAttrs; 00043 delete mpSwsAttrs; 00044 }; 00045 00047 virtual int getTypeId() = 0; 00048 00050 inline void setName(string set) { mName = set; } 00052 inline string getName( void ) { return mName; } 00053 00057 inline void setVisible(int set) { mVisible=set; } 00059 inline int getVisible() const { return mVisible; } 00060 00062 inline void setAttributeList(AttributeList *set) { mpAttrs=set; } 00064 inline AttributeList *getAttributeList() { return mpAttrs; } 00065 00067 inline void setSwsAttributeList(AttributeList *set) { mpSwsAttrs=set; } 00068 inline AttributeList *getSwsAttributeList() { return mpSwsAttrs; } 00069 00071 virtual inline ntlVec3Gfx *getBBStart() { return NULL; } 00072 virtual inline ntlVec3Gfx *getBBEnd() { return NULL; } 00073 00075 inline void setObjectId(int set) { mObjectId=set; } 00076 inline int getObjectId() const { return mObjectId; } 00077 00079 virtual void drawDebugDisplay() { /* do nothing by default */ } 00081 virtual void drawInteractiveDisplay() { /* do nothing by default */ } 00083 virtual void setMousePos(int ,int , ntlVec3Gfx , ntlVec3Gfx ) { /* do nothing by default */ } 00085 virtual void setMouseClick() { /* do nothing by default */ } 00086 00088 inline void setGeoInitId(int set) { mGeoInitId=set; } 00090 inline int getGeoInitId() const { return mGeoInitId; } 00091 00092 protected: 00093 00095 int mVisible; 00096 00098 string mName; 00099 00101 int mObjectId; 00102 00104 AttributeList *mpAttrs; 00106 AttributeList *mpSwsAttrs; 00107 00108 /* fluid init data */ 00110 int mGeoInitId; 00111 00112 private: 00113 00114 }; 00115 00116 00117 00118 #endif 00119