Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members
E:/Programming/MyProject/K_Game_hg/GameEngine/include/render/Model.h
Go to the documentation of this file.
00001 // Copyright 2006-2011 by Kat'Oun
00002 
00003 #ifndef _MODEL_H_
00004 #define _MODEL_H_
00005 
00006 #include <EngineConfig.h>
00007 #include <core/Types.h>
00008 #include <core/Matrix4.h>
00009 #include <core/Aabox3d.h>
00010 #include <core/Sphere3d.h>
00011 #include <render/Color.h>
00012 #include <render/Renderable.h>
00013 #include <resource/ResourceEventReceiver.h>
00014 
00015 #include <string>
00016 
00017 namespace resource
00018 {
00019 struct ResourceEvent;
00020 }
00021 
00022 namespace render
00023 {
00024 
00025 class Material;
00026 class MeshData;
00027 class MeshProperties;
00028 
00030 class ENGINE_PUBLIC_EXPORT Model: public Renderable, public resource::ResourceEventReceiver
00031 {
00032 public:
00033 
00034         Model(MeshData* meshData);
00035         Model(const std::string& name, MeshData* meshData);
00036 
00037         ~Model();
00038 
00040         void setMeshData(const std::string& filename);
00041         void setMeshData(MeshData* meshData);
00042 
00043         MeshData* getMeshData() const;
00044 
00046         void setMaterial(const std::string& filename);
00047         void setMaterial(Material* material);
00048         
00050         Material* getMaterial() const;
00051 
00052         void getRenderOperation(RenderOperation& ro);
00053 
00054         void resourceLoaded(const resource::ResourceEvent& evt);
00055         void resourceUnloaded(const resource::ResourceEvent& evt);
00056 
00057 protected:
00058 
00059         // Incremented count for next Index
00060         static u32 msNextGeneratedModelIndex;
00061 
00062         void initProperties();
00063 
00064         MeshData* mMeshData;
00065 
00066         Material* mMaterial;
00067 
00068         void updateImpl(f32 elapsedTime);
00069 
00070         bool mModifiedWorldTransform;
00071 
00072         void updateWorldTransform();
00073 };
00074 
00075 } //namespace render
00076 
00077 #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)