![]() |
NDEVR
API Documentation
|
Stores a uniform grid of data in N dimensions into a Geometry object. More...
Public Member Functions | |
| GridMesh () | |
| Default constructor. | |
| GridMesh (const Geometry &model) | |
| Constructs a GridMesh wrapping the given Geometry object. | |
| Geometry | geometry () const |
| Returns the underlying Geometry object. | |
| const Vector< t_dims, uint04 > & | getIndexSize () const |
| Returns the size of the grid in each dimension. | |
| template<class t_type> | |
| t_type | getVertexProperty (uint04 property_index, Vector< t_dims, uint04 > index) const |
| Retrieves a custom vertex property by column index at the given N-dimensional grid index. | |
| template<class t_type> | |
| t_type | interpolateVertex (VertexProperty property, const Vector< t_dims, fltp08 > &index, InterpolationValues interpolation=InterpolationValues::e_linear) const |
| Interpolates a vertex property value at a fractional N-dimensional grid coordinate. | |
| bool | isValid () const |
| Checks whether this GridMesh has a valid underlying Geometry. | |
| void | setupVertexTable (Vector< t_dims, uint04 > index_size, Geometry::VertexMode position, Geometry::VertexMode normal=Geometry::VertexMode::e_no_vertex, Geometry::VertexMode color=Geometry::VertexMode::e_no_vertex, Geometry::VertexMode texture=Geometry::VertexMode::e_no_vertex, Geometry::VertexMode tangent=Geometry::VertexMode::e_no_vertex, Geometry::VertexMode bitangent=Geometry::VertexMode::e_no_vertex, Geometry::VertexMode bones=Geometry::VertexMode::e_no_vertex) |
| Initializes the vertex table for the grid with the specified dimensions and vertex modes. | |
| template<class t_type> | |
| void | setVertex (VertexProperty property, Vector< t_dims, uint04 > index, const t_type &vector) |
| Sets a vertex property value at the given N-dimensional grid index. | |
| template<class t_type> | |
| void | setVertexProperty (uint04 property_index, Vector< t_dims, uint04 > index, const t_type &value) |
| Sets a custom vertex property by column index at the given N-dimensional grid index. | |
| template<class t_type> | |
| t_type | vertex (VertexProperty property, Vector< t_dims, uint04 > index) const |
| Retrieves a vertex property value at the given N-dimensional grid index. | |
| Public Member Functions inherited from GridIndexing< t_dims > | |
| Vector< t_dims, uint04 > | convertFromIndex (const uint04 &location) const |
| Converts a flat 1D index back into an N-dimensional grid coordinate. | |
| uint04 | convertToIndex (const Vector< t_dims, uint04 > &location) const |
| Converts an N-dimensional grid coordinate into a flat 1D index using row-major ordering. | |
| void | setSize (Vector< t_dims, uint04 > index_size) |
| Sets the size of the grid in each dimension. | |
Protected Attributes | |
| Geometry | m_geo |
| The underlying Geometry object that stores the grid vertex data. | |
| Protected Attributes inherited from GridIndexing< t_dims > | |
| Vector< t_dims, uint04 > | m_size |
| The number of elements along each dimension of the grid. | |
Additional Inherited Members | |
| Static Public Member Functions inherited from GridIndexing< t_dims > | |
| static constexpr uint01 | getNumberOfCorners () |
| Returns the number of corners for a grid cell of the given dimensionality. | |
Stores a uniform grid of data in N dimensions into a Geometry object.
Definition at line 123 of file GriddedMesh.h.
Default constructor.
Creates an uninitialized GridMesh.
Definition at line 129 of file GriddedMesh.h.
Returns the underlying Geometry object.
Definition at line 351 of file GriddedMesh.h.
References m_geo.
|
inline |
Returns the size of the grid in each dimension.
Definition at line 195 of file GriddedMesh.h.
References GridIndexing< t_dims >::m_size.
Referenced by interpolateVertex().
|
inline |
Retrieves a custom vertex property by column index at the given N-dimensional grid index.
[NOTE: This function appears to be missing a return statement – it calls m_geo.get() but does not return the result.]
| [in] | property_index | The column index of the custom property to retrieve. |
| [in] | index | The N-dimensional grid coordinate of the vertex. |
Definition at line 246 of file GriddedMesh.h.
References GridIndexing< t_dims >::convertToIndex(), and m_geo.
|
inline |
Interpolates a vertex property value at a fractional N-dimensional grid coordinate.
Supports nearest-neighbor and linear (bilinear/trilinear) interpolation. Bicubic interpolation is partially implemented but currently returns Invalid.
| [in] | property | The vertex property to interpolate. |
| [in] | index | The fractional N-dimensional grid coordinate at which to interpolate. |
| [in] | interpolation | The interpolation method to use. Defaults to e_linear. |
Definition at line 263 of file GriddedMesh.h.
References abs(), difference(), getIndexSize(), IsInvalid(), and vertex().
|
inline |
Initializes the vertex table for the grid with the specified dimensions and vertex modes.
Allocates vertices for all grid cells, sets initial positions to grid coordinates, and marks all vertices as hidden and filtered by default.
| [in] | index_size | The number of elements along each grid dimension. |
| [in] | position | The vertex mode for position data. |
| [in] | normal | The vertex mode for normal data. Defaults to e_no_vertex. |
| [in] | color | The vertex mode for color data. Defaults to e_no_vertex. |
| [in] | texture | The vertex mode for texture coordinate data. Defaults to e_no_vertex. |
| [in] | tangent | The vertex mode for tangent data. Defaults to e_no_vertex. |
| [in] | bitangent | The vertex mode for bitangent data. Defaults to e_no_vertex. |
| [in] | bones | The vertex mode for bone/skeletal data. Defaults to e_no_vertex. |
Definition at line 163 of file GriddedMesh.h.
References cast(), GridIndexing< t_dims >::convertFromIndex(), e_is_filtered, e_is_hidden, Geometry::e_no_vertex, e_points, m_geo, Position, Vector< t_dims, t_type >::product(), VertexLookup::setFlag(), GridIndexing< t_dims >::setSize(), and VertexLookup::setVertex().
|
inline |
Sets a vertex property value at the given N-dimensional grid index.
| [in] | property | The vertex property to set (e.g., Position, Normal, Color). |
| [in] | index | The N-dimensional grid coordinate of the vertex. |
| [in] | vector | The value to assign to the vertex property. |
Definition at line 207 of file GriddedMesh.h.
References GridIndexing< t_dims >::convertToIndex(), and m_geo.
|
inline |
Sets a custom vertex property by column index at the given N-dimensional grid index.
| [in] | property_index | The column index of the custom property to set. |
| [in] | index | The N-dimensional grid coordinate of the vertex. |
| [in] | value | The value to assign to the property. |
Definition at line 231 of file GriddedMesh.h.
References GridIndexing< t_dims >::convertToIndex(), and m_geo.
|
inline |
Retrieves a vertex property value at the given N-dimensional grid index.
| [in] | property | The vertex property to retrieve. |
| [in] | index | The N-dimensional grid coordinate of the vertex. |
Definition at line 219 of file GriddedMesh.h.
References GridIndexing< t_dims >::convertToIndex(), and m_geo.
Referenced by interpolateVertex().