stim::rigid_body_handle class

A handle to a rigid body.

Constructors, destructors, conversion operators

operator bool() const explicit constexpr noexcept
Returns true if this handle represents a rigid_body (i.e is not null).
operator object_handle() const noexcept
Casts this handle to a generic object_handle.
rigid_body_handle() defaulted constexpr noexcept
Default-constructs a null handle.
rigid_body_handle(const rigid_body_handle&) defaulted constexpr noexcept
Copy constructor.

Public functions

auto flags() const -> rigid_body_flags noexcept
Gets the flags associated with this rigid body, if any.
auto operator=(const rigid_body_handle&) -> rigid_body_handle& defaulted noexcept
Copy-assignment operator.
auto sample_sdf(const vec3& point_world) const -> result<signed_distance_field_sample> noexcept
Samples the signed distance field attached to this rigid body at an external world point.
auto sample_substep_sdf(const vec3& point_world) const -> result<signed_distance_field_sample> noexcept
Samples the signed distance field attached to this rigid body at an external world point, based on the last substep transform.
auto set_substep_transform(const mat4& object_to_world) -> result noexcept
Sets the object-to-world transform of this rigid body for substep operations.
auto set_transform(const mat4& object_to_world) -> result noexcept
Sets the object-to-world transform of this rigid body.

Function documentation

result<signed_distance_field_sample> stim::rigid_body_handle::sample_substep_sdf(const vec3& point_world) const noexcept

Samples the signed distance field attached to this rigid body at an external world point, based on the last substep transform.

result stim::rigid_body_handle::set_substep_transform(const mat4& object_to_world) noexcept

Sets the object-to-world transform of this rigid body for substep operations.

result stim::rigid_body_handle::set_transform(const mat4& object_to_world) noexcept

Sets the object-to-world transform of this rigid body.