Gondwana Game Engine
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, mobile, and web platforms using SkiaSharp for graphics and NAudio for sound.
Loading...
Searching...
No Matches
Gondwana.Collisions.ColliderRegistry Class Referencesealed

Manages registration and querying of colliders, separating them into static and dynamic collections for efficient collision detection. More...

Public Member Functions

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).

Properties

IEnumerable< IColliderStaticColliders [get]
 Gets the collection of static colliders registered in this registry.
IEnumerable< IColliderDynamicColliders [get]
 Gets the collection of dynamic colliders registered in this registry.

Detailed Description

Manages registration and querying of colliders, separating them into static and dynamic collections for efficient collision detection.

Member Function Documentation

◆ QueryAabb()

void Gondwana.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).

Parameters
areaThe axis-aligned bounding box to query within.
layerMaskThe layer mask to test against each collider's ICollider.CollidesWith mask.
collidesWithMaskThe collision mask to test against each collider's ICollider.CollisionGroup.
resultsThe list to populate with matching colliders. This list is cleared before adding results.
ignoreAn optional collider to exclude from the results.

◆ Register()

void Gondwana.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.

Parameters
colliderThe collider to register.
Exceptions
ArgumentNullExceptionThrown when collider is null.

◆ Unregister()

void Gondwana.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.

Parameters
colliderThe collider to unregister. If null, no action is taken.

Property Documentation

◆ DynamicColliders

IEnumerable<ICollider> Gondwana.Collisions.ColliderRegistry.DynamicColliders
get

Gets the collection of dynamic colliders registered in this registry.

◆ StaticColliders

IEnumerable<ICollider> Gondwana.Collisions.ColliderRegistry.StaticColliders
get

Gets the collection of static colliders registered in this registry.