![]() |
hivemind 1.0.0
|
This is the class that manages keyframes. More...
#include <keyframe_manager.h>
Signals | |
void | KeyframeAdded () |
Public Member Functions | |
void | AddKeyframe (int agentId, float timeStamp, float x, float y, float z) |
Adds a keyframe to the keyframe list using x, y, and z coordinates. | |
void | AddKeyframe (int agentId, float timeStamp, Core::CartesianCoordinate position) |
Adds a keyframe to the keyframe list using a CartesianCoordinate. | |
void | AddKeyframe (Core::Keyframe &keyframe) |
Adds a keyframe object to the keyframe list. | |
void | RemoveKeyframe (const Core::Keyframe &keyframe) |
Removes a keyframe from the keyframe list. | |
void | DebugDump (void) const |
Dumps keyframe information to the console for debugging purposes. | |
std::vector< Core::Keyframe > & | GetKeyframes () |
Returns a reference to the list of keyframes. | |
Static Public Member Functions | |
static KeyframeManager & | Instance () |
Returns the singleton instance of the KeyframeManager. | |
Private Member Functions | |
KeyframeManager () | |
Private constructor for singleton pattern. | |
~KeyframeManager () | |
Private destructor for singleton pattern. | |
KeyframeManager (const KeyframeManager &)=delete | |
KeyframeManager & | operator= (const KeyframeManager &)=delete |
Private Attributes | |
std::vector< Core::Keyframe > | m_Keyframes |
This is the class that manages keyframes.
Definition at line 14 of file keyframe_manager.h.
|
inlineprivate |
Private constructor for singleton pattern.
Definition at line 84 of file keyframe_manager.h.
|
inlineprivate |
Private destructor for singleton pattern.
Definition at line 86 of file keyframe_manager.h.
|
privatedelete |
void KeyframeManagement::KeyframeManager::AddKeyframe | ( | Core::Keyframe & | keyframe | ) |
Adds a keyframe object to the keyframe list.
keyframe | The keyframe object to add |
Definition at line 30 of file keyframe_manager.cpp.
References Core::Keyframe::AgentId, KeyframeAdded(), m_Keyframes, Core::Keyframe::Position, and Core::Keyframe::TimeStamp.
void KeyframeManagement::KeyframeManager::AddKeyframe | ( | int | agentId, |
float | timeStamp, | ||
Core::CartesianCoordinate | position | ||
) |
Adds a keyframe to the keyframe list using a CartesianCoordinate.
agentId | The ID of the agent |
timeStamp | The timestamp of the keyframe |
position | The CartesianCoordinate representing the position |
Definition at line 18 of file keyframe_manager.cpp.
References AddKeyframe().
void KeyframeManagement::KeyframeManager::AddKeyframe | ( | int | agentId, |
float | timeStamp, | ||
float | x, | ||
float | y, | ||
float | z | ||
) |
Adds a keyframe to the keyframe list using x, y, and z coordinates.
agentId | The ID of the agent |
timeStamp | The timestamp of the keyframe |
x | The x coordinate |
y | The y coordinate |
z | The z coordinate |
Definition at line 9 of file keyframe_manager.cpp.
References AddKeyframe().
Referenced by AddKeyframe(), and Gui::MapViewer::mousePressEvent().
void KeyframeManagement::KeyframeManager::DebugDump | ( | void | ) | const |
Dumps keyframe information to the console for debugging purposes.
Definition at line 65 of file keyframe_manager.cpp.
References m_Keyframes.
|
inline |
Returns a reference to the list of keyframes.
Definition at line 75 of file keyframe_manager.h.
References m_Keyframes.
Referenced by CompileScenario::Scenario::Compile(), Gui::MapViewer::DrawKeyframes(), Gui::Timeline::mouseReleaseEvent(), Gui::Timeline::paintEvent(), and Gui::KeyframeList::Update().
|
inlinestatic |
Returns the singleton instance of the KeyframeManager.
Definition at line 25 of file keyframe_manager.h.
Referenced by Gui::MainWindow::ConnectSlotsAndSignals(), Gui::KeyframeList::DeleteSelected(), Gui::MapViewer::DrawKeyframes(), Gui::MapViewer::mousePressEvent(), Gui::Timeline::mouseReleaseEvent(), Gui::Timeline::paintEvent(), Gui::Timeline::Timeline(), and Gui::KeyframeList::Update().
|
signal |
|
privatedelete |
void KeyframeManagement::KeyframeManager::RemoveKeyframe | ( | const Core::Keyframe & | keyframe | ) |
Removes a keyframe from the keyframe list.
keyframe | The keyframe to remove |
Definition at line 50 of file keyframe_manager.cpp.
References Core::Keyframe::AgentId, m_Keyframes, Core::Keyframe::Position, Core::Keyframe::TimeStamp, Core::CartesianCoordinate::X, Core::CartesianCoordinate::Y, and Core::CartesianCoordinate::Z.
Referenced by Gui::KeyframeList::DeleteSelected(), and Gui::Timeline::mouseReleaseEvent().
|
private |
Definition at line 91 of file keyframe_manager.h.
Referenced by AddKeyframe(), DebugDump(), GetKeyframes(), and RemoveKeyframe().