AnimEngine
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
SkinnedTriangleMesh Class Reference
Inheritance diagram for SkinnedTriangleMesh:
Inheritance graph
[legend]
Collaboration diagram for SkinnedTriangleMesh:
Collaboration graph
[legend]

Public Member Functions

 SkinnedTriangleMesh (const std::vector< glm::vec3 > &vertices, const std::vector< GLuint > elements, const std::vector< glm::vec3 > &normals, const std::vector< glm::vec2 > &texcoords, const std::vector< glm::uvec4 > &joints, const std::vector< glm::vec4 > &weights, bool skip_gpu_upload=false)
 
virtual const std::vector< glm::uvec4 > & getJoints () const
 
virtual std::vector< glm::uvec4 > & getMutableJoints ()
 
virtual void replaceJoints (const std::vector< glm::uvec4 > &new_buffer)
 
virtual const std::vector< glm::vec4 > & getVertexWeights () const
 
virtual std::vector< glm::vec4 > & getMutableVertexWeights ()
 
virtual void replaceVertexWeights (const std::vector< glm::vec4 > &new_buffer)
 
- Public Member Functions inherited from OOOGL::TriangleMesh
 TriangleMesh (const std::vector< glm::vec3 > &vertices, const std::vector< GLuint > elements, const std::vector< glm::vec3 > &normals, const std::vector< glm::vec2 > &texcoords, bool skip_gpu_upload=false)
 
virtual void autoSetupForDraw () override
 
virtual void autoCleanupAfterDraw () override
 
virtual const std::vector< glm::vec3 > & getNormals () const
 
virtual std::vector< glm::vec3 > & getMutableNormals ()
 
virtual void replaceNormals (const std::vector< glm::vec3 > &new_buffer)
 
virtual bool areNormalsEnabled () const
 Check if the vertex normals attribute is enabled.
 
virtual void disableNormals ()
 Disable the vertex normal attribute during auto setup.
 
virtual void enableNormals ()
 Disable the vertex normal attribute during auto setup.
 
virtual const std::vector< glm::vec2 > & getTextureCoords () const
 
virtual std::vector< glm::vec2 > & getMutableTextureCoords ()
 
virtual void replaceTextureCoords (const std::vector< glm::vec2 > &new_buffer)
 
virtual bool areTextureCoordsEnabled () const
 Check if the vertex normals attribute is enabled.
 
virtual void disableTextureCoords ()
 Disable the vertex normal attribute during auto setup.
 
virtual void enableTextureCoords ()
 Disable the vertex normal attribute during auto setup.
 
- Public Member Functions inherited from OOOGL::VertexGeometry
 VertexGeometry (const std::vector< glm::vec3 > &vertices, const std::vector< GLuint > elements, bool skip_gpu_upload=false, bool skip_measurement=false)
 
virtual const glm::vec3 & getMinPoint ()
 
virtual const glm::vec3 & getMaxPoint ()
 
virtual void normalize ()
 
virtual void uploadToGpu ()
 
virtual GpuSyncStatus getSyncStatus () const
 
virtual const std::vector< glm::vec3 > & getVertices () const
 
virtual std::vector< glm::vec3 > & getMutableVertices ()
 
virtual void replaceVertices (const std::vector< glm::vec3 > &new_buffer)
 
virtual size_t numElementBuffers () const
 
virtual const std::vector< GLuint > & getElements (size_t index) const
 
virtual std::vector< GLuint > & getMutableElements (size_t index)
 
virtual void replaceElements (size_t index, const std::vector< GLuint > &new_buffer)
 
virtual void addElements (const std::vector< GLuint > &new_buffer, bool auto_add_element_array_buffer=true)
 
virtual ElementArrayBuffer getElementArrayBuffer (size_t index)
 
virtual void replaceElementArrayBuffer (size_t index, const ElementArrayBuffer &buffer)
 
- Public Member Functions inherited from OOOGL::ObjectTag
virtual const std::string & getTag () const
 
virtual void setTag (const std::string &tag)
 

Public Attributes

ArrayBuffer vertex_joints_buffer
 
ArrayBuffer vertex_weights_buffer
 
std::vector< MaterialInterface * > materials
 
std::vector< int > material_indices
 
- Public Attributes inherited from OOOGL::TriangleMesh
ArrayBuffer vertex_normals_buffer
 
ArrayBuffer vertex_coordinate_buffer
 
- Public Attributes inherited from OOOGL::VertexGeometry
CommonVertexFormatVAO vertex_array_object
 
ArrayBuffer vertex_position_buffer
 

Protected Member Functions

virtual void _uploadData () override
 
- Protected Member Functions inherited from OOOGL::VertexGeometry
virtual void updateMeasurement ()
 
virtual void linkElementBuffers ()
 
virtual void _startGpuUpload ()
 
virtual void _finishGpuUpload ()
 
void _measure_min_max_ (const std::vector< glm::vec3 > &vertices, glm::vec3 *min_point, glm::vec3 *max_point)
 
void _normalize_vertices (std::vector< glm::vec3 > &vertices, const glm::vec3 &min, const glm::vec3 &max)
 

Protected Attributes

std::vector< glm::uvec4 > cpu_joints_buffer_
 
std::vector< glm::vec4 > cpu_weights_buffer_
 
- Protected Attributes inherited from OOOGL::TriangleMesh
std::vector< glm::vec3 > cpu_normals_buffer_
 
bool mNormalsEnabled = true
 
std::vector< glm::vec2 > cpu_texture_coords_
 
bool mCoordsEnabled = true
 
- Protected Attributes inherited from OOOGL::VertexGeometry
bool measurement_current_ = false
 
GpuSyncStatus sync_status_ = GpuSyncStatus::GPU_UNINITIALIZED
 
std::vector< glm::vec3 > cpu_vertex_buffer_
 
std::vector< std::vector< GLuint > > cpu_element_buffers_
 
std::vector< ElementArrayBuffervertex_elements_buffers_
 
glm::vec3 min_point_ = glm::vec3(0.0)
 
glm::vec3 max_point_ = glm::vec3(0.0)
 
- Protected Attributes inherited from OOOGL::ObjectTag
std::string tag
 

Additional Inherited Members

- Static Public Attributes inherited from OOOGL::TriangleMesh
static const GLuint msNormalAttrIndex = 1
 
static const GLuint msTexCoordAttrIndex = 2
 
- Static Public Attributes inherited from OOOGL::VertexGeometry
static const GLuint msPositionAttrIndex = 0
 

The documentation for this class was generated from the following files: