![]() |
gdk-graphics 0b051eb9b5c1eaa0658babaa4463dd7a80aa9d2c
|
Represents an observable 3D object. More...
#include <webgl1es2_entity.h>
Public Member Functions | |
virtual std::shared_ptr< model > | getModel () const |
get the model | |
virtual std::shared_ptr< material > | getMaterial () const |
get the material | |
void | draw (const graphics_matrix4x4_type &aViewMatrix, const graphics_matrix4x4_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. | |
const graphics_matrix4x4_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 | |
external interface | |
virtual void | hide () override |
do not allow this entity to be drawn | |
virtual void | show () override |
allow this entity to be drawn | |
virtual bool | is_hidden () const override |
check if the entity is hidden | |
virtual void | set_transform (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_transform (const graphics_matrix4x4_type &a) override |
set the model matrix using a matrix | |
![]() | |
virtual | ~entity ()=default |
dtor | |
Represents an observable 3D object.
\detailed Has a position/rotation/scale, a polygonal shape (model), a material (shader, uniforms)
|
overridevirtual |
do not allow this entity to be drawn
Implements gdk::entity.
|
overridevirtual |
check if the entity is hidden
Implements gdk::entity.
|
overridevirtual |
set the model matrix using a matrix
Implements gdk::entity.
|
overridevirtual |
sets the model matrix using a vec3 position, quat rotation, vec3 scale
Implements gdk::entity.
|
overridevirtual |
allow this entity to be drawn
Implements gdk::entity.