gameObjects.attachables.physicBase#

Bases: object

__init__(base: ~gameObjects.attachables.physicBase.PhysicBase | None = None, link_to_index: dict = <factory>, index_to_link: list[~gameObjects.attachables.physicLink.PhysicLink] = <factory>, masses: list[float] = <factory>, parents: list[int] = <factory>, positions: list[tuple[float, float, float]] = <factory>, orientations: list[tuple[float, float, float, float]] = <factory>, jointTypes: list[int] = <factory>, jointAxis: list[tuple[float, float, float]] = <factory>, collisionShapes: list[int] = <factory>, visualShapes: list[int] = <factory>, inertialFramePositions: list[tuple[float, float, float]] = <factory>, inertialFrameOrientations: list[tuple[float, float, float, float]] = <factory>) None#

Add a link and return its index.

base: PhysicBase | None#
cache_on_children() None#

Cache references on the child objects at runtime.

Cache adds references to: - Child link mapping index - Base Physic (self.base) - Base Physic physics_id (multibody index from pybullet)

This allows for easy and fast lookups

collisionShapes: list[int]#
destroy() None#

Unlink all physics child objects from this runtime physics instance.

This clears internal link/index mappings and removes the runtime physics references

find_physic_children(obj: GameObject, _list: list[PhysicLink])#

Build a flat list of valid nested pybullet child gameObjects

inertialFrameOrientations: list[tuple[float, float, float, float]]#
inertialFramePositions: list[tuple[float, float, float]]#
jointAxis: list[tuple[float, float, float]]#
jointTypes: list[int]#
masses: list[float]#
orientations: list[tuple[float, float, float, float]]#
parents: list[int]#
positions: list[tuple[float, float, float]]#
runtime_init()#
visualShapes: list[int]#
class gameObjects.attachables.physicBase.PhysicBase(context: EmberEngine, gameObject: GameObject, uuid: UUID = None, active: bool = False)#

Bases: PhysicLink

__init__(context: EmberEngine, gameObject: GameObject, uuid: UUID = None, active: bool = False) None#