Go to the documentation of this file.
42 bool repeatAnimation =
true;
46 uint64_t getNumPoses();
50 bool rotationByMatrix =
false;
51 std::vector<std::shared_ptr<Model>> models;
52 std::shared_ptr<BoundingBoxSet> boundingBoxSet = std::shared_ptr<BoundingBoxSet>(
new BoundingBoxSet());
53 void init(
const std::string& name,
const uint32_t boundingBoxSubdivisions);
65 SceneObject(
const std::string& name,
const Model& model,
const uint32_t boundingBoxSubdivisions = 0);
76 SceneObject(
const std::string& name,
const Model&& model,
const uint32_t boundingBoxSubdivisions = 0);
88 SceneObject(
const std::string& name,
const std::vector<std::shared_ptr<Model>>& models,
const uint32_t boundingBoxSubdivisions = 0);
129 const std::string
getName()
const;
const std::string getName() const
Get the name of the object.
Definition: SceneObject.cpp:99
const Mat4 & getTransformation() const
: Get the tranformation matrix of the object
Definition: SceneObject.cpp:134
Vectors, matrices and other math things.
void setTransformation(const Mat4 &rotation)
: Set the transformation matrix of the object. (Overwrites rotation entered via setRotation)
Definition: SceneObject.cpp:123
~SceneObject()=default
Destructor.
std::vector< Model > getBoundingBoxSetModels()
Get the bounding box set as models (for debug-rendering)
Definition: SceneObject.cpp:91
A 3D model. It can be loaded from a WavefrontFile or GlbFile. It can also be constructed procedurally...
Definition: Model.hpp:34
std::vector< BoundingBoxSet::extremes > & getBoundingBoxSetExtremes()
Get the bounding box set extremes (min and max coords)
Definition: SceneObject.cpp:95
Bounding boxes for collision detection.
const Vec3 getOrientation() const
: Get the orientation of the object
Definition: SceneObject.cpp:129
void setFrameDelay(const int delay)
Set the animation speed.
Definition: SceneObject.cpp:160
SceneObject(const std::string &name, const Model &model, const uint32_t boundingBoxSubdivisions=0)
Model based constructor (skeletal animation)
Definition: SceneObject.cpp:37
bool contains(const Vec3 &point) const
Check if the bounding boxes of this object contain a given point.
Definition: SceneObject.cpp:180
Image loading and manipulation.
bool containsCorners(const SceneObject &otherObject) const
Check if the bounding boxes of this object contain a corner of the bounding boxes of another object.
Definition: SceneObject.cpp:189
Renderer class (OpenGL 3.3 / OpenGL ES 3.0)
Definition: Renderer.hpp:38
Set of bounding boxes for a SceneObject, calculated based on the vertices of a Model.
Definition: BoundingBoxSet.hpp:27
Vec3 position
Definition: SceneObject.hpp:134
Model & getModel()
Get the object's model.
Definition: SceneObject.cpp:59
void stopAnimating()
Stop animating the object.
Definition: SceneObject.cpp:151
File parser virtual class.
void rotate(const Vec3 &rotation)
: Modify the rotation of the object
Definition: SceneObject.cpp:111
void setAnimation(uint32_t animationIdx)
Set the current animation.
Definition: SceneObject.cpp:77
void animate()
Process animation (progress current frame if necessary)
Definition: SceneObject.cpp:164
Definition: BinaryFile.hpp:15
void setRotation(const Vec3 &rotation)
: Set the rotation of the object. (Overwrites transformation entered via setTransformation)
Definition: SceneObject.cpp:103
uint64_t getCurrentPose()
Get the current animation pose.
Definition: SceneObject.cpp:68
const Vec3 & getRotationXYZ() const
: Get the rotation of the object in x, y, z representation. This will NOT work if the rotation was se...
Definition: SceneObject.cpp:138
3 component float vector
Definition: Math.hpp:19
An object that appears on the 3D scene. It is made up of a Model, together with information for posit...
Definition: SceneObject.hpp:38
4x4 float matrix
Definition: Math.hpp:99
void resetAnimation()
Reset the animation sequence (go to the first frame)
Definition: SceneObject.cpp:156
void startAnimating(bool repeat=true)
Start animating the object.
Definition: SceneObject.cpp:145