Open 3D Engine AzCore API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AZ::TransformNotification Class Reference

#include <TransformBus.h>

Inherits AZ::ComponentBus.

Public Member Functions

virtual ~TransformNotification ()
 Destroys the instance of the class.
 
virtual void OnTransformChanged (const Transform &, const Transform &)
 
virtual void OnStaticChanged (bool)
 
virtual void CanParentChange (bool &parentCanChange, EntityId oldParent, EntityId newParent)
 
virtual void OnParentChanged (EntityId oldParent, EntityId newParent)
 
virtual void OnParentTransformWillChange (AZ::Transform oldTransform, AZ::Transform newTransform)
 
virtual void OnChildAdded (EntityId child)
 
virtual void OnChildRemoved (EntityId child)
 
- Public Member Functions inherited from AZ::ComponentBus
virtual ~ComponentBus ()=default
 

Additional Inherited Members

- Public Types inherited from AZ::ComponentBus
typedef EntityId BusIdType
 
- Public Types inherited from AZ::EBusTraits
using AllocatorType = AZ::Internal::EBusEnvironmentAllocator
 
using BusIdType = NullBusId
 
using BusIdOrderCompare = NullBusIdCompare
 
using BusHandlerOrderCompare = BusHandlerCompareDefault
 
using MutexType = NullMutex
 
using EventQueueMutexType = NullMutex
 
template<class Bus >
using ConnectionPolicy = EBusConnectionPolicy< Bus >
 
template<class Context >
using StoragePolicy = EBusEnvironmentStoragePolicy< Context >
 
template<class Bus >
using RouterPolicy = EBusRouterPolicy< Bus >
 
using EventProcessingPolicy = EBusEventProcessingPolicy
 
template<typename DispatchMutex , bool IsLocklessDispatch>
using DispatchLockGuard = AZStd::conditional_t< IsLocklessDispatch, AZ::Internal::NullLockGuard< DispatchMutex >, AZStd::scoped_lock< DispatchMutex > >
 
template<typename ContextMutex >
using ConnectLockGuard = AZStd::conditional_t< AZStd::is_same_v< ContextMutex, AZ::NullMutex >, AZ::Internal::NullLockGuard< ContextMutex >, AZStd::unique_lock< ContextMutex > >
 
template<typename ContextMutex >
using BindLockGuard = AZStd::scoped_lock< ContextMutex >
 
template<typename ContextMutex >
using CallstackTrackerLockGuard = AZStd::conditional_t< AZStd::is_same_v< ContextMutex, AZ::NullMutex >, AZ::Internal::NullLockGuard< ContextMutex >, AZStd::unique_lock< ContextMutex > >
 
- Static Public Attributes inherited from AZ::ComponentBus
static const EBusAddressPolicy AddressPolicy = EBusAddressPolicy::ById
 
- Static Public Attributes inherited from AZ::EBusTraits
static constexpr EBusHandlerPolicy HandlerPolicy = EBusHandlerPolicy::Multiple
 
static constexpr EBusAddressPolicy AddressPolicy = EBusAddressPolicy::Single
 
static constexpr bool EnableEventQueue = false
 
static constexpr bool EventQueueingActiveByDefault = true
 
static constexpr bool EnableQueuedReferences = false
 
static constexpr bool LocklessDispatch = false
 
- Protected Member Functions inherited from AZ::EBusTraits
 ~EBusTraits ()=default
 

Detailed Description

Deprecated:
Use AZ::Event notifications on the main transform interface. Interface for AZ::TransformNotificationBus, which is the EBus that dispatches transform changes to listeners.

Member Function Documentation

◆ CanParentChange()

virtual void AZ::TransformNotification::CanParentChange ( bool &  parentCanChange,
EntityId  oldParent,
EntityId  newParent 
)
inlinevirtual

Called right before a parent change, to allow listeners to prevent the entity's parent from changing.

Parameters
parentCanChangeA reference used to track if the parent can change. A result parameter is used instead of a return value because this is a multi-handler.
oldParentThe entityId of the old parent. The entityId is invalid if there was no old parent.
newParentThe entityId of the new parent. The entityId is invalid if there is no new parent.

◆ OnChildAdded()

virtual void AZ::TransformNotification::OnChildAdded ( EntityId  child)
inlinevirtual

Signals that a child was added to the entity.

Parameters
childThe entityId of the added child.

◆ OnChildRemoved()

virtual void AZ::TransformNotification::OnChildRemoved ( EntityId  child)
inlinevirtual

Signals that a child was removed from the entity.

Parameters
childThe entityId of the removed child.

◆ OnParentChanged()

virtual void AZ::TransformNotification::OnParentChanged ( EntityId  oldParent,
EntityId  newParent 
)
inlinevirtual

Signals that the parent of the entity changed. To find if an entityId is valid, use AZ::EntityId::IsValid().

Parameters
oldParentThe entityId of the old parent. The entityId is invalid if there was no old parent.
newParentThe entityId of the new parent. The entityId is invalid if there is no new parent.

◆ OnParentTransformWillChange()

virtual void AZ::TransformNotification::OnParentTransformWillChange ( AZ::Transform  oldTransform,
AZ::Transform  newTransform 
)
inlinevirtual

Signals that the transform of the parent of the entity is about to change. Some components will need adjusting before this happens. To find if an entityId is valid, use AZ::EntityId::IsValid().

Parameters
oldTransformThe transform of the old parent.
newTransformThe transform of the new parent.

◆ OnStaticChanged()

virtual void AZ::TransformNotification::OnStaticChanged ( bool  )
inlinevirtual

Signals that the static flag on the transform has changed. This should only be needed during editing.

Parameters
isStaticA boolean that indicates whether the transform is static or not.

◆ OnTransformChanged()

virtual void AZ::TransformNotification::OnTransformChanged ( const Transform ,
const Transform  
)
inlinevirtual

Signals that the local or world transform of the entity changed.

Parameters
localA reference to the new local transform of the entity.
worldA reference to the new world transform of the entity.

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