SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
|
Set (or remove) a coordinate transform on components. More...
#include <CoordinateTransform.h>
Public Member Functions | |
smtkTypeMacro (smtk::operation::CoordinateTransform) | |
smtkSharedPtrCreateMacro (smtk::operation::Operation) | |
smtkSuperclassMacro (smtk::operation::XMLOperation) | |
![]() | |
smtkTypeMacro (XMLOperation) | |
smtkSharedFromThisMacro (smtk::operation::Operation) | |
![]() | |
smtkTypeMacroBase (smtk::operation::Operation) | |
virtual Index | index () const |
virtual bool | configure (const smtk::attribute::AttributePtr &changedAttribute=smtk::attribute::AttributePtr(), const smtk::attribute::ItemPtr &changedItem=smtk::attribute::ItemPtr()) |
Update the operation's specification and operations to be consistent. More... | |
virtual bool | ableToOperate () |
Check if the operation's attribute resource is valid. More... | |
Result | operate () |
Execute the operation, log its outcome and return its results. More... | |
Outcome | safeOperate () |
Execute the operation in an asynchronous environment. More... | |
Outcome | safeOperate (Handler handler) |
virtual bool | releaseResult (Result &result) |
Release the operation result returned by operate() . More... | |
virtual smtk::io::Logger & | log () const |
Retrieve the operation's logger. More... | |
Specification | specification () |
This accessor facilitates the lazy construction of the specification, allowing for derived implementations of its creation. More... | |
Parameters | parameters () |
Access the operation's input parameters, constructing them if necessary. More... | |
Parameters | parameters () const |
Result | createResult (Outcome) |
Create an attribute representing this operation's result type. More... | |
ManagerPtr | manager () const |
Operations that are managed have a non-null pointer to their manager. | |
bool | restoreTrace (const std::string &trace) |
restore operation parameters from the trace of a previously run operation. | |
void | setManagers (const std::shared_ptr< smtk::common::Managers > &m) |
Operations may be passed application state in the form of a Managers type-container. | |
std::shared_ptr< smtk::common::Managers > | managers () const |
virtual bool | threadSafe () const |
Is this type of operation safe to launch in a thread? | |
smtk::resource::ManagerPtr | resourceManager () |
retrieve the resource manager, if available. | |
Result | operate (Key) |
Protected Member Functions | |
bool | removeTransform (const std::shared_ptr< smtk::attribute::ReferenceItem > &associations, Result &result) |
Result | operateInternal () override |
const char * | xmlDescription () const override |
![]() | |
Specification | createSpecification () override |
![]() | |
virtual void | postProcessResult (Result &) |
virtual void | markModifiedResources (Result &) |
virtual bool | unmanageResources (Result &) |
virtual void | generateSummary (Result &) |
Specification | createBaseSpecification () const |
Additional Inherited Members | |
![]() | |
enum | Outcome { Outcome::UNABLE_TO_OPERATE, Outcome::CANCELED, Outcome::FAILED, Outcome::SUCCEEDED, Outcome::UNKNOWN = -1 } |
typedef std::size_t | Index |
typedef std::shared_ptr< smtk::attribute::Attribute > | Parameters |
typedef std::shared_ptr< smtk::attribute::Attribute > | Result |
typedef std::shared_ptr< smtk::attribute::Resource > | Specification |
typedef std::shared_ptr< smtk::attribute::Definition > | Definition |
![]() | |
friend | Manager |
friend | ImportPythonOperation |
![]() | |
int | m_debugLevel { 0 } |
std::weak_ptr< Manager > | m_manager |
std::shared_ptr< smtk::common::Managers > | m_managers |
Set (or remove) a coordinate transform on components.
The coordinate transform is specified as a pair of coordinate frames: one indicating a starting location and orientation (usually this is placed on or inside the object to be transformed) and one indicating the destination location and orientation.
The transform will translate the origin of the "from" coordinate-frame onto the "to" coordinate-frame's origin and rotate the "from" axes to align with the "to" axes.
Note that the transform is not applied to the component's geometry by this operation. Instead, the transform is applied when rendering but otherwise leaves the geometric data unmodified.
The resulting transform is itself stored as a coordinate frame, with a property named "smtk.geometry.transform". In addition to the computed transform, the component will also have coordinate-frame properties name "smtk.geometry.transform.from.frame" and "smtk.geometry.transform.to.frame" set, so that the operation can serve as an editor.
Finally, provenance information may be set as additional string properties named: