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.
Loading...
Searching...
No Matches
Gondwana.Physics.Collisions.CollisionProfileRegistry Class Referencesealed

Stores named collision-filtering profiles for a scene. Profiles resolve their group names through the scene's CollisionGroupRegistry. More...

Public Member Functions

 CollisionProfileRegistry ()
 Initializes a registry with Gondwana's standard collision profiles.
CollisionProfile Define (string name, string collisionGroup, IEnumerable< string >? collidesWith=null, bool collidesWithAll=false)
 Defines or replaces a named profile.
CollisionProfile Get (string name)
 Gets a previously defined profile.
bool TryGet (string name, out CollisionProfile? profile)
 Attempts to get a previously defined profile.
IReadOnlyCollection< string > GetProfileNames ()
 Gets the names of all defined profiles.

Detailed Description

Stores named collision-filtering profiles for a scene. Profiles resolve their group names through the scene's CollisionGroupRegistry.

Definition at line 9 of file CollisionProfileRegistry.cs.

Constructor & Destructor Documentation

◆ CollisionProfileRegistry()

Gondwana.Physics.Collisions.CollisionProfileRegistry.CollisionProfileRegistry ( )

Initializes a registry with Gondwana's standard collision profiles.

Definition at line 17 of file CollisionProfileRegistry.cs.

Member Function Documentation

◆ Define()

CollisionProfile Gondwana.Physics.Collisions.CollisionProfileRegistry.Define ( string name,
string collisionGroup,
IEnumerable< string >? collidesWith = null,
bool collidesWithAll = false )

Defines or replaces a named profile.

Parameters
nameThe case-insensitive collision profile name.
collisionGroupThe name of the collision group assigned to the profile.
collidesWithThe names of the groups that this profile can collide with.
collidesWithAllWhether this profile collides with every collision group.
Returns
The profile registered under the supplied name.

Definition at line 44 of file CollisionProfileRegistry.cs.

◆ Get()

CollisionProfile Gondwana.Physics.Collisions.CollisionProfileRegistry.Get ( string name)

Gets a previously defined profile.

Parameters
nameThe case-insensitive collision profile name.
Returns
The collision profile registered under the supplied name.

Definition at line 65 of file CollisionProfileRegistry.cs.

◆ GetProfileNames()

IReadOnlyCollection< string > Gondwana.Physics.Collisions.CollisionProfileRegistry.GetProfileNames ( )

Gets the names of all defined profiles.

Returns
The names of the currently defined collision profiles.

◆ TryGet()

bool Gondwana.Physics.Collisions.CollisionProfileRegistry.TryGet ( string name,
out CollisionProfile? profile )

Attempts to get a previously defined profile.

Parameters
nameThe case-insensitive collision profile name.
profileWhen this method returns, contains the profile.
Returns
true if the profile was found; otherwise, false.

Definition at line 82 of file CollisionProfileRegistry.cs.