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

Struct used to return all created actors and constraints from AddToScene. More...

#include <mochi_prefab.h>

Public Member Functions

DynamicArray< Actor * > Filter (ActorType type) const
 Return all the newly created actors of a particular type, in order.
DynamicArray< Constraint * > Filter (ConstraintType type) const
 Return all the newly created constraints of a particular type, in order.

Public Attributes

DynamicArray< Actor * > actors
 All newly created actors.
DynamicArray< Constraint * > constraints
 All newly created constraints.

Detailed Description

Struct used to return all created actors and constraints from AddToScene.

Note
The returned pointers are non-owning. They remain valid as long as the Scene is alive and the actors/constraints have not been destroyed.

Definition at line 338 of file mochi_prefab.h.

Member Function Documentation

◆ Filter() [1/2]

DynamicArray< Actor * > superdex::prefab::AddToSceneResult::Filter ( ActorType type) const

Return all the newly created actors of a particular type, in order.

Parameters
[in]typeType of actor to return.
Returns
List of actors of the specified type.
Note
If there were nested prefabs, then actors will be listed in depth-first order.
For a single prefab (no nested prefabs) whose actors have no nested link or soft sub-actors, the result is 1-to-1 with the prefab's actors of that type (same size, same order). Nested link/soft sub-actors are not listed, and soft-skinned actors are reported under ActorType::Articulated.

◆ Filter() [2/2]

DynamicArray< Constraint * > superdex::prefab::AddToSceneResult::Filter ( ConstraintType type) const

Return all the newly created constraints of a particular type, in order.

Parameters
[in]typeType of constraint to return.
Returns
List of constraints of the specified type.
Note
If there were nested prefabs, then constraints will be listed in depth-first order.
For a single prefab (no nested prefabs), the result will be 1-to-1 with the constraint list in the prefab (same size, same order).

Member Data Documentation

◆ actors

DynamicArray<Actor*> superdex::prefab::AddToSceneResult::actors

All newly created actors.

Note
Order is not guaranteed except that actors from nested prefabs will be listed before actors from the top-level prefab.
Contains only top-level actors. Articulated actors' nested link actors and soft-skinned actors' nested link and soft sub-actors are created but not listed here. Reach them via Actor::GetNestedLinkActors and Actor::GetNestedSoftActors.
See also
Filter

Definition at line 339 of file mochi_prefab.h.

◆ constraints

DynamicArray<Constraint*> superdex::prefab::AddToSceneResult::constraints

All newly created constraints.

Note
Order is not guaranteed except that constraints from nested prefabs will be listed before constraints from the top-level prefab.
See also
Filter

Definition at line 340 of file mochi_prefab.h.


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