CODRotateCommand Class

class CODRotateCommand: public CODCommand

Rotates a set of components.

Defined in: OdRotateCmd.h

Class Members

VIEWS_API CODRotateCommand(CODModel* pModel)

Constructor.

VIEWS_API virtual ~CODRotateCommand()

Destructor.

int m_nAngle

The angle to rotate the components by, in tenths of a degree.

CSize m_sizeAspectRatio

The aspect ratio of the viewport the components are being rotated in.

CMap<CODComponent*,CODComponent*,float,float> m_mapOriginX

The horizontal values of the origins to be used to rotate the individual components.

CMap<CODComponent*,CODComponent*,float,float> m_mapOriginY

The vertical values of the origins to be used to rotate the individual components.

VIEWS_API int GetRotation() const

Gets the angle of rotation.

VIEWS_API void SetRotation(const int nAngle)

Sets the angle of rotation.

VIEWS_API CSize GetAspectRatio() const

Gets the aspect ratio of the viewport the components are being rotated in.

VIEWS_API void SetAspectRatio(const CSize sizeAspectRatio)

Sets the aspect ratio of the viewport the components are being rotated in.

VIEWS_API void ClearOrigins()

Removes all entries from both maps of origin values.

VIEWS_API BOOL GetOrigin(CODComponent* pComp, float& fOriginX, float& fOriginY) const

Gets the origin to be used for rotation for a particular component.

VIEWS_API void SetOrigin(CODComponent* pComp, float fOriginX, float fOriginY)

Sets the origin to be used for rotation for a particular component.

VIEWS_API virtual BOOL Execute()

Rotates the components.

VIEWS_API virtual BOOL Unexecute()

Rotate the components back to their old positions.

VIEWS_API virtual sfl::MvcCommand* Dup() const

Make a copy of this rotate command.

VIEWS_API virtual void GetUpdateSet(CODComponentSet& setUpdate) const

Returns a list of components that are affected by this command.

VIEWS_API virtual void Sprint(CString& strCmd)

Print information on this command for logging purposes.