newton.SDF#
- class newton.SDF(volume=None, I=None, mass=1.0, com=None)[source]#
Bases:
object
Represents a signed distance field (SDF) for simulation.
An SDF is a volumetric representation of a shape, where each point in the volume stores the signed distance to the closest surface. This class encapsulates the SDF volume and its physical properties for use in simulation.
- __init__(volume=None, I=None, mass=1.0, com=None)#
Initialize an SDF object.
- Parameters:
volume (wp.Volume | None) – The Warp volume object representing the SDF.
I (Mat33, optional) – 3x3 inertia matrix. Defaults to identity.
mass (float, optional) – Total mass. Defaults to 1.0.
com (Vec3, optional) – Center of mass. Defaults to zero vector.
- finalize()#
Returns the ID of the underlying SDF volume.
- Returns:
The unique identifier of the SDF volume.
- Return type:
wp.uint64