Felt
3.1
Deformable surface library.
|
Namespaces | |
Impl | |
Classes | |
class | Polys |
Polygonisation for a spatially partitioned level set surface. More... | |
class | Surface |
Arbitrarily-dimensional sparse-field spatially partitioned level set surface. More... | |
Typedefs | |
using | AccessImpl = Impl::Mixin::Grid::Access::ByValue< This > |
using | ActivateImpl = Impl::Mixin::Grid::Activate< This > |
template<typename T > | |
using | DataArray = std::vector< T > |
Array of grid data. More... | |
using | DataImpl = Impl::Mixin::Grid::Data< This > |
using | Dim = int |
Grid dimension type. More... | |
using | Distance = float |
Isogrid or other distance value. More... | |
using | LayerId = int |
Layer ID (in -L, ..., +L) More... | |
using | Leaf = typename Traits::Leaf |
using | ListIdx = std::size_t |
Index of an item in a tracking list. More... | |
using | Lookup = typename Traits::Lookup |
using | LookupImpl = Impl::Mixin::Lookup::MultiList::SingleIdx< This > |
using | LookupInterfaceImpl = Impl::Mixin::Tracked::LookupInterface< This > |
using | NodeIdx = int |
Grid node position vector element. More... | |
using | PosIdx = std::size_t |
Index of a position in a grid's data array. More... | |
using | PosIdxList = std::vector< PosIdx > |
Array of position indices. More... | |
using | SizeImpl = Impl::Mixin::Grid::Size< This > |
using | TrackedImpl = Impl::Mixin::Tracked::SingleList::ByValue< This > |
template<Dim D, TupleIdx N> | |
using | Traits = Impl::Traits< This > |
template<typename T , TupleIdx N> | |
using | Tuple = VecDT< T, N > |
Tuple of items. More... | |
using | TupleIdx = int |
Index of an item in a tuple. More... | |
using | Vec2f = VecDf< 2 > |
Shorthand for 2D float vector. More... | |
using | Vec2i = VecDi< 2 > |
Shorthand for 2D integer vector. More... | |
using | Vec2u = VecDu< 2 > |
Shorthand for 2D unsigned integer vector. More... | |
using | Vec3f = VecDf< 3 > |
Shorthand for 3D float vector. More... | |
using | Vec3i = VecDi< 3 > |
Shorthand for 3D integer vector. More... | |
using | Vec3u = VecDu< 3 > |
Shorthand for 3D unsigned integer vector. More... | |
template<Dim D> | |
using | VecDf = VecDT< Distance, D > |
Shorthand for D-dimensional Distance vector. More... | |
template<Dim D> | |
using | VecDi = VecDT< NodeIdx, D > |
Shorthand for D-dimensional NodeIdx vector. More... | |
template<typename T , Dim D> | |
using | VecDT = Eigen::Matrix< T, D, 1 > |
Shorthand for D-dimensional vector with elements of T type. More... | |
template<Dim D> | |
using | VecDu = VecDT< unsigned, D > |
Shorthand for D-dimensional unsigned integer vector. More... | |
Functions | |
template<class Vec > | |
std::string | format (const Vec &vec_) |
String format a vector (useful for logging). More... | |
template<Dim D> | |
PosIdx | index (const VecDi< D > &pos_, const VecDi< D > &size_, const VecDi< D > &offset_) |
Get index in data array of position vector. More... | |
template<Dim D> | |
VecDi< D > | index (PosIdx idx_, const VecDi< D > &size_, const VecDi< D > &offset_=VecDi< D >::Zero()) |
Get position of index. More... | |
template<typename TPos , typename TBounds > | |
bool | inside (const TPos &pos_, const TBounds &pos_min_, const TBounds &pos_max_) |
Test if a position is inside given bounds. More... | |
MultiListSingleIdx (const VecDi &size, const VecDi &offset) | |
template<typename T > | |
auto | sgn (T val_) |
Get the sign of a value (+/-1). More... | |
SingleListSingleIdxByValue (const VecDi &size_, const VecDi &offset_, const Leaf background_) | |
Variables | |
static constexpr ListIdx | null_idx = std::numeric_limits<ListIdx>::max() |
Value to store in lookup grid when a node doesn't reference any list. More... | |
typedef Impl::Mixin::Grid::Access::ByValue< This > Felt::AccessImpl |
typedef Impl::Mixin::Grid::Activate< This > Felt::ActivateImpl |
using Felt::DataArray = typedef std::vector<T> |
Array of grid data.
typedef Impl::Mixin::Grid::Data< This > Felt::DataImpl |
using Felt::Dim = typedef int |
Grid dimension type.
using Felt::Distance = typedef float |
Isogrid or other distance value.
using Felt::LayerId = typedef int |
Layer ID (in -L, ..., +L)
typedef typename Traits::Leaf Felt::Leaf |
using Felt::ListIdx = typedef std::size_t |
Index of an item in a tracking list.
using Felt::Lookup = typedef typename Traits::Lookup |
using Felt::LookupImpl = typedef Impl::Mixin::Lookup::MultiList::SingleIdx<This> |
using Felt::LookupInterfaceImpl = typedef Impl::Mixin::Tracked::LookupInterface<This> |
using Felt::NodeIdx = typedef int |
Grid node position vector element.
using Felt::PosIdx = typedef std::size_t |
Index of a position in a grid's data array.
using Felt::PosIdxList = typedef std::vector<PosIdx> |
Array of position indices.
typedef Impl::Mixin::Grid::Size< This > Felt::SizeImpl |
using Felt::TrackedImpl = typedef Impl::Mixin::Tracked::SingleList::ByValue<This> |
using Felt::Traits = typedef Impl::Traits<This> |
using Felt::Tuple = typedef VecDT<T, N> |
Tuple of items.
using Felt::TupleIdx = typedef int |
Index of an item in a tuple.
using Felt::Vec2f = typedef VecDf<2> |
Shorthand for 2D float vector.
using Felt::Vec2i = typedef VecDi<2> |
Shorthand for 2D integer vector.
using Felt::Vec2u = typedef VecDu<2> |
Shorthand for 2D unsigned integer vector.
using Felt::Vec3f = typedef VecDf<3> |
Shorthand for 3D float vector.
using Felt::Vec3i = typedef VecDi<3> |
Shorthand for 3D integer vector.
using Felt::Vec3u = typedef VecDu<3> |
Shorthand for 3D unsigned integer vector.
using Felt::VecDf = typedef VecDT<Distance, D> |
Shorthand for D-dimensional Distance vector.
typedef Felt::VecDi< Traits::t_dims > Felt::VecDi |
Shorthand for D-dimensional NodeIdx vector.
using Felt::VecDT = typedef Eigen::Matrix<T, D, 1> |
Shorthand for D-dimensional vector with elements of T type.
using Felt::VecDu = typedef VecDT<unsigned, D> |
Shorthand for D-dimensional unsigned integer vector.
std::string Felt::format | ( | const Vec & | vec_ | ) |
String format a vector (useful for logging).
vec_ | vector to stringify. |
PosIdx Felt::index | ( | const VecDi< D > & | pos_, |
const VecDi< D > & | size_, | ||
const VecDi< D > & | offset_ | ||
) |
Get index in data array of position vector.
The grid is packed in a 1D array, so this method is required to get the index in that array of the D-dimensional position.
pos_ | position in grid. |
size_ | size of grid. |
offset_ | spatial offset of grid. |
VecDi<D> Felt::index | ( | PosIdx | idx_, |
const VecDi< D > & | size_, | ||
const VecDi< D > & | offset_ = VecDi<D>::Zero() |
||
) |
Get position of index.
Given an index and the dimensions and offset of a grid, calculate the position vector that the index pertains to in a representative 1D array.
idx_ | index in to query. |
size_ | size of grid. |
offset_ | spatial offset of grid. |
bool Felt::inside | ( | const TPos & | pos_, |
const TBounds & | pos_min_, | ||
const TBounds & | pos_max_ | ||
) |
Test if a position is inside given bounds.
Pos | the type of position vector (i.e. float vs. int). |
pos_ | position in grid to query. |
pos_min_ | minimum allowed position. |
pos_max_ | one more than the maximum allowed position. |
auto Felt::sgn | ( | T | val_ | ) |
Get the sign of a value (+/-1).
val_ | value to get signum for. |
Felt::SingleListSingleIdxByValue | ( | const VecDi & | size_, |
const VecDi & | offset_, | ||
const Leaf | background_ | ||
) |