Open 3D Engine AzFramework API Reference
24.09
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
|
#include <CollisionLayers.h>
Public Member Functions | |
AZ_TYPE_INFO (CollisionLayer, "{5AA459C8-2D92-46D2-9154-ED49EE4FE70E}") | |
CollisionLayer (AZ::u8 index=Default.GetIndex()) | |
CollisionLayer (const AZStd::string &layerName) | |
AZ::u8 | GetIndex () const |
void | SetIndex (AZ::u8 index) |
AZ::u64 | GetMask () const |
bool | operator== (const CollisionLayer &other) const |
bool | operator!= (const CollisionLayer &other) const |
Static Public Member Functions | |
static void | Reflect (AZ::ReflectContext *context) |
Public Attributes | |
AZ_CLASS_ALLOCATOR_DECL | |
Static Public Attributes | |
static const CollisionLayer | Default |
Default collision layer, 0. | |
This class represents which layer a collider exists on. A collider can only exist on a single layer, defined by the index. There is a maximum of 64 layers.
AzPhysics::CollisionLayer::CollisionLayer | ( | AZ::u8 | index = Default.GetIndex() | ) |
Construct a layer with the given index.
index | The index of the layer. Must be between 0 - CollisionLayers::MaxCollisionLayers. Default CollisionLayer::Default. |
AzPhysics::CollisionLayer::CollisionLayer | ( | const AZStd::string & | layerName | ) |
Construct a layer with the given name. This will lookup the layer name to retrieve the index. If not found will set the index to CollisionLayer::Default.
layername | The name of the layer. |
AZ::u8 AzPhysics::CollisionLayer::GetIndex | ( | ) | const |
Get the index of this layer. Index will be between 0 - CollisionLayers::MaxCollisionLayers
AZ::u64 AzPhysics::CollisionLayer::GetMask | ( | ) | const |
Get the Layer index represented as a bitmask.
void AzPhysics::CollisionLayer::SetIndex | ( | AZ::u8 | index | ) |
Set the index of this layer.
index | The index to set. Must be between 0 - CollisionLayers::MaxCollisionLayers |