![]() |
gdk-graphics
1b6d84e044c2c953fd7c9501e628a67e80f4da0d
|
Represents an observable 3D object. More...
#include <webgl1es2_entity.h>
Public Member Functions | |
virtual void | hide () override |
do not allow this entity to be drawn | |
virtual void | show () override |
allow this entity to be drawn | |
virtual bool | isHidden () const override |
check if the entity is hidden | |
virtual std::shared_ptr< model > | getModel () const |
get the model | |
virtual std::shared_ptr< material > | getMaterial () const |
get the material | |
void | draw (const graphics_mat4x4_type &aViewMatrix, const graphics_mat4x4_type &aProjectionMatrix) const |
draws the webgl1es2_entity at its current world position, with respect to a view and projection matrix. generally should not be called by the end user. view, proj, are most easily provided to the webgl1es2_entity via a camera. | |
virtual void | set_model (const std::shared_ptr< model > a) override |
sets this entity's model. | |
virtual void | set_model_matrix (const graphics_vector3_type &aWorldPos, const graphics_quaternion_type &aRotation, const graphics_vector3_type &aScale=graphics_vector3_type::One) override |
sets the model matrix using a vec3 position, quat rotation, vec3 scale | |
virtual void | set_model_matrix (const graphics_mat4x4_type &a) override |
set the model matrix using a matrix | |
const graphics_mat4x4_type & | getModelMatrix () const |
returns a const ref to the model matrix | |
webgl1es2_entity (const webgl1es2_entity &)=default | |
copy semantics | |
webgl1es2_entity & | operator= (const webgl1es2_entity &)=default |
copy semantics | |
webgl1es2_entity (webgl1es2_entity &&)=default | |
move semantics | |
webgl1es2_entity & | operator= (webgl1es2_entity &&)=default |
move semantics | |
webgl1es2_entity (const std::shared_ptr< webgl1es2_model >, const std::shared_ptr< webgl1es2_material >) | |
standard constructor. requires a model and a material | |
~webgl1es2_entity ()=default | |
trivial destructor | |
![]() | |
virtual | ~entity ()=default |
dtor | |
Represents an observable 3D object.
Contains a model, a material (shader, uniform data) a shader
TODO: animations, skeletons. These may be more appropriate in a separate animation library