Open 3D Engine (O3DE), the successor to Lumberyard, is now available in Developer Preview. Download O3DE or visit the AWS Game Tech blog to learn more. |
Interface for AZ::TransformBus , which is an EBus that receives requests to translate (position), rotate, and scale an entity in 3D space. More...
Inherits AZ::ComponentBus .
Public Member Functions |
|
virtual | ~TransformInterface () |
A destructor.
More...
|
|
virtual const Transform & | GetLocalTM ()=0 |
Returns the entity's local transform, not including the parent transform.
More...
|
|
virtual void | SetLocalTM (const Transform &) |
Sets the entity's local transform and notifies all listeners.
More...
|
|
virtual const Transform & | GetWorldTM ()=0 |
Returns the entity's world transform, including the parent transform.
More...
|
|
virtual void | SetWorldTM (const Transform &) |
Sets the world transform and notifies all listeners.
More...
|
|
virtual void | GetLocalAndWorld (Transform &, Transform &) |
Retrieves the entity's local and world transforms.
More...
|
|
virtual void | SetWorldTranslation (const AZ::Vector3 &) |
Sets the entity's world space translation, which represents how to move the entity to a new position within the world.
More...
|
|
virtual void | SetLocalTranslation (const AZ::Vector3 &) |
Sets the entity's local space translation, which represents how to move the entity to a new position relative to its parent.
More...
|
|
virtual AZ::Vector3 | GetWorldTranslation () |
Gets the entity's world space translation.
More...
|
|
virtual AZ::Vector3 | GetLocalTranslation () |
Gets the entity's local space translation.
More...
|
|
virtual void | MoveEntity (const AZ::Vector3 &) |
Moves the entity within world space.
More...
|
|
virtual void | SetWorldX (float) |
Sets the entity's X coordinate in world space.
More...
|
|
virtual void | SetWorldY (float) |
Sets the entity's Y coordinate in world space.
More...
|
|
virtual void | SetWorldZ (float) |
Sets the entity's Z coordinate in world space.
More...
|
|
virtual float | GetWorldX () |
Gets the entity's X coordinate in world space.
More...
|
|
virtual float | GetWorldY () |
Gets the entity's Y coordinate in world space.
More...
|
|
virtual float | GetWorldZ () |
Gets the entity's Z coordinate in world space.
More...
|
|
virtual void | SetLocalX (float) |
Sets the entity's X coordinate in local space.
More...
|
|
virtual void | SetLocalY (float) |
Sets the entity's Y coordinate in local space.
More...
|
|
virtual void | SetLocalZ (float) |
Sets the entity's Z coordinate in local space.
More...
|
|
virtual float | GetLocalX () |
Gets the entity's X coordinate in local space.
More...
|
|
virtual float | GetLocalY () |
Gets the entity's Y coordinate in local space.
More...
|
|
virtual float | GetLocalZ () |
Gets the entity's Z coordinate in local space.
More...
|
|
virtual void | SetRotation (const AZ::Vector3 &) |
Deprecated.
More...
|
|
virtual void | SetRotationX (float) |
Deprecated.
More...
|
|
virtual void | SetRotationY (float) |
Deprecated.
More...
|
|
virtual void | SetRotationZ (float) |
Deprecated.
More...
|
|
virtual void | SetRotationQuaternion (const AZ::Quaternion &) |
Deprecated.
More...
|
|
virtual void | RotateByX (float) |
Deprecated.
More...
|
|
virtual void | RotateByY (float) |
Deprecated.
More...
|
|
virtual void | RotateByZ (float) |
Deprecated.
More...
|
|
virtual AZ::Vector3 | GetRotationEulerRadians () |
Deprecated.
More...
|
|
virtual AZ::Quaternion | GetRotationQuaternion () |
Deprecated.
More...
|
|
virtual float | GetRotationX () |
Deprecated.
More...
|
|
virtual float | GetRotationY () |
Deprecated.
More...
|
|
virtual float | GetRotationZ () |
Deprecated.
More...
|
|
virtual AZ::Vector3 | GetWorldRotation () |
Gets the entity's rotation in radians in world space.
More...
|
|
virtual AZ::Quaternion | GetWorldRotationQuaternion () |
Gets the entity's rotation in quaternion in world space.
More...
|
|
virtual void | SetLocalRotation (const AZ::Vector3 &) |
Sets the entity's rotation in local space using a composition of rotations around the three axes.
More...
|
|
virtual void | SetLocalRotationQuaternion (const AZ::Quaternion &) |
Sets the entity's rotation in local space using a quaternion.
More...
|
|
virtual void | RotateAroundLocalX (float) |
Rotates the entity around the X axis in local space.
More...
|
|
virtual void | RotateAroundLocalY (float) |
Rotates the entity around the Y axis in local space.
More...
|
|
virtual void | RotateAroundLocalZ (float) |
Rotates the entity around the Z axis in local space.
More...
|
|
virtual AZ::Vector3 | GetLocalRotation () |
Gets the entity's rotation in radians in local space.
More...
|
|
virtual AZ::Quaternion | GetLocalRotationQuaternion () |
Gets the quaternion representing the entity's rotation in local space.
More...
|
|
virtual void | SetScale (const AZ::Vector3 &) |
Deprecated.
More...
|
|
virtual void | SetScaleX (float) |
Deprecated.
More...
|
|
virtual void | SetScaleY (float) |
Deprecated.
More...
|
|
virtual void | SetScaleZ (float) |
Deprecated.
More...
|
|
virtual AZ::Vector3 | GetScale () |
Deprecated.
More...
|
|
virtual float | GetScaleX () |
Deprecated.
More...
|
|
virtual float | GetScaleY () |
Deprecated.
More...
|
|
virtual float | GetScaleZ () |
Deprecated.
More...
|
|
virtual void | SetLocalScale (const AZ::Vector3 &) |
Scales the entity in local space.
More...
|
|
virtual void | SetLocalScaleX (float) |
Scales the entity along the X axis in local space.
More...
|
|
virtual void | SetLocalScaleY (float) |
Scales the entity along the Y axis in local space.
More...
|
|
virtual void | SetLocalScaleZ (float) |
Scales the entity along the Z axis in local space.
More...
|
|
virtual AZ::Vector3 | GetLocalScale () |
Gets the scale of the entity along each axis in local space.
More...
|
|
virtual AZ::Vector3 | GetWorldScale () |
Gets the scale of the entity along each axis in world space.
More...
|
|
virtual EntityId | GetParentId () |
Returns the entity ID of the entity's parent.
More...
|
|
virtual TransformInterface * | GetParent () |
Returns the transform interface of the parent entity.
More...
|
|
virtual void | SetParent ( EntityId ) |
Sets the entity's parent entity and notifies all listeners.
More...
|
|
virtual void | SetParentRelative ( EntityId ) |
Sets the entity's parent entity, moves the transform relative to the parent entity, and notifies all listeners.
More...
|
|
virtual AZStd::vector< AZ::EntityId > | GetChildren () |
Returns the entity IDs of the entity's immediate children.
More...
|
|
virtual AZStd::vector< AZ::EntityId > | GetAllDescendants () |
Returns the entity IDs of all descendants of the entity.
More...
|
|
virtual AZStd::vector< AZ::EntityId > | GetEntityAndAllDescendants () |
Returns the entity ID of the entity and all its descendants.
More...
|
|
virtual bool | IsStaticTransform ()=0 |
Returns whether the transform is static.
More...
|
|
Public Member Functions inherited from AZ::ComponentBus | |
virtual | ~ComponentBus ()=default |
Destroys a component bus.
More...
|
|
Static Public Attributes |
|
static const EBusHandlerPolicy | HandlerPolicy |
Overrides the default
AZ::EBusTraits
handler policy to allow one listener only.
More...
|
|
Static Public Attributes inherited from AZ::ComponentBus | |
static const EBusAddressPolicy | AddressPolicy |
Overrides the default
AZ::EBusTraits
address policy so that the bus has multiple addresses at which to receive messages.
More...
|
|
Static Public Attributes inherited from AZ::EBusTraits | |
static const EBusHandlerPolicy | HandlerPolicy |
Defines how many handlers can connect to an address on the
EBus
and the order in which handlers at each address receive events.
More...
|
|
static const EBusAddressPolicy | AddressPolicy |
Defines how many addresses exist on the
EBus
.
More...
|
|
static const bool | EnableEventQueue |
Specifies whether the
EBus
supports an event queue.
More...
|
|
Additional Inherited Members |
|
Public Types inherited from AZ::ComponentBus | |
typedef EntityId | BusIdType |
Overrides the default
AZ::EBusTraits
ID type so that entity IDs are used to access the addresses of the bus.
More...
|
|
Public Types inherited from AZ::EBusTraits | |
using | AllocatorType = AZStd::allocator |
Allocator used by the
EBus
.
More...
|
|
using | BusIdType = NullBusId |
The type of ID that is used to address the
EBus
.
More...
|
|
using | BusIdOrderCompare = NullBusIdCompare |
Sorting function for
EBus
address IDs.
More...
|
|
using | BusHandlerOrderCompare = BusHandlerCompareDefault |
Sorting function for
EBus
event handlers.
More...
|
|
using | MutexType = NullMutex |
Locking primitive that is used when connecting handlers to the
EBus
or executing events.
More...
|
|
using | EventQueueMutexType = NullMutex |
Locking primitive that is used when adding and removing events from the queue.
More...
|
|
template<class Bus > | |
using | ConnectionPolicy = EBusConnectionPolicy < Bus > |
Enables custom logic to run when a handler connects or disconnects from the
EBus
.
More...
|
|
template<class Context > | |
using | StoragePolicy = EBusEnvironmentStoragePolicy < Context > |
Specifies where
EBus
data is stored.
More...
|
|
template<class Bus > | |
using | RouterPolicy = EBusRouterPolicy< Bus > |
Controls the flow of
EBus
events.
More...
|
|
Protected Member Functions inherited from AZ::EBusTraits | |
~EBusTraits ()=default | |
A destructor.
More...
|
|
Detailed Description
Interface for AZ::TransformBus , which is an EBus that receives requests to translate (position), rotate, and scale an entity in 3D space.
It also receives requests to get and set the parent of an entity and get the descendants of an entity.
An entity's local transform is the entity's position relative to its parent entity. An entity's world transform is the entity's position within the entire game space.
Constructor & Destructor Documentation
◆ ~TransformInterface()
|
inline virtual |
A destructor.
Member Function Documentation
◆ GetAllDescendants()
|
inline virtual |
Returns the entity IDs of all descendants of the entity.
The descendants are the entity's children, the children's children, and so on. The entity IDs are ordered breadth-first.
- Returns
- A vector that contains the entity IDs of the descendants.
◆ GetChildren()
|
inline virtual |
Returns the entity IDs of the entity's immediate children.
- Returns
- A vector that contains the entity IDs of the entity's immediate children.
◆ GetEntityAndAllDescendants()
|
inline virtual |
Returns the entity ID of the entity and all its descendants.
The descendants are the entity's children, the children's children, and so on. The entity IDs are ordered breadth-first and this entity's ID is the first in the list.
- Returns
- A vector that contains the entity ID of the entity followed by the entity IDs of its descendants.
◆ GetLocalAndWorld()
|
inline virtual |
Retrieves the entity's local and world transforms.
- Parameters
-
[out] localTM A reference to a transform that represents the entity's position relative to its parent entity. [out] worldTM A reference to a transform that represents the entity's position within the world.
◆ GetLocalRotation()
|
inline virtual |
Gets the entity's rotation in radians in local space.
- Returns
- A three-dimensional vector, containing Euler angles in radians, that specifies the entity's rotation around each axis in local space. The order of the values in the vector is Z axis, Y axis, and then X axis.
◆ GetLocalRotationQuaternion()
|
inline virtual |
Gets the quaternion representing the entity's rotation in local space.
- Returns
- The rotation quaternion in local space.
◆ GetLocalScale()
|
inline virtual |
Gets the scale of the entity along each axis in local space.
- Returns
- A three-dimensional vector that represents the scale of the entity in local space.
◆ GetLocalTM()
|
pure virtual |
Returns the entity's local transform, not including the parent transform.
- Returns
- A reference to a transform that represents the entity's position relative to its parent entity.
◆ GetLocalTranslation()
|
inline virtual |
Gets the entity's local space translation.
- Returns
- A three-dimensional translation vector.
◆ GetLocalX()
|
inline virtual |
Gets the entity's X coordinate in local space.
- Returns
- The entity's X coordinate in local space.
◆ GetLocalY()
|
inline virtual |
Gets the entity's Y coordinate in local space.
- Returns
- The entity's Y coordinate in local space.
◆ GetLocalZ()
|
inline virtual |
Gets the entity's Z coordinate in local space.
- Returns
- The entity's Z coordinate in local space.
◆ GetParent()
|
inline virtual |
Returns the transform interface of the parent entity.
- Returns
- A pointer to the transform interface of the parent. Returns a null pointer if no parent is set or the parent entity is not currently activated.
◆ GetParentId()
|
inline virtual |
Returns the entity ID of the entity's parent.
- Returns
- The entity ID of the parent. The entity ID is invalid if the entity does not have a parent with a valid entity ID.
◆ GetRotationEulerRadians()
|
inline virtual |
Deprecated.
- Deprecated:
- Use GetLocalRotation() instead.
◆ GetRotationQuaternion()
|
inline virtual |
Deprecated.
- Deprecated:
- Use GetLocalRotationQuaternion() instead.
◆ GetRotationX()
|
inline virtual |
Deprecated.
- Deprecated:
- Use GetLocalRotation() instead.
◆ GetRotationY()
|
inline virtual |
Deprecated.
- Deprecated:
- Use GetLocalRotation() instead.
◆ GetRotationZ()
|
inline virtual |
Deprecated.
- Deprecated:
- Use GetLocalRotation() instead.
◆ GetScale()
|
inline virtual |
Deprecated.
- Deprecated:
- Use GetLocalScale() instead.
◆ GetScaleX()
|
inline virtual |
Deprecated.
- Deprecated:
- Use GetLocalScale() instead.
◆ GetScaleY()
|
inline virtual |
Deprecated.
- Deprecated:
- Use GetLocalScale() instead.
◆ GetScaleZ()
|
inline virtual |
Deprecated.
- Deprecated:
- Use GetLocalScale() instead.
◆ GetWorldRotation()
|
inline virtual |
Gets the entity's rotation in radians in world space.
- Returns
- A three-dimensional vector, containing Euler angles in radians, that represents the entity's rotation around each axis in world space. The order of the values in the vector is Z axis, Y axis, and then X axis.
◆ GetWorldRotationQuaternion()
|
inline virtual |
Gets the entity's rotation in quaternion in world space.
- Returns
- A quaternion that represents the entity's rotation in world space.
◆ GetWorldScale()
|
inline virtual |
Gets the scale of the entity along each axis in world space.
- Note
- When the entity is rotated and its parent entity is scaled, the transform is skewed. In this case, the value that this function returns is inaccurate.
- Returns
- A three-dimensional vector that represents the scale of the entity in world space.
◆ GetWorldTM()
|
pure virtual |
Returns the entity's world transform, including the parent transform.
- Returns
- A reference to a transform that represents the entity's position within the world.
◆ GetWorldTranslation()
|
inline virtual |
Gets the entity's world space translation.
- Returns
- A three-dimensional translation vector.
◆ GetWorldX()
|
inline virtual |
Gets the entity's X coordinate in world space.
- Returns
- The entity's X coordinate in world space.
◆ GetWorldY()
|
inline virtual |
Gets the entity's Y coordinate in world space.
- Returns
- The entity's Y coordinate in world space.
◆ GetWorldZ()
|
inline virtual |
Gets the entity's Z coordinate in world space.
- Returns
- The entity's Z coordinate in world space.
◆ IsStaticTransform()
|
pure virtual |
Returns whether the transform is static.
A static transform is unmovable and does not respond to requests that would move it.
- Returns
- True if the transform is static, false if the transform is movable.
◆ MoveEntity()
|
inline virtual |
Moves the entity within world space.
- Parameters
-
offset A three-dimensional vector that contains the offset to apply to the entity.
◆ RotateAroundLocalX()
|
inline virtual |
Rotates the entity around the X axis in local space.
- Parameters
-
eulerRadianAngle The angle, in radians, to rotate the entity around the X axis in local space.
◆ RotateAroundLocalY()
|
inline virtual |
Rotates the entity around the Y axis in local space.
- Parameters
-
eulerRadianAngle The angle, in radians, to rotate the entity around the Y axis in local space.
◆ RotateAroundLocalZ()
|
inline virtual |
Rotates the entity around the Z axis in local space.
- Parameters
-
eulerRadianAngle The angle, in radians, to rotate the entity around the Z axis in local space.
◆ RotateByX()
|
inline virtual |
Deprecated.
- Deprecated:
- Use RotateAroundLocalX() instead.
◆ RotateByY()
|
inline virtual |
Deprecated.
- Deprecated:
- Use RotateAroundLocalY() instead.
◆ RotateByZ()
|
inline virtual |
Deprecated.
- Deprecated:
- Use RotateAroundLocalZ() instead.
◆ SetLocalRotation()
|
inline virtual |
Sets the entity's rotation in local space using a composition of rotations around the three axes.
- Parameters
-
eulerRadianAngles A three-dimensional vector, containing Euler angles in radians, that specifies a rotation around each axis. The order of the values in the vector is Z axis, Y axis, and then X axis.
◆ SetLocalRotationQuaternion()
|
inline virtual |
Sets the entity's rotation in local space using a quaternion.
- Parameters
-
quaternion A quaternion representing the rotation to set.
◆ SetLocalScale()
|
inline virtual |
Scales the entity in local space.
- Parameters
-
scale A three-dimensional vector that represents the multipliers with which to scale the entity in local space.
◆ SetLocalScaleX()
|
inline virtual |
Scales the entity along the X axis in local space.
- Parameters
-
scaleX The multiplier by which to scale the entity along the X axis in local space.
◆ SetLocalScaleY()
|
inline virtual |
Scales the entity along the Y axis in local space.
- Parameters
-
scaleY The multiplier by which to scale the entity along the Y axis in local space.
◆ SetLocalScaleZ()
|
inline virtual |
Scales the entity along the Z axis in local space.
- Parameters
-
scaleZ The multiplier by which to scale the entity along the Z axis in local space.
◆ SetLocalTM()
|
inline virtual |
Sets the entity's local transform and notifies all listeners.
- Parameters
-
tm A reference to a transform for positioning the entity relative to its parent entity.
◆ SetLocalTranslation()
|
inline virtual |
Sets the entity's local space translation, which represents how to move the entity to a new position relative to its parent.
- Parameters
-
newPosition A three-dimensional translation vector.
◆ SetLocalX()
|
inline virtual |
Sets the entity's X coordinate in local space.
- Parameters
-
x A new value for the entity's X coordinate in local space.
◆ SetLocalY()
|
inline virtual |
Sets the entity's Y coordinate in local space.
- Parameters
-
y A new value for the entity's Y coordinate in local space.
◆ SetLocalZ()
|
inline virtual |
Sets the entity's Z coordinate in local space.
- Parameters
-
z A new value for the entity's Z coordinate in local space.
◆ SetParent()
|
inline virtual |
Sets the entity's parent entity and notifies all listeners.
The entity's local transform is moved into the parent entity's space to preserve the entity's world transform.
- Parameters
-
id The ID of the entity to set as the parent.
◆ SetParentRelative()
|
inline virtual |
Sets the entity's parent entity, moves the transform relative to the parent entity, and notifies all listeners.
This function uses the world transform as a local transform and moves the transform relative to the parent entity.
- Parameters
-
id The ID of the entity to set as the parent.
◆ SetRotation()
|
inline virtual |
Deprecated.
- Deprecated:
- Use SetLocalRotation() instead.
◆ SetRotationQuaternion()
|
inline virtual |
Deprecated.
- Deprecated:
- Use SetLocalRotationQuaternion() instead.
◆ SetRotationX()
|
inline virtual |
Deprecated.
- Deprecated:
- Use SetLocalRotation() instead.
◆ SetRotationY()
|
inline virtual |
Deprecated.
- Deprecated:
- Use SetLocalRotation() instead.
◆ SetRotationZ()
|
inline virtual |
Deprecated.
- Deprecated:
- Use SetLocalRotation() instead.
◆ SetScale()
|
inline virtual |
Deprecated.
- Deprecated:
- Use SetLocalScale() instead.
◆ SetScaleX()
|
inline virtual |
Deprecated.
- Deprecated:
- Use SetLocalScaleX() instead.
◆ SetScaleY()
|
inline virtual |
Deprecated.
- Deprecated:
- Use SetLocalScaleY() instead.
◆ SetScaleZ()
|
inline virtual |
Deprecated.
- Deprecated:
- Use SetLocalScaleZ() instead.
◆ SetWorldTM()
|
inline virtual |
Sets the world transform and notifies all listeners.
- Parameters
-
tm A reference to a transform for positioning the entity within the world.
◆ SetWorldTranslation()
|
inline virtual |
Sets the entity's world space translation, which represents how to move the entity to a new position within the world.
- Parameters
-
newPosition A three-dimensional translation vector.
◆ SetWorldX()
|
inline virtual |
Sets the entity's X coordinate in world space.
- Parameters
-
x A new value for the entity's X coordinate in world space.
◆ SetWorldY()
|
inline virtual |
Sets the entity's Y coordinate in world space.
- Parameters
-
y A new value for the entity's Y coordinate in world space.
◆ SetWorldZ()
|
inline virtual |
Sets the entity's Z coordinate in world space.
- Parameters
-
z A new value for the entity's Z coordinate in world space.
Member Data Documentation
◆ HandlerPolicy
|
static |
Overrides the default AZ::EBusTraits handler policy to allow one listener only.
The documentation for this class was generated from the following file:
- C:/lumberyard-root/dev/Code/Framework/AzCore/AzCore/Component/ TransformBus.h