Class which represents a user command, which can be "undone" and "redone".
More...
#include <MEUserCmdManager.hh>
|
| enum | CmdType {
INSERTING_LINK = 0,
DELETING_LINK = 1,
INSERTING_NESTED_MODEL = 2,
DELETING_NESTED_MODEL = 3,
INSERTING_JOINT = 4,
DELETING_JOINT = 5,
MOVING_LINK = 6,
MOVING_NESTED_MODEL = 7,
SCALING_LINK = 8,
INSERTING_MODEL_PLUGIN = 9,
DELETING_MODEL_PLUGIN = 10
} |
| | Types of user commands. More...
|
| |
|
| | MEUserCmd (const unsigned int _id, const std::string &_description, MEUserCmd::CmdType _type) |
| | Constructor. More...
|
| |
| virtual | ~MEUserCmd () |
| | Destructor. More...
|
| |
| std::string | Description () const |
| | Return this command's description. More...
|
| |
| unsigned int | Id () const |
| | Return this command's unique ID. More...
|
| |
| virtual void | Redo () |
| | Redo this command. More...
|
| |
| void | SetJointId (const std::string &_id) |
| | Set the unique id of the joint related to this command. More...
|
| |
| void | SetPoseChange (const ignition::math::Pose3d &_before, const ignition::math::Pose3d &_after) |
| | Set the pose before and after the command. More...
|
| |
| void | SetScaleChange (const std::map< std::string, ignition::math::Vector3d > &_before, const std::map< std::string, ignition::math::Vector3d > &_after) |
| | Set the scale factors before and after the command. More...
|
| |
| void | SetScopedName (const std::string &_name) |
| | Set the scoped name of the entity related to this command. More...
|
| |
| void | SetSDF (sdf::ElementPtr _sdf) |
| | Set the SDF element relevant to this command. More...
|
| |
| virtual void | Undo () |
| | Undo this command. More...
|
| |
|
| std::unique_ptr< MEUserCmdPrivate > | dataPtr |
| |
Class which represents a user command, which can be "undone" and "redone".
Types of user commands.
| Enumerator |
|---|
| INSERTING_LINK |
Insert a link.
|
| DELETING_LINK |
Delete a link.
|
| INSERTING_NESTED_MODEL |
Insert a nested model.
|
| DELETING_NESTED_MODEL |
Delete a nested model.
|
| INSERTING_JOINT |
Insert a joint.
|
| DELETING_JOINT |
Delete a joint.
|
| MOVING_LINK |
Move a link.
|
| MOVING_NESTED_MODEL |
Move a nested model.
|
| SCALING_LINK |
Scale a link.
|
| INSERTING_MODEL_PLUGIN |
Insert a model plugin.
|
| DELETING_MODEL_PLUGIN |
Delete a model plugin.
|
Constructor.
- Parameters
-
| [in] | _id | Unique ID for this command |
| [in] | _description | Description for the command, such as "Rotate box", "Delete sphere", etc. |
| [in] | _type | Type of command, such as MOVING, DELETING, etc. |
| std::string Description |
( |
| ) |
const |
Return this command's description.
- Returns
- Description
| unsigned int Id |
( |
| ) |
const |
Return this command's unique ID.
- Returns
- Unique ID
| void SetJointId |
( |
const std::string & |
_id | ) |
|
Set the unique id of the joint related to this command.
- Parameters
-
| [in] | _id | Unique id of joint. |
| void SetPoseChange |
( |
const ignition::math::Pose3d & |
_before, |
|
|
const ignition::math::Pose3d & |
_after |
|
) |
| |
Set the pose before and after the command.
These are local poses with respect to the parent model.
- Parameters
-
| [in] | _before | Pose before the command, to be used by undo. |
| [in] | _after | Pose after the command, to be used by redo. |
| void SetScaleChange |
( |
const std::map< std::string, ignition::math::Vector3d > & |
_before, |
|
|
const std::map< std::string, ignition::math::Vector3d > & |
_after |
|
) |
| |
Set the scale factors before and after the command.
- Parameters
-
| [in] | _before | Scales before the command, to be used by undo. |
| [in] | _after | Scales after the command, to be used by redo. |
| void SetScopedName |
( |
const std::string & |
_name | ) |
|
Set the scoped name of the entity related to this command.
- Parameters
-
| [in] | _name | Fully scoped entity name. |
| void SetSDF |
( |
sdf::ElementPtr |
_sdf | ) |
|
Set the SDF element relevant to this command.
- Parameters
-
| std::unique_ptr<MEUserCmdPrivate> dataPtr |
|
protected |
The documentation for this class was generated from the following file: