OpenGL ES SDK for Android
ARM Developer Center
|
#include <model3d.h>
Public Member Functions | |
Model3D () | |
~Model3D () | |
bool | load (const std::string &a_path) |
unsigned int | get_indices_count () const |
unsigned int | get_keyframes_count () const |
float * | get_positions () const |
float * | get_normals () const |
float * | get_texture_coordinates0 () const |
float * | get_tangents () const |
unsigned int * | get_indices () const |
Protected Attributes | |
bool | m_has_animation |
True if the model has animation data. More... | |
bool | m_has_materials |
True if the model has one or more materials. More... | |
bool | m_has_indices |
True if the model has indexed data. More... | |
bool | m_has_normals |
True if the model has normals. More... | |
bool | m_has_texture_coordinates0 |
True if the model has texture coordinates 0. More... | |
unsigned int * | m_vertices_count |
Total number of vertices in the model. More... | |
unsigned int * | m_indices_count |
Total number of indices in the model. More... | |
unsigned int * | m_bones_count |
Total number of bones in the model. More... | |
unsigned int * | m_keyframes_count |
Total number of keyframes in the model. More... | |
unsigned int * | m_materials_count |
Total number of materials in the model. More... | |
float * | m_positions |
List of 3D Vertex Positions in the model. More... | |
float * | m_texture_coordinates0 |
List of 3D Texture Coordinates in the model. More... | |
float * | m_normals |
List of 3D Normals in the model. More... | |
float * | m_tangents |
List of 3D Tangents in the model. More... | |
float * | m_weights |
List of 4D Weights in the model. More... | |
unsigned int * | m_bone_ids |
List of 4D Bone Ids in the model. More... | |
Material ** | m_materials |
List of all the materials in the model. More... | |
unsigned int * | m_indices |
List of indices in the model. More... | |
Keyframe ** | m_keyframes |
List of all keyframes for all bones. More... | |
char * | m_geometry_buffer |
All the geometry data is loaded in this buffer. More... | |
char * | m_tangent_buffer |
All the tangent data is loaded in this buffer. More... | |
char * | m_animation_buffer |
All the animation data is loaded in this buffer. More... | |
float * | m_bounding_box_minimum |
Bounding box minimum of the model. More... | |
float * | m_bounding_box_maximum |
Bounding box maximum of the model. More... | |
Friends | |
class | Model3DClientGL |
Objects of Model3D class contains one complete model. This class can be used to load *.geom files from filesystem. A model might contain only geometry or geometry and animation. Geometry data consists of 3D Positions, One or more set of 3D Texture Coordinates, 3D Normals, 3D Tangents and 3D Bitangents etc. Positions are a must but all other attributes are optional. A model might also contain optional one or more materials. If the model has animation data. It will be automatically loaded from the *.anim file. A model can have upto 50 bones. Each vertex can be influenced by a maximum of 4 bones. Animation data consists of keyframes for all bones. Each keyframe is a set of transformations for each bone and time. There can be one or more keyframes in an animation. All these classes are optimized for load time.
Model3D::Model3D::Model3D | ( | ) |
Default constructor sets all pointers to NULL
Definition at line 105 of file model3d.cpp.
Model3D::Model3D::~Model3D | ( | ) |
Default destructor sets all pointers to NULL It also frees the momory allocated to m_geometry_buffer and m_animation_buffer
Definition at line 136 of file model3d.cpp.
unsigned int * Model3D::Model3D::get_indices | ( | ) | const |
This method returns a list of indices in the model
Definition at line 402 of file model3d.cpp.
unsigned int Model3D::Model3D::get_indices_count | ( | ) | const |
This method returns the indices count in the model
Definition at line 372 of file model3d.cpp.
unsigned int Model3D::Model3D::get_keyframes_count | ( | ) | const |
This method returns the keyframes count in the model
Definition at line 377 of file model3d.cpp.
float * Model3D::Model3D::get_normals | ( | ) | const |
This method returns a list of 3D Normals in the model
Definition at line 387 of file model3d.cpp.
float * Model3D::Model3D::get_positions | ( | ) | const |
This method returns a list of 3D Vertex Positions in the model
Definition at line 382 of file model3d.cpp.
float * Model3D::Model3D::get_tangents | ( | ) | const |
This method returns a list of 3D Tangents in the model
Definition at line 397 of file model3d.cpp.
float * Model3D::Model3D::get_texture_coordinates0 | ( | ) | const |
This method returns a list of 3D Texture Coordinates in the model
Definition at line 392 of file model3d.cpp.
bool Model3D::Model3D::load | ( | const std::string & | a_path | ) |
Use this method to load a 'geom' file from filesystem If the model has animation data. It will be automatically loaded from the '.anim' file. the '.anim' file is searched in the folder where the '.geom' resides.
a_path | full path to the file containing the geometry data on the filesystem |
Definition at line 183 of file model3d.cpp.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |