SuperDex Physics C++ API
Loading...
Searching...
No Matches
superdex::GridSdfDataView Struct Reference

A non-owning view of precomputed grid-based signed-distance-field data. More...

#include <model_data.h>

Public Member Functions

 GridSdfDataView ()=default
 GridSdfDataView (GridSdfData const &src)
 Implicit conversion from GridSdfData.
bool operator!= (GridSdfDataView const &other) const =default
bool operator== (GridSdfDataView const &other) const =default

Public Attributes

Aabb bounds
 Spatial bounds of the SDF grid.
Int3 dims {}
 Dimensions of the SDF grid in X, Y, and Z.
Aabb negativeValueBounds
 Spatial bounds of the portion of the SDF grid with negative values.
std::optional< Quaternionrotation
 Optional parent-from-grid rotation to apply at runtime.
std::optional< Real3scale
 Optional parent-from-grid per-axis scale to apply at runtime.
std::optional< Real3translation
 Optional parent-from-grid translation [m] to apply at runtime.
Span< real const > values
 Signed distance values [m].

Detailed Description

A non-owning view of precomputed grid-based signed-distance-field data.

See also
GridSdfData

Definition at line 119 of file model_data.h.

Constructor & Destructor Documentation

◆ GridSdfDataView() [1/2]

superdex::GridSdfDataView::GridSdfDataView ( )
default

◆ GridSdfDataView() [2/2]

superdex::GridSdfDataView::GridSdfDataView ( GridSdfData const & src)
inline

Implicit conversion from GridSdfData.

Parameters
[in]srcSource data.

Definition at line 22 of file model_data_inl.h.

Member Function Documentation

◆ operator!=()

bool superdex::GridSdfDataView::operator!= ( GridSdfDataView const & other) const
default

◆ operator==()

bool superdex::GridSdfDataView::operator== ( GridSdfDataView const & other) const
default

Member Data Documentation

◆ bounds

Aabb superdex::GridSdfDataView::bounds

Spatial bounds of the SDF grid.

Values are distributed uniformly within this volume.

Definition at line 140 of file model_data.h.

◆ dims

Int3 superdex::GridSdfDataView::dims {}

Dimensions of the SDF grid in X, Y, and Z.

Definition at line 130 of file model_data.h.

◆ negativeValueBounds

Aabb superdex::GridSdfDataView::negativeValueBounds

Spatial bounds of the portion of the SDF grid with negative values.

Note
This is generally the bounds of the mesh for which the SDF grid was computed, while the overall grid bounds may be larger due to padding for penalty fall-off distance.

Definition at line 148 of file model_data.h.

◆ rotation

std::optional<Quaternion> superdex::GridSdfDataView::rotation

Optional parent-from-grid rotation to apply at runtime.

Note
Applied order is scale, then rotation, then translation.
Typically set when a transform is baked into the containing model.

Definition at line 164 of file model_data.h.

◆ scale

std::optional<Real3> superdex::GridSdfDataView::scale

Optional parent-from-grid per-axis scale to apply at runtime.

Note
Applied order is scale, then rotation, then translation.
Typically set when a transform is baked into the containing model.

Definition at line 156 of file model_data.h.

◆ translation

std::optional<Real3> superdex::GridSdfDataView::translation

Optional parent-from-grid translation [m] to apply at runtime.

Note
Applied order is scale, then rotation, then translation.
Typically set when a transform is baked into the containing model.

Definition at line 172 of file model_data.h.

◆ values

Span<real const> superdex::GridSdfDataView::values

Signed distance values [m].

Note
Size must be (dims[0] * dims[1] * dims[2])

Definition at line 137 of file model_data.h.


The documentation for this struct was generated from the following files: