hx3d  1
2D/3D Simple Game Framework
Public Member Functions | Public Attributes | Protected Attributes | List of all members
hx3d::graphics::Mesh Class Reference

Displayable 2D/3D element. More...

#include <mesh.hpp>

Public Member Functions

virtual void draw (Ptr< Shader > shader)
 Draw the mesh using a shader. More...
 
void setTint (Color tint)
 Set the mesh tint. More...
 
ColorgetTint ()
 Get the mesh tint. More...
 
void updateColor ()
 Update the mesh color from the tint.
 
void setGeometry (Ptr< geom::BaseGeometry > geometry)
 Set the mesh geometry. More...
 
Ptr< geom::BaseGeometry > & getGeometry ()
 Get the mesh geometry. More...
 

Public Attributes

Transform transform
 Mesh transformation.
 

Protected Attributes

Color _tint
 Tint color.
 
Ptr< geom::BaseGeometry_geometry
 Current geometry.
 

Detailed Description

Displayable 2D/3D element.

Definition at line 41 of file mesh.hpp.

Member Function Documentation

void hx3d::graphics::Mesh::draw ( Ptr< Shader shader)
virtual

Draw the mesh using a shader.

Parameters
shaderShader (Ptr)

Reimplemented in hx3d::graphics::Sprite.

Definition at line 30 of file mesh.cpp.

Ptr< geom::BaseGeometry > & hx3d::graphics::Mesh::getGeometry ( )

Get the mesh geometry.

Returns
BaseGeometry (Ptr)

Definition at line 53 of file mesh.cpp.

Color & hx3d::graphics::Mesh::getTint ( )

Get the mesh tint.

Returns
Tint

Definition at line 79 of file mesh.cpp.

void hx3d::graphics::Mesh::setGeometry ( Ptr< geom::BaseGeometry geometry)

Set the mesh geometry.

Parameters
geometryBaseGeometry (Ptr)

Definition at line 49 of file mesh.cpp.

void hx3d::graphics::Mesh::setTint ( Color  tint)

Set the mesh tint.

Automatically update the color. See updateColor.

Parameters
tintColor

Definition at line 43 of file mesh.cpp.


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