gdk-graphics  1b6d84e044c2c953fd7c9501e628a67e80f4da0d
Public Member Functions | List of all members
gdk::webgl1es2_entity Class Referencefinal

Represents an observable 3D object. More...

#include <webgl1es2_entity.h>

Inheritance diagram for gdk::webgl1es2_entity:
gdk::entity

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< modelgetModel () const
 get the model
 
virtual std::shared_ptr< materialgetMaterial () 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_entityoperator= (const webgl1es2_entity &)=default
 copy semantics
 
 webgl1es2_entity (webgl1es2_entity &&)=default
 move semantics
 
webgl1es2_entityoperator= (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
 
- Public Member Functions inherited from gdk::entity
virtual ~entity ()=default
 dtor
 

Detailed Description

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


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