newton.SDF#

class newton.SDF(volume=None, inertia=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, inertia=None, mass=1.0, com=None)#

Initialize an SDF object.

Parameters:
  • volume (Volume | None) – The Warp volume object representing the SDF.

  • inertia (list[float] | mat33f | None) – 3x3 inertia matrix. Defaults to identity.

  • mass (float) – Total mass. Defaults to 1.0.

  • com (list[float] | tuple[float, float, float] | vec3f | None) – 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:

uint64