Source code for sapien.wrapper.engine
from ..pysapien.physx import PhysxSystem, PhysxGpuSystem, PhysxCpuSystem, PhysxMaterial
from .. import pysapien as sapien
from ..pysapien.render import RenderSystem
from warnings import warn
from .scene import Scene
from ..pysapien.physx import PhysxSceneConfig as SceneConfig
[docs]
class Engine:
def __init__(self, **args):
warn(
"Engine is deprecated. use sapien.Scene() directly.",
DeprecationWarning,
stacklevel=2,
)
[docs]
def set_renderer(self, renderer):
self.renderer = renderer
[docs]
def create_physical_material(self, static_friction, dynamic_friction, restitution):
return PhysxMaterial(static_friction, dynamic_friction, restitution)
[docs]
def create_scene(self, config=SceneConfig()):
sapien.physx.set_scene_config(config)
return Scene()