3#include "scene/Animated.hpp"
4#include "scene/Animation.hpp"
5#include "resources/ResourcesManager.hpp"
6#include "system/Codable.hpp"
32 void addAnimation(
const std::shared_ptr<Animation> & anim);
43 virtual void update(
double fullTime,
double frameTime);
Wraps an animated property so that the initial value is preserved.
Definition: Animated.hpp:11
Represent the smallest axis-aligne box containing a given object or region of space.
Definition: Bounds.hpp:28
Represent a surface material, including textures describing the surface parameters.
Definition: Material.hpp:72
Represents a geometric mesh composed of vertices, other attributes and triangles.
Definition: Mesh.hpp:15
Represent a 3D textured object.
Definition: Object.hpp:16
bool castsShadow() const
Definition: Object.hpp:64
virtual ~Object()=default
const Mesh * _mesh
Geometry of the object.
Definition: Object.hpp:131
BoundingBox _bbox
The world space object bounding box.
Definition: Object.hpp:136
Object & operator=(Object &&)=default
std::vector< std::shared_ptr< Animation > > _animations
Animations list (applied in order).
Definition: Object.hpp:134
Animated< glm::mat4 > _model
The transformation matrix of the 3D model, updated by the animations.
Definition: Object.hpp:135
bool animated() const
Definition: Object.hpp:74
const glm::mat4 & model() const
Definition: Object.hpp:59
void set(const glm::mat4 &model)
Definition: Object.cpp:83
const std::string & materialName() const
Definition: Object.hpp:85
virtual void update(double fullTime, double frameTime)
Definition: Object.cpp:88
const BoundingBox & boundingBox() const
Definition: Object.cpp:99
void addAnimation(const std::shared_ptr< Animation > &anim)
Definition: Object.cpp:79
virtual KeyValues encode() const
Definition: Object.cpp:46
Object(Object &&)=default
bool _dirtyBbox
Has the bounding box been updated following an animation update.
Definition: Object.hpp:140
const Mesh * mesh() const
Definition: Object.hpp:54
Object & operator=(const Object &)=delete
const Material & material() const
Definition: Object.hpp:82
Object(const Object &)=delete
void setMaterial(const Material *material)
Definition: Object.cpp:74
bool _castShadow
Can the object casts shadows.
Definition: Object.hpp:137
std::string _materialName
Material name.
Definition: Object.hpp:132
bool _skipUVs
The object doesn't use UV coordinates.
Definition: Object.hpp:138
bool useTexCoords() const
Definition: Object.hpp:69
virtual bool decode(const KeyValues ¶ms, Storage options)
Definition: Object.cpp:10
const Material * _material
Material.
Definition: Object.hpp:133
Storage
Storage and loading options.
Definition: ResourcesManager.hpp:14
Represent a key-values tuple.
Definition: Config.hpp:9