#include <RenderablePicoSurface.h>
Public Member Functions | |
RenderablePicoSurface (picoSurface_t *surf) | |
RenderablePicoSurface (RenderablePicoSurface const &other) | |
~RenderablePicoSurface () | |
void | render (RenderStateFlags flags) const |
int | getVertexCount () const |
int | getPolyCount () const |
Shader * | getShader () const |
const AABB & | localAABB () const |
void | applySkin (const std::string &skin) |
Private Attributes | |
std::string | _originalShaderName |
std::string | _mappedShaderName |
Shader * | _shader |
std::vector< ArbitraryMeshVertex > | _vertices |
std::vector< unsigned int > | _indices |
unsigned int | _nIndices |
AABB | _localAABB |
Definition at line 18 of file RenderablePicoSurface.h.
model::RenderablePicoSurface::RenderablePicoSurface | ( | picoSurface_t * | surf | ) |
Constructor. Accepts a picoSurface_t struct and the file extension to determine how to assign materials.
model::RenderablePicoSurface::RenderablePicoSurface | ( | RenderablePicoSurface const & | other | ) |
copy constructor
model::RenderablePicoSurface::~RenderablePicoSurface | ( | ) |
Destructor. Vectors will be automatically destructed, but we need to release the shader.
void model::RenderablePicoSurface::applySkin | ( | const std::string & | skin | ) |
Apply the provided skin to this surface. If the skin has a remap for this surface's material, it will be applied, otherwise no action will occur.
skin | path of the skin to apply |
int model::RenderablePicoSurface::getPolyCount | ( | ) | const [inline] |
Return the poly count for this surface
Definition at line 71 of file RenderablePicoSurface.h.
References _indices.
Shader* model::RenderablePicoSurface::getShader | ( | ) | const [inline] |
Get the Shader for this surface.
Definition at line 78 of file RenderablePicoSurface.h.
References _shader.
int model::RenderablePicoSurface::getVertexCount | ( | ) | const [inline] |
Return the vertex count for this surface
Definition at line 64 of file RenderablePicoSurface.h.
References _vertices.
const AABB& model::RenderablePicoSurface::localAABB | ( | ) | const [inline] |
Get the containing AABB for this surface.
Definition at line 85 of file RenderablePicoSurface.h.
References _localAABB.
void model::RenderablePicoSurface::render | ( | RenderStateFlags | flags | ) | const |
Render function from OpenGLRenderable
std::vector<unsigned int> model::RenderablePicoSurface::_indices [private] |
Definition at line 34 of file RenderablePicoSurface.h.
Referenced by getPolyCount().
AABB model::RenderablePicoSurface::_localAABB [private] |
Definition at line 41 of file RenderablePicoSurface.h.
Referenced by localAABB().
Definition at line 23 of file RenderablePicoSurface.h.
unsigned int model::RenderablePicoSurface::_nIndices [private] |
Definition at line 38 of file RenderablePicoSurface.h.
Definition at line 22 of file RenderablePicoSurface.h.
Shader* model::RenderablePicoSurface::_shader [private] |
Definition at line 26 of file RenderablePicoSurface.h.
Referenced by getShader().
std::vector<ArbitraryMeshVertex> model::RenderablePicoSurface::_vertices [private] |
Definition at line 30 of file RenderablePicoSurface.h.
Referenced by getVertexCount().