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

Data for a pre-computed SDF grid. More...

#include <model_data.h>

Public Member Functions

 GridSdfData ()=default
 GridSdfData (GridSdfDataView const &src)
 Copy from GridSdfDataView.
bool operator!= (GridSdfData const &other) const =default
bool operator== (GridSdfData 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.
DynamicArray< realvalues
 Signed distance values [m].

Detailed Description

Data for a pre-computed SDF grid.

See also
GridSdfDataView

Definition at line 43 of file model_data.h.

Constructor & Destructor Documentation

◆ GridSdfData() [1/2]

superdex::GridSdfData::GridSdfData ( )
default

◆ GridSdfData() [2/2]

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

Copy from GridSdfDataView.

Parameters
[in]srcSource data.

Definition at line 31 of file model_data_inl.h.

Member Function Documentation

◆ operator!=()

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

◆ operator==()

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

Member Data Documentation

◆ bounds

Aabb superdex::GridSdfData::bounds

Spatial bounds of the SDF grid.

Values are distributed uniformly within this volume.

Definition at line 64 of file model_data.h.

◆ dims

Int3 superdex::GridSdfData::dims {}

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

Definition at line 54 of file model_data.h.

◆ negativeValueBounds

Aabb superdex::GridSdfData::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 72 of file model_data.h.

◆ rotation

std::optional<Quaternion> superdex::GridSdfData::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 88 of file model_data.h.

◆ scale

std::optional<Real3> superdex::GridSdfData::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 80 of file model_data.h.

◆ translation

std::optional<Real3> superdex::GridSdfData::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 96 of file model_data.h.

◆ values

DynamicArray<real> superdex::GridSdfData::values

Signed distance values [m].

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

Definition at line 61 of file model_data.h.


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