From 5574eccebd16ae38a2a21ed202d1f9d1ba8f67a4 Mon Sep 17 00:00:00 2001 From: Piotr Dziwinski Date: Wed, 26 Dec 2012 20:58:02 +0100 Subject: Engine optimization - rewritten model management - new class CModelManager - rewritten engine object structure in CEngine - created shared model data instead of separate objects per each model instance - minor refactoring --- src/graphics/engine/modelfile.h | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) (limited to 'src/graphics/engine/modelfile.h') diff --git a/src/graphics/engine/modelfile.h b/src/graphics/engine/modelfile.h index 6c573b8..b2b5d87 100644 --- a/src/graphics/engine/modelfile.h +++ b/src/graphics/engine/modelfile.h @@ -33,14 +33,10 @@ #include -class CInstanceManager; - // Graphics module namespace namespace Gfx { -class CEngine; - /** \struct ModelTriangle @@ -79,14 +75,15 @@ struct ModelTriangle /** - \class CModelFile - \brief Model file reader/writer - - Allows reading and writing model objects. Models are collections of ModelTriangle structs. */ + * \class CModelFile + * \brief Model file reader/writer + * + * Allows reading and writing model objects. Models are collections of ModelTriangle structs. + */ class CModelFile { public: - CModelFile(CInstanceManager* iMan); + CModelFile(); ~CModelFile(); //! Reads a model in text format from file @@ -128,23 +125,11 @@ public: //! Returns the triangle vector const std::vector& GetTriangles(); - //! Returns the height of model -- closest point to X and Z coords of \a pos - float GetHeight(Math::Vector pos); - - //! Mirrors the model along the Z axis - void Mirror(); - - //! Creates an object in the graphics engine from the model - bool CreateEngineObject(int objRank); - protected: //! Adds a triangle to the list void CreateTriangle(Math::Vector p1, Math::Vector p2, Math::Vector p3, float min, float max); protected: - CInstanceManager* m_iMan; - CEngine* m_engine; - //! Model triangles std::vector m_triangles; }; -- cgit v1.2.3-1-g7c22