#include <WP_Model.h>
Inheritance diagram for WPCG::WP_Model:
Public Methods | |
WP_Model () | |
WP_Model (const string &name) | |
WP_Model (const WP_Model &model) | |
virtual | ~WP_Model () |
WP_Model & | operator= (const WP_Model &model) |
virtual void | drawOpenGL (const WP_Matrix3D &matrix, WP_Object *object)=0 |
virtual bool | initModel ()=0 |
bool | init () |
virtual OPCODE_Model * | getCollisionModel (const WP_Object *object)=0 |
virtual WP_Vertex * | getVertex (const WP_Object *object, unsigned int index)=0 |
Public Attributes | |
string | model_name |
int | numberTriangles |
unsigned int * | triangles |
int | numberVertices |
int | count |
GLint | tex_id |
Protected Methods | |
virtual bool | finalizeAll ()=0 |
Friends | |
class | WP_Frame |
|
|
|
|
|
|
|
|
|
this function draws the model according to its world matrix into the 3D scene
Implemented in WPCG::WP_NonAnimatedModel. |
|
this function finalizes all after the model was read and everything was initialized. It for instance builds the collision mesh Implemented in WPCG::WP_NonAnimatedModel. |
|
Implemented in WPCG::WP_NonAnimatedModel. |
|
Implemented in WPCG::WP_NonAnimatedModel. |
|
this function must be called to init the model. This is based on the Template design pattern. |
|
this virtual function should be overriden by child objects. In this function the model must be read and the model's internals must be filled (like for example the meshes, the material etc). Every 3d file format stores this information in a different way there this function can be used to substract the necessary data from it. Implemented in WPCG::WP_NonAnimatedModel. |
|
|
|
|
|
the number of objects using this model, this is used by the WP_ObjectManager object. The model is only discarted by the object manager if this value is zero. This is a so called reference count |
|
the name of the model |
|
|
|
the number of vertices in the model |
|
the OpenGL texture ID of the texture belonging to this model |
|
indices into the vertices array, so every three indices make up a triangle |