DNA Calib 1.1
Project brief
Classes | Public Member Functions | Private Attributes | List of all members
dnac::RotateCommand Class Reference

RotateCommand is used to rotate neutral joints and vertex positions around given origin. More...

#include <RotateCommand.h>

Inheritance diagram for dnac::RotateCommand:
Inheritance graph
Collaboration diagram for dnac::RotateCommand:
Collaboration graph

Classes

class  Impl
 

Public Member Functions

DNACAPI RotateCommand (MemoryResource *memRes=nullptr)
 
DNACAPI RotateCommand (Vector3 degrees, Vector3 origin, MemoryResource *memRes=nullptr)
 
DNACAPI ~RotateCommand ()
 
 RotateCommand (const RotateCommand &)=delete
 
RotateCommandoperator= (const RotateCommand &)=delete
 
DNACAPI RotateCommand (RotateCommand &&)
 
DNACAPI RotateCommandoperator= (RotateCommand &&)
 
DNACAPI void setRotation (Vector3 degrees)
 Method for setting the rotation angles. More...
 
DNACAPI void setOrigin (Vector3 origin)
 Method for setting the rotation origin. More...
 
DNACAPI void run (DNACalibDNAReader *output) override
 
- Public Member Functions inherited from dnac::Command
virtual ~Command ()
 
virtual void run (DNACalibDNAReader *output)=0
 

Private Attributes

ScopedPtr< ImplpImpl
 

Detailed Description

RotateCommand is used to rotate neutral joints and vertex positions around given origin.

Note
Joint rotations are represented in parent space, so it is enough to rotate only root joints, as that rotation will be propagated to the rest of the joints.
If the origin is not set, the assumed origin is (0, 0, 0).

Constructor & Destructor Documentation

◆ RotateCommand() [1/4]

dnac::RotateCommand::RotateCommand ( MemoryResource memRes = nullptr)
explicit
101 : pImpl{makeScoped<Impl>(memRes)} {
102}
ScopedPtr< Impl > pImpl
Definition: RotateCommand.h:50

◆ RotateCommand() [2/4]

dnac::RotateCommand::RotateCommand ( Vector3  degrees,
Vector3  origin,
MemoryResource memRes = nullptr 
)
104 :
105 pImpl{makeScoped<Impl>(memRes)} {
106
107 pImpl->setRotation(degrees);
108 pImpl->setOrigin(origin);
109}

References tdm::degrees(), and pImpl.

◆ ~RotateCommand()

dnac::RotateCommand::~RotateCommand ( )
default

◆ RotateCommand() [3/4]

dnac::RotateCommand::RotateCommand ( const RotateCommand )
delete

◆ RotateCommand() [4/4]

dnac::RotateCommand::RotateCommand ( RotateCommand &&  )
default

Member Function Documentation

◆ operator=() [1/2]

RotateCommand & dnac::RotateCommand::operator= ( const RotateCommand )
delete

◆ operator=() [2/2]

RotateCommand & dnac::RotateCommand::operator= ( RotateCommand &&  )
default

◆ run()

void dnac::RotateCommand::run ( DNACalibDNAReader output)
overridevirtual

Implements dnac::Command.

123 {
124 pImpl->run(static_cast<DNACalibDNAReaderImpl*>(output));
125}

References pImpl.

◆ setOrigin()

void dnac::RotateCommand::setOrigin ( Vector3  origin)

Method for setting the rotation origin.

Parameters
originOrigin coordinates.
119 {
120 pImpl->setOrigin(origin);
121}

References pImpl.

◆ setRotation()

void dnac::RotateCommand::setRotation ( Vector3  degrees)

Method for setting the rotation angles.

Parameters
degreesRotation angles in degrees.
115 {
116 pImpl->setRotation(degrees);
117}

References tdm::degrees(), and pImpl.

Member Data Documentation

◆ pImpl

ScopedPtr<Impl> dnac::RotateCommand::pImpl
private

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