Radium Engine
1.5.20
|
#include <Core/Geometry/Volume.hpp>
Public Types | |
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 | |
AbstractVolume (const AbstractVolume &data)=default | |
AbstractVolume & | operator= (const AbstractVolume &)=default |
VolumeStorageType | getType () const |
Return the type of geometry. | |
virtual Utils::optional< ValueType > | getValue (Eigen::Ref< const Vector3 > p) const =0 |
void | displayInfo () const |
Print info to the Debug output. Need to be extended by child classes. | |
Status queries | |
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) |
virtual void | clear ()=0 |
Erases all data, making the geometry empty. | |
virtual Aabb | computeAabb () const =0 |
Compute bounding box. | |
Ra::Core::Utils::ObservableVoid & | getAabbObservable () |
Protected Member Functions | |
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 |
Protected Attributes | |
VolumeStorageType | m_type |
The type of geometry for the object. | |
AbstractVolume is an abstract class for Volumetric data (can be parametric or discrete, with dense or sparse storage).
Definition at line 30 of file Volume.hpp.
using Ra::Core::Geometry::AbstractVolume::ValueType = Scalar |
Type of value encoded in the volume.
Definition at line 44 of file Volume.hpp.
The type of geometry.
Enumerator | |
---|---|
DISCRETE_DENSE | < volume defined as a function f : R^2 -> R |
DISCRETE_SPARSE | < volume defined as a function sampled in a regular grid |
Definition at line 35 of file Volume.hpp.
|
protected |
Definition at line 9 of file Volume.cpp.
void Ra::Core::Geometry::AbstractVolume::displayInfo | ( | ) | const |
Print info to the Debug output. Need to be extended by child classes.
Definition at line 28 of file Volume.cpp.
|
inline |
Return the type of geometry.
Definition at line 55 of file Volume.hpp.
|
pure virtual |
Get the function value at a given position p
Set to invalid when the query position p is out of bound
Implemented in Ra::Core::Geometry::AbstractDiscreteVolume.
bool Ra::Core::Geometry::AbstractVolume::isDense | ( | ) | const |
Return true if the volume is dense (implies isDiscrete to be true)
Definition at line 20 of file Volume.cpp.
bool Ra::Core::Geometry::AbstractVolume::isDiscrete | ( | ) | const |
Return true if the volume is discrete. Can be cast as AbstractDiscreteVolume.
Definition at line 16 of file Volume.cpp.
bool Ra::Core::Geometry::AbstractVolume::isParametric | ( | ) | const |
Return true if the volume is parametric
Definition at line 12 of file Volume.cpp.
bool Ra::Core::Geometry::AbstractVolume::isSparse | ( | ) | const |
Return true if the volume is sparse (implies isDiscrete to be true)
Definition at line 24 of file Volume.cpp.
|
inlineprotected |
Set the type of geometry.
Definition at line 59 of file Volume.hpp.
|
protected |
The type of geometry for the object.
Definition at line 85 of file Volume.hpp.