Skip to content
11 changes: 11 additions & 0 deletions genesis/engine/solvers/rigid/array_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,17 @@ def __init__(self, solver, n_dofs: int, n_entities: int, n_geoms: int, _B: int,
# =========================================== Collider ===========================================


@ti.data_oriented
class ConstraintState:
"""
Class to store the mutable constraint data, all of which type is [ti.fields].
"""

def __init__(self, solver):
f_batch = solver._batch_shape
self.n_constraints = ti.field(dtype=gs.ti_int, shape=f_batch())


@ti.data_oriented
class ColliderState:
"""
Expand Down
Loading