hivemind 1.0.0
Loading...
Searching...
No Matches
KeyframeManagement::KeyframeManager Class Reference

This is the class that manages keyframes. More...

#include <keyframe_manager.h>

Inheritance diagram for KeyframeManagement::KeyframeManager:
Inheritance graph
Collaboration diagram for KeyframeManagement::KeyframeManager:
Collaboration graph

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 KeyframeManagerInstance ()
 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
 
KeyframeManageroperator= (const KeyframeManager &)=delete
 

Private Attributes

std::vector< Core::Keyframem_Keyframes
 

Detailed Description

This is the class that manages keyframes.

Definition at line 14 of file keyframe_manager.h.

Constructor & Destructor Documentation

◆ KeyframeManager() [1/2]

KeyframeManagement::KeyframeManager::KeyframeManager ( )
inlineprivate

Private constructor for singleton pattern.

Definition at line 84 of file keyframe_manager.h.

◆ ~KeyframeManager()

KeyframeManagement::KeyframeManager::~KeyframeManager ( )
inlineprivate

Private destructor for singleton pattern.

Definition at line 86 of file keyframe_manager.h.

◆ KeyframeManager() [2/2]

KeyframeManagement::KeyframeManager::KeyframeManager ( const KeyframeManager )
privatedelete

Member Function Documentation

◆ AddKeyframe() [1/3]

void KeyframeManagement::KeyframeManager::AddKeyframe ( Core::Keyframe keyframe)

Adds a keyframe object to the keyframe list.

Parameters
keyframeThe 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.

◆ AddKeyframe() [2/3]

void KeyframeManagement::KeyframeManager::AddKeyframe ( int  agentId,
float  timeStamp,
Core::CartesianCoordinate  position 
)

Adds a keyframe to the keyframe list using a CartesianCoordinate.

Parameters
agentIdThe ID of the agent
timeStampThe timestamp of the keyframe
positionThe CartesianCoordinate representing the position

Definition at line 18 of file keyframe_manager.cpp.

References AddKeyframe().

Here is the call graph for this function:

◆ AddKeyframe() [3/3]

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.

Parameters
agentIdThe ID of the agent
timeStampThe timestamp of the keyframe
xThe x coordinate
yThe y coordinate
zThe z coordinate

Definition at line 9 of file keyframe_manager.cpp.

References AddKeyframe().

Referenced by AddKeyframe(), and Gui::MapViewer::mousePressEvent().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DebugDump()

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.

◆ GetKeyframes()

std::vector< Core::Keyframe > & KeyframeManagement::KeyframeManager::GetKeyframes ( )
inline

Returns a reference to the list of keyframes.

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().

Here is the caller graph for this function:

◆ Instance()

static KeyframeManager & KeyframeManagement::KeyframeManager::Instance ( )
inlinestatic

Returns the singleton instance of the KeyframeManager.

Returns
A reference to 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().

Here is the caller graph for this function:

◆ KeyframeAdded

void KeyframeManagement::KeyframeManager::KeyframeAdded ( )
signal

Referenced by AddKeyframe().

Here is the caller graph for this function:

◆ operator=()

KeyframeManager & KeyframeManagement::KeyframeManager::operator= ( const KeyframeManager )
privatedelete

◆ RemoveKeyframe()

void KeyframeManagement::KeyframeManager::RemoveKeyframe ( const Core::Keyframe keyframe)

Removes a keyframe from the keyframe list.

Parameters
keyframeThe 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().

Here is the caller graph for this function:

Member Data Documentation

◆ m_Keyframes

std::vector<Core::Keyframe> KeyframeManagement::KeyframeManager::m_Keyframes
private

Definition at line 91 of file keyframe_manager.h.

Referenced by AddKeyframe(), DebugDump(), GetKeyframes(), and RemoveKeyframe().


The documentation for this class was generated from the following files: