refactor: rename Puppet class to Prop3D across the codebase
This commit is contained in:
@@ -11,31 +11,31 @@ namespace uLib {
|
||||
namespace Vtk {
|
||||
|
||||
/**
|
||||
* @brief ObjectsContext manages VTK representations (Puppets) for a collection of uLib::Objects.
|
||||
* @brief ObjectsContext manages VTK representations (Prop3Ds) for a collection of uLib::Objects.
|
||||
*/
|
||||
class ObjectsContext : public Puppet {
|
||||
class ObjectsContext : public Prop3D {
|
||||
public:
|
||||
uLibTypeMacro(ObjectsContext, Puppet)
|
||||
uLibTypeMacro(ObjectsContext, Prop3D)
|
||||
ObjectsContext(uLib::ObjectsContext *context);
|
||||
virtual ~ObjectsContext();
|
||||
|
||||
/** @brief Synchronizes the VTK puppets with the core ObjectsContext. */
|
||||
/** @brief Synchronizes the VTK prop3ds with the core ObjectsContext. */
|
||||
void Synchronize();
|
||||
|
||||
/** @brief Returns the puppet associated with a specific core object. */
|
||||
Puppet* GetPuppet(uLib::Object* obj);
|
||||
/** @brief Returns the Prop3D associated with a specific core object. */
|
||||
Prop3D* GetProp3D(uLib::Object* obj);
|
||||
|
||||
const std::map<uLib::Object*, Puppet*>& GetPuppets() const { return m_Puppets; }
|
||||
const std::map<uLib::Object*, Prop3D*>& GetProp3Ds() const { return m_Prop3Ds; }
|
||||
|
||||
/** @brief Updates all managed puppets. */
|
||||
/** @brief Updates all managed prop3ds. */
|
||||
virtual void Update() override;
|
||||
|
||||
/** @brief Synchronizes all managed puppets back to their models. */
|
||||
/** @brief Synchronizes all managed prop3ds back to their models. */
|
||||
virtual void SyncFromVtk() override;
|
||||
|
||||
public:
|
||||
virtual void PuppetAdded(Puppet* puppet);
|
||||
virtual void PuppetRemoved(Puppet* puppet);
|
||||
virtual void Prop3DAdded(Prop3D* prop3d);
|
||||
virtual void Prop3DRemoved(Prop3D* prop3d);
|
||||
|
||||
public:
|
||||
/** @brief Slot called when an object is added to the core context. */
|
||||
@@ -44,12 +44,12 @@ public:
|
||||
void OnObjectRemoved(uLib::Object* obj);
|
||||
|
||||
protected:
|
||||
/** @brief Factory method to create a puppet for a core object. */
|
||||
Puppet* CreatePuppet(uLib::Object* obj);
|
||||
/** @brief Factory method to create a Prop3D for a core object. */
|
||||
Prop3D* CreateProp3D(uLib::Object* obj);
|
||||
|
||||
private:
|
||||
uLib::ObjectsContext *m_Context;
|
||||
std::map<uLib::Object*, Puppet*> m_Puppets;
|
||||
std::map<uLib::Object*, Prop3D*> m_Prop3Ds;
|
||||
vtkAssembly *m_Assembly;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user