22 #include <glm/glm.hpp> 85 SceneObject(
const std::string name,
const std::string modelPath,
86 const int numFrames = 1,
87 const std::string boundingBoxSetPath =
"",
const int startFrameIndex = 1);
111 const std::string
getName()
const;
A 3D model, loaded from a Wavefront file.
Definition: Model.hpp:25
std::vector< Model > models
The models making up the object's animation. Do not manipulate directly.
Definition: SceneObject.hpp:51
void resetAnimation()
Reset the animation sequence (go to the first frame)
Definition: SceneObject.cpp:62
Header of the Image class.
void animate()
Process animation (progress current frame if necessary)
Definition: SceneObject.cpp:70
SceneObject(const std::string name, const std::string modelPath, const int numFrames=1, const std::string boundingBoxSetPath="", const int startFrameIndex=1)
Constructor.
Definition: SceneObject.cpp:13
BoundingBoxSet boundingBoxSet
The bounding boxes for the object, used for collision detection.
Definition: SceneObject.hpp:154
void stopAnimating()
Stop animating the object.
Definition: SceneObject.cpp:58
~SceneObject()=default
Destructor.
Model & getModel()
Get the object's model.
Definition: SceneObject.cpp:46
glm::vec3 offset
Definition: SceneObject.hpp:116
void startAnimating()
Start animating the object.
Definition: SceneObject.cpp:54
bool isAnimated() const
Is this an animated or a static object (is it associated with more than one frames/models)?
Definition: SceneObject.cpp:115
void setFrameDelay(const int delay)
Set the animation speed.
Definition: SceneObject.cpp:66
An object that appears on the 3D scene. It is made up of one or more models (the latter for animation...
Definition: SceneObject.hpp:35
Header of the BoundingBoxSet class.
Header of the Model class.
Header of the Logger class.
glm::vec3 rotation
Definition: SceneObject.hpp:121
const std::string getName() const
Get the name of the object.
Definition: SceneObject.cpp:50
Set of bounding boxes for a SceneObject, loaded from a Wavefront file, allowing for collision detecti...
Definition: BoundingBoxSet.hpp:26
bool collidesWith(const glm::vec3 point) const
Check if the object collides with a given point.
Definition: SceneObject.cpp:83