Manages collision group definitions and provides bitwise mask values for collision filtering. Groups are represented as bit flags to allow efficient collision detection using bitwise operations.
More...
|
| | CollisionGroupRegistry () |
| | Initializes a new instance of the CollisionGroupRegistry class with predefined collision groups: WorldStatic, Actors, Projectiles, and Triggers.
|
| int | Define (string name) |
| | Defines a new collision group with the specified name, or returns the existing group value if already defined. Each group is assigned a unique bit flag value.
|
| int | Get (string name) |
| | Gets the bit flag value for a previously defined collision group.
|
| IReadOnlyCollection< string > | GetGroupNames () |
| | Gets a read-only collection of all defined collision group names.
|
|
| int | WorldStatic [get] |
| | Gets the bit flag value for the WorldStatic collision group.
|
| int | Actors [get] |
| | Gets the bit flag value for the Actors collision group.
|
| int | Projectiles [get] |
| | Gets the bit flag value for the Projectiles collision group.
|
| int | Triggers [get] |
| | Gets the bit flag value for the Triggers collision group.
|
Manages collision group definitions and provides bitwise mask values for collision filtering. Groups are represented as bit flags to allow efficient collision detection using bitwise operations.
◆ CollisionGroupRegistry()
| Gondwana.Collisions.CollisionGroupRegistry.CollisionGroupRegistry |
( |
| ) |
|
Initializes a new instance of the CollisionGroupRegistry class with predefined collision groups: WorldStatic, Actors, Projectiles, and Triggers.
◆ Define()
| int Gondwana.Collisions.CollisionGroupRegistry.Define |
( |
string | name | ) |
|
Defines a new collision group with the specified name, or returns the existing group value if already defined. Each group is assigned a unique bit flag value.
- Parameters
-
| name | The name of the collision group to define. Must not be empty or whitespace. |
- Returns
- The bit flag value representing the collision group.
- Exceptions
-
| ArgumentException | Thrown when name is null, empty, or whitespace. |
| InvalidOperationException | Thrown when the maximum number of 31 collision groups has been exceeded. |
◆ Get()
| int Gondwana.Collisions.CollisionGroupRegistry.Get |
( |
string | name | ) |
|
Gets the bit flag value for a previously defined collision group.
- Parameters
-
| name | The name of the collision group to retrieve. |
- Returns
- The bit flag value representing the collision group.
- Exceptions
-
| KeyNotFoundException | Thrown when the collision group with the specified name has not been defined. |
◆ GetGroupNames()
| IReadOnlyCollection< string > Gondwana.Collisions.CollisionGroupRegistry.GetGroupNames |
( |
| ) |
|
Gets a read-only collection of all defined collision group names.
- Returns
- A collection containing the names of all registered collision groups.
◆ Actors
| int Gondwana.Collisions.CollisionGroupRegistry.Actors |
|
get |
Gets the bit flag value for the Actors collision group.
◆ Projectiles
| int Gondwana.Collisions.CollisionGroupRegistry.Projectiles |
|
get |
Gets the bit flag value for the Projectiles collision group.
◆ Triggers
| int Gondwana.Collisions.CollisionGroupRegistry.Triggers |
|
get |
Gets the bit flag value for the Triggers collision group.
◆ WorldStatic
| int Gondwana.Collisions.CollisionGroupRegistry.WorldStatic |
|
get |
Gets the bit flag value for the WorldStatic collision group.