ToolEntity#

A kinematically-scripted collider created from a gs.materials.Tool material. Its motion is prescribed rather than dynamically simulated, and it couples one-way with soft and particle-based media to push, stir, or deform them.

class genesis.engine.entities.tool_entity.tool_entity.ToolEntity(scene, idx, solver, material, morph, surface, name: str | None = None)[source]#

Bases: Entity

init_tgt_vars()[source]#
init_ckpt()[source]#
reset_grad()[source]#
save_ckpt_kernel(pos: NdarrayType(dtype=None, ndim=None, layout=Layout.AOS, needs_grad=None), quat: NdarrayType(dtype=None, ndim=None, layout=Layout.AOS, needs_grad=None), vel: NdarrayType(dtype=None, ndim=None, layout=Layout.AOS, needs_grad=None), ang: NdarrayType(dtype=None, ndim=None, layout=Layout.AOS, needs_grad=None))[source]#
load_ckpt_kernel(pos: NdarrayType(dtype=None, ndim=None, layout=Layout.AOS, needs_grad=None), quat: NdarrayType(dtype=None, ndim=None, layout=Layout.AOS, needs_grad=None), vel: NdarrayType(dtype=None, ndim=None, layout=Layout.AOS, needs_grad=None), ang: NdarrayType(dtype=None, ndim=None, layout=Layout.AOS, needs_grad=None))[source]#
save_ckpt(ckpt_name)[source]#
load_ckpt(ckpt_name)[source]#
substep_pre_coupling(f)[source]#
substep_pre_coupling_grad(f)[source]#
substep_post_coupling(f)[source]#
substep_post_coupling_grad(f)[source]#
collide(f, pos_world, vel_mat, i_b)[source]#
pbd_collide(f, pos_world, thickness, dt)[source]#
update_latest_pos(f: <quadrants._lib.core.quadrants_python.DataTypeCxx object at 0x7d180d42b7f0>)[source]#
advect(f: <quadrants._lib.core.quadrants_python.DataTypeCxx object at 0x7d180d42b7f0>)[source]#
copy_frame(source: <quadrants._lib.core.quadrants_python.DataTypeCxx object at 0x7d180d42b7f0>, target: <quadrants._lib.core.quadrants_python.DataTypeCxx object at 0x7d180d42b7f0>)[source]#
copy_grad(source: <quadrants._lib.core.quadrants_python.DataTypeCxx object at 0x7d180d42b7f0>, target: <quadrants._lib.core.quadrants_python.DataTypeCxx object at 0x7d180d42b7f0>)[source]#
reset_grad_till_frame(f: <quadrants._lib.core.quadrants_python.DataTypeCxx object at 0x7d180d42b7f0>)[source]#
get_frame(f: <quadrants._lib.core.quadrants_python.DataTypeCxx object at 0x7d180d42b7f0>, pos: NdarrayType(dtype=None, ndim=None, layout=Layout.AOS, needs_grad=None), quat: NdarrayType(dtype=None, ndim=None, layout=Layout.AOS, needs_grad=None), vel: NdarrayType(dtype=None, ndim=None, layout=Layout.AOS, needs_grad=None), ang: NdarrayType(dtype=None, ndim=None, layout=Layout.AOS, needs_grad=None))[source]#
set_frame(f: <quadrants._lib.core.quadrants_python.DataTypeCxx object at 0x7d180d42b7f0>, pos: NdarrayType(dtype=None, ndim=None, layout=Layout.AOS, needs_grad=None), quat: NdarrayType(dtype=None, ndim=None, layout=Layout.AOS, needs_grad=None), vel: NdarrayType(dtype=None, ndim=None, layout=Layout.AOS, needs_grad=None), ang: NdarrayType(dtype=None, ndim=None, layout=Layout.AOS, needs_grad=None))[source]#
set_frame_add_grad_pos(f: <quadrants._lib.core.quadrants_python.DataTypeCxx object at 0x7d180d42b7f0>, pos_grad: NdarrayType(dtype=None, ndim=None, layout=Layout.AOS, needs_grad=None))[source]#
set_frame_add_grad_quat(f: <quadrants._lib.core.quadrants_python.DataTypeCxx object at 0x7d180d42b7f0>, quat_grad: NdarrayType(dtype=None, ndim=None, layout=Layout.AOS, needs_grad=None))[source]#
set_frame_add_grad_vel(f: <quadrants._lib.core.quadrants_python.DataTypeCxx object at 0x7d180d42b7f0>, vel_grad: NdarrayType(dtype=None, ndim=None, layout=Layout.AOS, needs_grad=None))[source]#
set_frame_add_grad_ang(f: <quadrants._lib.core.quadrants_python.DataTypeCxx object at 0x7d180d42b7f0>, ang_grad: NdarrayType(dtype=None, ndim=None, layout=Layout.AOS, needs_grad=None))[source]#
get_state(f=None)[source]#
set_state(f, state)[source]#
build()[source]#
set_init_state(pos: NdarrayType(dtype=None, ndim=None, layout=Layout.AOS, needs_grad=None), quat: NdarrayType(dtype=None, ndim=None, layout=Layout.AOS, needs_grad=None))[source]#
set_vel(s: <quadrants._lib.core.quadrants_python.DataTypeCxx object at 0x7d180d42b7f0>, vel: NdarrayType(dtype=None, ndim=None, layout=Layout.AOS, needs_grad=None))[source]#
set_vel_grad(s: <quadrants._lib.core.quadrants_python.DataTypeCxx object at 0x7d180d42b7f0>, vel_grad: NdarrayType(dtype=None, ndim=None, layout=Layout.AOS, needs_grad=None))[source]#
set_ang(s: <quadrants._lib.core.quadrants_python.DataTypeCxx object at 0x7d180d42b7f0>, ang: NdarrayType(dtype=None, ndim=None, layout=Layout.AOS, needs_grad=None))[source]#
set_ang_grad(s: <quadrants._lib.core.quadrants_python.DataTypeCxx object at 0x7d180d42b7f0>, ang_grad: NdarrayType(dtype=None, ndim=None, layout=Layout.AOS, needs_grad=None))[source]#
set_pos(s: <quadrants._lib.core.quadrants_python.DataTypeCxx object at 0x7d180d42b7f0>, pos: NdarrayType(dtype=None, ndim=None, layout=Layout.AOS, needs_grad=None))[source]#
set_pos_grad(s: <quadrants._lib.core.quadrants_python.DataTypeCxx object at 0x7d180d42b7f0>, pos_grad: NdarrayType(dtype=None, ndim=None, layout=Layout.AOS, needs_grad=None))[source]#
set_quat(s: <quadrants._lib.core.quadrants_python.DataTypeCxx object at 0x7d180d42b7f0>, quat: NdarrayType(dtype=None, ndim=None, layout=Layout.AOS, needs_grad=None))[source]#
set_quat_grad(s: <quadrants._lib.core.quadrants_python.DataTypeCxx object at 0x7d180d42b7f0>, quat_grad: NdarrayType(dtype=None, ndim=None, layout=Layout.AOS, needs_grad=None))[source]#
set_velocity(vel=None, ang=None)[source]#
set_position(pos)[source]#
set_quaternion(quat)[source]#
process_input(in_backward=False)[source]#
process_input_grad()[source]#
collect_output_grads()[source]#

Collect gradients from external queried states.

add_grad_from_state(state)[source]#
property uid#
property idx#
property scene#
property solver#
property material#
property morph#
property surface#
property init_pos#
property init_quat#