18 #ifndef __H__OCULAR_CORE_SCENE_OBJECT__H__
19 #define __H__OCULAR_CORE_SCENE_OBJECT__H__
23 #include "ObjectIO/ObjectIO.hpp"
25 #include "Math/Transform.hpp"
26 #include "Math/Bounds/BoundsSphere.hpp"
27 #include "Math/Bounds/BoundsAABB.hpp"
28 #include "Math/Bounds/BoundsOBB.hpp"
30 #include "Graphics/Shader/Uniform/UniformPerObject.hpp"
36 #include "Math/Matrix3x3.hpp"
109 SceneObject(std::string
const& name,
SceneObject* parent =
nullptr, std::string
const& type =
"SceneObject");
304 void setScale(
float xScale,
float yScale,
float zScale);
535 routine->setParent(
this);
536 m_Routines.push_back(routine);
592 uint32_t getNumRoutines()
const;
601 ARenderable* setRenderable(std::string
const& name);
620 m_Renderable = renderable;
621 m_Renderable->m_Parent =
this;
635 void removeRenderable(
bool transferring =
false);
640 ARenderable* getRenderable()
const;
646 virtual void onLoad(BuilderNode
const* node)
override;
647 virtual void onSave(BuilderNode* node)
const override;
653 void forceBoundsRebuild();
681 void getModelMatrix(Math::Matrix4x4& matrix);
682 virtual void updateBounds(uint32_t dirtyFlags);
703 void removeChild(std::vector<SceneObject*>::iterator& child);
710 bool m_ForcedVisible;
713 std::vector<ARoutine*> m_Routines;
716 std::vector<SceneObject*> m_Children;
uint32_t m_Layer
The render layer this object is part of.
Definition: SceneObject.hpp:687
Math::Transform & getTransform()
Definition: SceneObject.cpp:152
void rotate(float angle, Math::Vector3f const &axis)
Definition: SceneObject.cpp:306
void removeAllRoutines()
Definition: SceneObject.cpp:696
virtual void onLoad(BuilderNode const *node) override
Definition: SceneObject.cpp:804
virtual void onCreation()
Definition: ARoutine.cpp:70
SceneObject()
Definition: SceneObject.cpp:55
SceneObject * getParent() const
Definition: SceneObject.cpp:439
ARoutine * getRoutine(std::string const &name)
Definition: SceneObject.cpp:714
virtual void onSave(BuilderNode *node) const override
Definition: SceneObject.cpp:892
Math::BoundsAABB getBoundsAABB(bool local)
Definition: SceneObject.cpp:988
virtual void onVariableModified(std::string const &varName) override
Definition: SceneObject.cpp:144
void resetRotation()
Definition: SceneObject.cpp:318
Definition: SceneManager.hpp:64
Note: Once this library is made dynamic, this will no longer be needed.
Definition: Common.hpp:70
Definition: BoundsOBB.hpp:56
std::vector< SceneObject * > const & getAllChildren() const
Definition: SceneObject.cpp:601
Definition: Quaternion.hpp:50
Definition: ARoutine.hpp:59
SceneObject * createChild(std::string const &name)
Definition: SceneObject.cpp:444
T * addRoutine()
Definition: SceneObject.hpp:528
virtual ~SceneObject()
Definition: SceneObject.cpp:72
void setRotation(Math::Quaternion const &rotation)
Definition: SceneObject.cpp:324
bool isPersistent() const
Definition: SceneObject.cpp:251
void setVisible(bool visible)
Definition: SceneObject.cpp:195
Definition: SceneObject.hpp:93
void addChild(SceneObject *child, bool maintainWorldPos=true)
Definition: SceneObject.cpp:450
Definition: ARenderable.hpp:53
void setParent(SceneObject *parent, bool maintainWorldPos=true)
Definition: SceneObject.cpp:410
std::vector< ARoutine * > const & getAllRoutines() const
Definition: SceneObject.cpp:735
void translate(Math::Vector3f const &translation, bool local=true)
Definition: SceneObject.cpp:300
uint32_t getNumChildren() const
Definition: SceneObject.cpp:596
Math::BoundsOBB getBoundsOBB(bool local)
Definition: SceneObject.cpp:1001
Math::BoundsSphere getBoundsSphere(bool local)
Definition: SceneObject.cpp:975
SceneObject * removeChild(std::string const &name)
Definition: SceneObject.cpp:521
A 4x4 column-major float matrix.
Definition: Matrix4x4.hpp:64
Math::Vector3f getPosition(bool local=true) const
Definition: SceneObject.cpp:283
bool isStatic() const
Definition: SceneObject.cpp:241
void setForcedVisible(bool forced)
Definition: SceneObject.cpp:205
Definition: BoundsAABB.hpp:63
SceneObject * findChild(std::string const &name)
Definition: SceneObject.cpp:479
void setActive(bool active)
Definition: SceneObject.cpp:157
Definition: BoundsSphere.hpp:52
Base class of all representable Ocular constructs.
Definition: Object.hpp:44
void setPersistent(bool persists)
Definition: SceneObject.cpp:246
void setPosition(float x, float y, float z)
Definition: SceneObject.cpp:271
void setStatic(bool isStatic)
Definition: SceneObject.cpp:232
bool isForcedVisible() const
Definition: SceneObject.cpp:227
bool removeRoutine(std::string const &name)
Definition: SceneObject.cpp:635
bool isVisible() const
Definition: SceneObject.cpp:200
bool isActive() const
Definition: SceneObject.cpp:190