SuperDex Physics C++ API
Loading...
Searching...
No Matches
superdex::prefab::ActorContactEntry Struct Reference

Used by ContactFilter to enable or disable contact for a pair of actors. More...

#include <mochi_prefab.h>

Public Member Functions

bool operator== (ActorContactEntry const &) const =default

Public Attributes

DynamicArray< DynamicStringactors
 Identifies two actors by name or hierarchy path.
bool enable = true
 Enable (true) or disable (false) contact for the specified pair of actors.
bool includeNestedActors = true
 Whether expandable parent actor names should include nested actors.

Detailed Description

Used by ContactFilter to enable or disable contact for a pair of actors.

See also
Scene::EnableActorContactAsymmetric, Scene::EnableActorContactSymmetric

Definition at line 47 of file mochi_prefab.h.

Member Function Documentation

◆ operator==()

bool superdex::prefab::ActorContactEntry::operator== ( ActorContactEntry const & ) const
default

Member Data Documentation

◆ actors

DynamicArray<DynamicString> superdex::prefab::ActorContactEntry::actors

Identifies two actors by name or hierarchy path.

If the actor is in this prefab, then reference it by name, e.g., "myActor". If the actor is in a nested prefab, then reference it by hierarchy path, e.g., "myPrefab/myActor".

Note
A referenced actor name must identify exactly one existing actor. Actor names need not be unique, but referencing a name shared by more than one actor, or a name that matches no actor, is invalid and rejected at AddToScene.
Parent actor expansion is controlled by includeNestedActors.
Order matters when contact settings are applied asymmetrically. In that case, the first actor is the "colliding" actor and the second actor is the "collider". When contact is enabled, the first actor's contact sample points will be tested against the second actor's collider geometry.
If both actors are the same, then the setting affects self-contact within the actor.
Warning
Must contain exactly 2 elements.

Definition at line 49 of file mochi_prefab.h.

◆ enable

bool superdex::prefab::ActorContactEntry::enable = true

Enable (true) or disable (false) contact for the specified pair of actors.

Note
Contact is enabled for all actor pairs by default, except that automatic contact filtering disables adjacent links in articulated and soft-skinned actors. Therefore, you should usually only list additional pairs of actors for which contact should be explicitly disabled.
See also
ContactFilter

Definition at line 48 of file mochi_prefab.h.

◆ includeNestedActors

bool superdex::prefab::ActorContactEntry::includeNestedActors = true

Whether expandable parent actor names should include nested actors.

When true, a parent actor name resolves to the parent actor plus nested actors. The contact setting is applied to every ordered pair in the cross-product of the two resolved actor sets; no pairs outside that cross-product are affected. If the resolved sets overlap, pairs in the overlap, including self-pairs, are affected. When false, the contact setting applies only to the exact named actors.

Note
Actors without nested actors are affected as exact actors irrespective of this setting.
Default contact filtering disables contact between adjacent links in articulated and soft-skinned actors. Actor-contact entries override those defaults for pairs included in the resolved actor sets. If includeNestedActors is true and both actor names resolve to the same parent actor, the entry also covers pairs between that parent's nested actors, including adjacent links.

Definition at line 50 of file mochi_prefab.h.


The documentation for this struct was generated from the following files: