![]() |
Gondwana Game Engine Development (master) - 2.6.1
Gondwana is a cross-platform 2.5D game and rendering engine written in C#/.NET 8. It provides fine-grained control over rendering, timing, and scene composition, with built-in support for parallax, z-ordering, pixel overhang, collision detection, and particle effects. Gondwana targets desktop and web platforms using SkiaSharp for graphics and pluggable audio backends for desktop and browser targets.
|
Manages registration and querying of colliders, separating them into static and dynamic collections for efficient collision detection. More...
Public Member Functions | |
| void | QueryInstances (in Aabb area, int layerMask, int collidesWithMask, List< ColliderInstance > results, ICollider? ignore=null) |
| Queries canonical colliders with translated bounds for every overlapping wrapped instance. Collision masks and the ignored collider apply to canonical identities. | |
| void | Register (ICollider collider) |
| Registers a collider with the registry. The collider is added to either the static or dynamic collection based on its ICollider.IsStatic property. | |
| void | Unregister (ICollider collider) |
| Unregisters a collider from the registry, removing it from either the static or dynamic collection based on its ICollider.IsStatic property. | |
| void | QueryAabb (in Aabb area, int layerMask, int collidesWithMask, List< ICollider > results, ICollider? ignore=null) |
| Broad-phase query: returns colliders overlapping the given AABB that also match the provided layer mask (bitwise AND with their LayerMask / CollidesWithMask). On periodic layers, returns unique canonical identities for overlapping images. Use QueryInstances when translated bounds are needed. | |
Properties | |
| IEnumerable< ICollider > | StaticColliders [get] |
| Gets the collection of static colliders registered in this registry. | |
| IEnumerable< ICollider > | DynamicColliders [get] |
| Gets the collection of dynamic colliders registered in this registry. | |
Manages registration and querying of colliders, separating them into static and dynamic collections for efficient collision detection.
Definition at line 7 of file ColliderRegistry.cs.
| void Gondwana.Physics.Collisions.ColliderRegistry.QueryAabb | ( | in Aabb | area, |
| int | layerMask, | ||
| int | collidesWithMask, | ||
| List< ICollider > | results, | ||
| ICollider? | ignore = null ) |
Broad-phase query: returns colliders overlapping the given AABB that also match the provided layer mask (bitwise AND with their LayerMask / CollidesWithMask). On periodic layers, returns unique canonical identities for overlapping images. Use QueryInstances when translated bounds are needed.
| area | The axis-aligned bounding box to query within. |
| layerMask | The layer mask to test against each collider's ICollider.CollidesWith mask. |
| collidesWithMask | The collision mask to test against each collider's ICollider.CollisionGroup. |
| results | The list to populate with matching colliders. This list is cleared before adding results. |
| ignore | An optional collider to exclude from the results. |
Definition at line 100 of file ColliderRegistry.cs.
| void Gondwana.Physics.Collisions.ColliderRegistry.QueryInstances | ( | in Aabb | area, |
| int | layerMask, | ||
| int | collidesWithMask, | ||
| List< ColliderInstance > | results, | ||
| ICollider? | ignore = null ) |
Queries canonical colliders with translated bounds for every overlapping wrapped instance. Collision masks and the ignored collider apply to canonical identities.
| area | The area. |
| layerMask | The layer mask. |
| collidesWithMask | The collides with mask. |
| results | The results. |
| ignore | The ignore. |
Definition at line 20 of file ColliderRegistry.cs.
| void Gondwana.Physics.Collisions.ColliderRegistry.Register | ( | ICollider | collider | ) |
Registers a collider with the registry. The collider is added to either the static or dynamic collection based on its ICollider.IsStatic property.
| collider | The collider to register. |
| ArgumentNullException | Thrown when collider is null. |
Definition at line 62 of file ColliderRegistry.cs.
| void Gondwana.Physics.Collisions.ColliderRegistry.Unregister | ( | ICollider | collider | ) |
Unregisters a collider from the registry, removing it from either the static or dynamic collection based on its ICollider.IsStatic property.
| collider | The collider to unregister. If null, no action is taken. |
Definition at line 78 of file ColliderRegistry.cs.
|
get |
Gets the collection of dynamic colliders registered in this registry.
Definition at line 54 of file ColliderRegistry.cs.
|
get |
Gets the collection of static colliders registered in this registry.
Definition at line 49 of file ColliderRegistry.cs.