Radium Engine
1.5.20
|
#include <Core/Geometry/Volume.hpp>
Public Types | |
using | ValueType = AbstractDiscreteVolume::ValueType |
using | IndexType = AbstractDiscreteVolume::IndexType |
using | Container = std::vector<SampleType> |
Public Types inherited from Ra::Core::Geometry::AbstractDiscreteVolume | |
using | ValueType = AbstractVolume::ValueType |
using | IndexType = Vector3i |
Public Types inherited from Ra::Core::Geometry::AbstractVolume | |
enum | VolumeStorageType { UNKNOWN = 1 << 0 , PARAMETRIC = 1 << 1 , DISCRETE_DENSE = 1 << 2 , DISCRETE_SPARSE = 1 << 3 } |
The type of geometry. More... | |
using | ValueType = Scalar |
Type of value encoded in the volume. | |
Public Member Functions | |
VolumeSparse (const VolumeSparse &data)=default | |
VolumeSparse & | operator= (const VolumeSparse &)=default |
bool | addToBin (const ValueType &value, Eigen::Ref< const IndexType > p) |
Utils::optional< ValueType > | getBinValue (Eigen::Ref< const IndexType > p) const |
Get the value of the given bin. | |
Public Member Functions inherited from Ra::Core::Geometry::AbstractDiscreteVolume | |
AbstractDiscreteVolume (const AbstractDiscreteVolume &data)=default | |
AbstractDiscreteVolume & | operator= (const AbstractDiscreteVolume &)=default |
void | clear () override |
Erases all data, making the geometry empty. | |
Aabb | computeAabb () const override |
Compute the aabb of the volume. | |
const Vector3i & | size () const |
return the size (number of bins ni each dimension) of the volume | |
void | setSize (Eigen::Ref< const Vector3i > size) |
const Vector3 & | binSize () const |
return the bin size | |
void | setBinSize (Eigen::Ref< const Vector3 > binSize) |
Set the bin size. | |
Utils::optional< ValueType > | getBinValue (Eigen::Ref< const IndexType > p) const |
Get the value of the given bin. | |
Utils::optional< ValueType > | getValue (Eigen::Ref< const Vector3 > p) const override final |
bool | addToBin (const ValueType &value, Eigen::Ref< const IndexType > p) |
Public Member Functions inherited from Ra::Core::Geometry::AbstractVolume | |
AbstractVolume (const AbstractVolume &data)=default | |
AbstractVolume & | operator= (const AbstractVolume &)=default |
VolumeStorageType | getType () const |
Return the type of geometry. | |
void | displayInfo () const |
Print info to the Debug output. Need to be extended by child classes. | |
bool | isParametric () const |
bool | isDiscrete () const |
Return true if the volume is discrete. Can be cast as AbstractDiscreteVolume. | |
bool | isDense () const |
Return true if the volume is dense (implies isDiscrete to be true) | |
bool | isSparse () const |
Return true if the volume is sparse (implies isDiscrete to be true) | |
Public Member Functions inherited from Ra::Core::Geometry::AbstractGeometry | |
AbstractGeometry (const AbstractGeometry &other) | |
AbstractGeometry & | operator= (const AbstractGeometry &other) |
Ra::Core::Utils::ObservableVoid & | getAabbObservable () |
Protected Member Functions | |
Utils::optional< ValueType > | getBinValue (typename IndexType::Scalar idx) const override |
void | addToBin (const ValueType &value, typename IndexType::Scalar idx) override |
void | updateStorage () override |
Method called when size as been updated. | |
Protected Member Functions inherited from Ra::Core::Geometry::AbstractDiscreteVolume | |
AbstractDiscreteVolume (const VolumeStorageType &type) | |
Utils::optional< typename IndexType::Scalar > | linearIndex (Eigen::Ref< const IndexType > p) const |
Convert the 3D position into a linear index on the bin set. | |
Protected Member Functions inherited from Ra::Core::Geometry::AbstractVolume | |
AbstractVolume (const VolumeStorageType &type) | |
void | setType (const VolumeStorageType &type) |
Set the type of geometry. | |
Protected Member Functions inherited from Ra::Core::Geometry::AbstractGeometry | |
bool | isAabbValid () const |
Core::Aabb | getAabb () const |
void | invalidateAabb () const |
void | setAabb (const Core::Aabb &aabb) const |
Additional Inherited Members | |
Protected Attributes inherited from Ra::Core::Geometry::AbstractVolume | |
VolumeStorageType | m_type |
The type of geometry for the object. | |
Discrete volume data with sparse storage
Samples are stored as SparseVolumeData::sample, which stores the bin linear index, and the function value
Definition at line 258 of file Volume.hpp.
using Ra::Core::Geometry::VolumeSparse::Container = std::vector<SampleType> |
Definition at line 269 of file Volume.hpp.
using Ra::Core::Geometry::VolumeSparse::IndexType = AbstractDiscreteVolume::IndexType |
Definition at line 262 of file Volume.hpp.
using Ra::Core::Geometry::VolumeSparse::ValueType = AbstractDiscreteVolume::ValueType |
Definition at line 261 of file Volume.hpp.
|
inline |
Definition at line 272 of file Volume.hpp.
|
inline |
Increment bin p by value.
Definition at line 150 of file Volume.hpp.
|
inlineoverrideprotectedvirtual |
Increment bin p by value
Create the bin if not already existing
Implements Ra::Core::Geometry::AbstractDiscreteVolume.
Definition at line 300 of file Volume.hpp.
|
inline |
Get the value of the given bin.
Definition at line 133 of file Volume.hpp.
|
inlineoverrideprotectedvirtual |
Get the function value at a given position p (if the bin exists)
Returns an invalid value when no sample is registered in the targeted bin.
Implements Ra::Core::Geometry::AbstractDiscreteVolume.
Definition at line 288 of file Volume.hpp.
|
inlineoverrideprotectedvirtual |
Method called when size as been updated.
Implements Ra::Core::Geometry::AbstractDiscreteVolume.
Definition at line 308 of file Volume.hpp.