gdk-graphics 0a0aef92e917cfbac53dffbc32c295e4de914093
Loading...
Searching...
No Matches
entity.h
1// © Joseph Cameron - MIT License
2
3#ifndef GDK_GRAPHICS_ENTITY_H
4#define GDK_GRAPHICS_ENTITY_H
5
6#include <gdk/graphics/types.h>
7
8namespace gdk::graphics {
9 class material;
10 class model;
11
13 class entity {
14 public:
16 virtual void hide() = 0;
17
19 virtual void show() = 0;
20
22 virtual bool is_hidden() const = 0;
23
25 virtual void set_transform(const vector3_type &aWorldPos,
26 const quaternion_type &aRotation,
27 const vector3_type &aScale) = 0;
28
30 void set_transform(const vector3_type &aWorldPos, const quaternion_type &aRotation) {
31 set_transform(aWorldPos, aRotation, vector3_type::one);
32 }
33
35 virtual void set_transform(const matrix4x4_type& a) = 0;
36
38 virtual void set_bounds(const vector3_type &aCentre, floating_point_type aRadius) = 0;
39
41 virtual ~entity() = default;
42 };
43}
44
45#endif
46
represents an observable 3d object.
Definition entity.h:13
virtual bool is_hidden() const =0
check if the entity is hidden
virtual void set_transform(const vector3_type &aWorldPos, const quaternion_type &aRotation, const vector3_type &aScale)=0
sets the model matrix using a vec3 position, quat rotation, vec3 scale
virtual void show()=0
allow this entity to be drawn
virtual void set_transform(const matrix4x4_type &a)=0
set the model matrix using a matrix
void set_transform(const vector3_type &aWorldPos, const quaternion_type &aRotation)
sets the model matrix using a vec3 position and quat rotation, unscaled
Definition entity.h:30
virtual void hide()=0
do not allow this entity to be drawn
virtual ~entity()=default
dtor
virtual void set_bounds(const vector3_type &aCentre, floating_point_type aRadius)=0
the bounding sphere of the model, used for culling
decides how models using the material should be drawn.
Definition material.h:21
Vertex data representing a 3D graphical object.
Definition model.h:10