Skip to content
Snippets Groups Projects
Commit a09c6b84 authored by Sreekanth Arikatla's avatar Sreekanth Arikatla
Browse files

REFAC: Rename Entity to SceneEntity and move to Scene

parent 35814df4
No related branches found
No related tags found
No related merge requests found
......@@ -45,7 +45,7 @@ enum class LightType
///
/// \brief Abstract base class for lights
///
class Light : public Entity
class Light : public SceneEntity
{
public:
///
......@@ -117,7 +117,7 @@ public:
void setName(const std::string&& name) { m_name = std::move(name); };
protected:
explicit Light(const std::string& name, const LightType& type) : m_name(name), m_type(type), Entity() {};
explicit Light(const std::string& name, const LightType& type) : m_name(name), m_type(type), SceneEntity() {};
// properties with defaults
float m_intensity = 100.;
......
......@@ -26,7 +26,7 @@
namespace imstk
{
SceneObject::SceneObject(const std::string& name) : m_name(name), Entity()
SceneObject::SceneObject(const std::string& name) : m_name(name), SceneEntity()
{
m_type = Type::Visual;
}
......
......@@ -38,7 +38,7 @@ class DeviceClient;
/// \brief Base class for all scene objects. A scene object can optionally be visible and
/// collide with other scene objects. A object of the class is static.
///
class SceneObject : public Entity
class SceneObject : public SceneEntity
{
public:
enum class Type
......
......@@ -23,16 +23,16 @@
namespace imstk
{
std::atomic<EntityID> Entity::s_count { 0 };
std::atomic<EntityID> SceneEntity::s_count { 0 };
Entity::Entity()
SceneEntity::SceneEntity()
{
s_count++;
m_ID = s_count;
}
EntityID
Entity::getID() const
SceneEntity::getID() const
{
return m_ID;
}
......
......@@ -28,10 +28,10 @@ namespace imstk
using EntityID = unsigned long;
///
/// \class Entity
/// \brief Top-level class for iMSTK objects
/// \class SceneEntity
/// \brief Top-level class for iMSTK scene elements (scene objects, lights, camera)
///
class Entity
class SceneEntity
{
public:
///
......@@ -44,11 +44,11 @@ protected:
///
/// \brief Constructor
///
Entity();
SceneEntity();
// Not the best design pattern
static std::atomic<EntityID> s_count; ///< current count of entities
EntityID m_ID; ///< unique ID of entity
EntityID m_ID; ///< unique ID of entity
};
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment