summaryrefslogtreecommitdiffstats
path: root/src/graphics/engine/modelfile.h
diff options
context:
space:
mode:
authorPiotr Dziwinski <piotrdz@gmail.com>2012-12-26 20:58:02 +0100
committerPiotr Dziwinski <piotrdz@gmail.com>2012-12-26 20:58:02 +0100
commit5574eccebd16ae38a2a21ed202d1f9d1ba8f67a4 (patch)
treeb742447d1b3262c1541e9c0fe037ad35be467dff /src/graphics/engine/modelfile.h
parentf9f15a2f3f80f968a64e76141b1e6fa5e28c7232 (diff)
downloadcolobot-5574eccebd16ae38a2a21ed202d1f9d1ba8f67a4.tar.gz
colobot-5574eccebd16ae38a2a21ed202d1f9d1ba8f67a4.tar.bz2
colobot-5574eccebd16ae38a2a21ed202d1f9d1ba8f67a4.zip
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
Diffstat (limited to 'src/graphics/engine/modelfile.h')
-rw-r--r--src/graphics/engine/modelfile.h27
1 files changed, 6 insertions, 21 deletions
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 <iostream>
-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<ModelTriangle>& 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<ModelTriangle> m_triangles;
};