28#ifndef __Ogre_Volume_Source_H__
29#define __Ogre_Volume_Source_H__
#define _OgreVolumeExport
Representation of a ray in space, i.e.
Reference-counted shared pointer, used for objects where implicit destruction is required.
Standard 3-dimensional vector.
4-dimensional homogeneous vector.
Abstract class defining the density function.
virtual Vector3 getIntersectionStart(const Ray &ray, Real maxDistance) const
Gets the start vector of an intersection.
virtual Real getValue(const Vector3 &position) const =0
Gets the density value at a specific position.
static const uint16 VOLUME_CHUNK_VERSION
The version of volume files.
bool getFirstRayIntersection(const Ray &ray, Vector3 &result, Real scale=(Real) 1.0, size_t maxIterations=5000, Real maxDistance=(Real) 10000.0) const
Gets the first intersection of a ray with the volume.
virtual Vector4 getValueAndGradient(const Vector3 &position) const =0
Gets the density value and gradient at a specific position.
void serialize(const Vector3 &from, const Vector3 &to, float voxelWidth, const String &file)
Serializes a volume source to a discrete grid file with deflated compression.
virtual ~Source(void)
Destructor.
static const size_t SERIALIZATION_CHUNK_SIZE
The amount of items being written as one chunk during serialization.
void serialize(const Vector3 &from, const Vector3 &to, float voxelWidth, Real maxClampedAbsoluteDensity, const String &file)
Same as the other serialize function but with a user definable maximum absolute density value.
static const uint32 VOLUME_CHUNK_ID
The id of volume files.
Real getVolumeSpaceToWorldSpaceFactor(void) const
Gets a factor to come from volume coordinate to world coordinate.
virtual Vector3 getIntersectionEnd(const Ray &ray, Real maxDistance) const
Gets the end vector of an intersection.
float Real
Software floating point type.