|
Open 3D Engine AzFramework API Reference
2305.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
|
#include <CollisionGroups.h>
Public Member Functions | |
| AZ_TYPE_INFO (CollisionGroup,"{E6DA080B-7ED1-4135-A78C-A6A5E495A43E}") | |
| CollisionGroup (AZ::u64 mask=All.GetMask()) | |
| CollisionGroup (const AZStd::string &groupName) | |
| void | SetLayer (CollisionLayer layer, bool set) |
| bool | IsSet (CollisionLayer layer) const |
| AZ::u64 | GetMask () const |
| Get the groups bitmask. | |
| bool | operator== (const CollisionGroup &collisionGroup) const |
| bool | operator!= (const CollisionGroup &collisionGroup) const |
Static Public Member Functions | |
| static void | Reflect (AZ::ReflectContext *context) |
Public Attributes | |
| AZ_CLASS_ALLOCATOR_DECL | |
Static Public Attributes | |
| static const CollisionGroup | None |
| Collide with nothing. | |
| static const CollisionGroup | All |
| Collide with everything. | |
This class represents the layers a collider should collide with. For two colliders to collide, each layer must be present in the other colliders group.
| AzPhysics::CollisionGroup::CollisionGroup | ( | AZ::u64 | mask = All.GetMask() | ) |
Construct a Group with the given bitmask. The each bit in the bitmask corresponds to a CollisionLayer.
| mask | The bitmask to assign to the group. |
| AzPhysics::CollisionGroup::CollisionGroup | ( | const AZStd::string & | groupName | ) |
Construct a Group with the given name. This will lookup the group name to retrieve the group mask. If not found, CollisionGroup::All is set.
| groupName | The name of the group to look up the group mask. |
| bool AzPhysics::CollisionGroup::IsSet | ( | CollisionLayer | layer | ) | const |
Check is the given CollisionLayer is ON in this group.
| layer | The layer to check. |
| void AzPhysics::CollisionGroup::SetLayer | ( | CollisionLayer | layer, |
| bool | set | ||
| ) |
Enable/Disable a CollisionLayer on this group.
| layer | The layer to modify. |
| set | If true, toggle the layer ON for this group, otherwise toggle OFF. |