Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members
E:/Programming/MyProject/K_Game_hg/GameEngine/include/render/MeshData.h
Go to the documentation of this file.
00001 // Copyright 2006-2011 by Kat'Oun
00002 
00003 #ifndef _MESH_DATA_H_
00004 #define _MESH_DATA_H_
00005 
00006 #include <EngineConfig.h>
00007 #include <core/Types.h>
00008 #include <core/Aabox3d.h>
00009 #include <resource/Resource.h>
00010 #include <render/Color.h>
00011 #include <render/RenderOperation.h>
00012 
00013 #include <string>
00014 
00015 namespace resource
00016 {
00017 class Serializer;
00018 enum BufferUsage;
00019 }
00020 
00021 namespace render
00022 {
00023 
00024 class Model;
00025 class Material;
00026 class VertexData;
00027 class IndexData;
00028 
00030 class ENGINE_PUBLIC_EXPORT MeshData: public resource::Resource
00031 {
00032         friend class Model;
00033 
00034 public:
00035 
00036         MeshData(const std::string& name, resource::Serializer* serializer);
00037         ~MeshData();
00038 
00040         void setNewVertexData();
00041 
00043         VertexData* getVertexData();
00044 
00046         void setNewIndexData();
00047 
00049         IndexData* getIndexData();
00050 
00059         void setVertexBufferPolicy(resource::BufferUsage usage, bool useShadowBuffer = false);
00060 
00062         resource::BufferUsage& getVertexBufferUsage();
00063 
00065         bool getUseVertexShadowBuffer();
00066 
00068         void setIndexBufferPolicy(resource::BufferUsage usage, bool useShadowBuffer = false);
00069 
00071         resource::BufferUsage& getIndexBufferUsage();
00072 
00074         bool getUseIndexShadowBuffer();
00075 
00077         void setMaterial(const std::string& filename);
00078 
00080         Material* getMaterial() const;
00081 
00082         void getRenderOperation(RenderOperation& ro);
00083 
00085         void setBoundingBox(const core::aabox3d& box);
00086 
00088         const core::aabox3d& getBoundingBox();
00089 
00091         void setBoundingSphereRadius(f32 radius);
00092 
00094         f32 getBoundingSphereRadius();
00095 
00096 private:
00097 
00098         void initProperties();
00099         void unloadImpl();
00100 
00102         Material* mMaterial;
00103 
00105         OperationType mOperationType;
00106 
00108         VertexData* mVertexData;
00109 
00111         IndexData* mIndexData;
00112 
00113         resource::BufferUsage mVertexBufferUsage;
00114         resource::BufferUsage mIndexBufferUsage;
00115         bool mUseVertexShadowBuffer;
00116         bool mUseIndexShadowBuffer;
00117 
00119         core::aabox3d mAABB;
00120 
00122         f32 mBoundRadius;
00123 };
00124 
00125 } //namespace render
00126 
00127 #endif

The KG Game Engine
The KG Game Engine Documentation © 2006-2011 by Kat'Oun. Generated on Sat Jul 2 2011 00:50:04 by Doxygen (1.7.4)