OGRE  14.2
Object-Oriented Graphics Rendering Engine
Ogre::Volume::CSGNoiseSource Class Reference

#include <OgreVolumeCSGSource.h>

+ Inheritance diagram for Ogre::Volume::CSGNoiseSource:

Public Member Functions

 CSGNoiseSource (const Source *src, Real *frequencies, Real *amplitudes, size_t numOctaves)
 Constructor with current time as seed. More...
 
 CSGNoiseSource (const Source *src, Real *frequencies, Real *amplitudes, size_t numOctaves, long seed)
 Constructor. More...
 
long getSeed (void) const
 Gets the initial seed. More...
 
Real getValue (const Vector3 &position) const override
 Overridden from Source. More...
 
Vector4 getValueAndGradient (const Vector3 &position) const override
 Overridden from Source. More...
 
- Public Member Functions inherited from Ogre::Volume::CSGUnarySource
virtual const SourcegetSource (void) const
 Gets the source. More...
 
virtual void setSource (Source *a)
 Sets the source. More...
 
- Public Member Functions inherited from Ogre::Volume::Source
virtual ~Source (void)
 Destructor. More...
 
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. More...
 
Real getVolumeSpaceToWorldSpaceFactor (void) const
 Gets a factor to come from volume coordinate to world coordinate. More...
 
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. More...
 
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. More...
 

Additional Inherited Members

- Static Public Attributes inherited from Ogre::Volume::Source
static const size_t SERIALIZATION_CHUNK_SIZE
 The amount of items being written as one chunk during serialization. More...
 
static const uint32 VOLUME_CHUNK_ID
 The id of volume files. More...
 
static const uint16 VOLUME_CHUNK_VERSION
 The version of volume files. More...
 

Constructor & Destructor Documentation

◆ CSGNoiseSource() [1/2]

Ogre::Volume::CSGNoiseSource::CSGNoiseSource ( const Source src,
Real frequencies,
Real amplitudes,
size_t  numOctaves,
long  seed 
)

Constructor.

Parameters
srcThe source to add the noise to.
frequenciesThe frequencies of the added noise octaves.
amplitudesThe amplitudes of the added noise octaves.
numOctavesThe amount of octaves.
seedThe seed to initialize the random number generator with.

◆ CSGNoiseSource() [2/2]

Ogre::Volume::CSGNoiseSource::CSGNoiseSource ( const Source src,
Real frequencies,
Real amplitudes,
size_t  numOctaves 
)

Constructor with current time as seed.

Parameters
srcThe source to add the noise to.
frequenciesThe frequencies of the added noise octaves.
amplitudesThe amplitudes of the added noise octaves.
numOctavesThe amount of octaves.

Member Function Documentation

◆ getValueAndGradient()

Vector4 Ogre::Volume::CSGNoiseSource::getValueAndGradient ( const Vector3 position) const
overridevirtual

Overridden from Source.

Implements Ogre::Volume::Source.

◆ getValue()

Real Ogre::Volume::CSGNoiseSource::getValue ( const Vector3 position) const
overridevirtual

Overridden from Source.

Implements Ogre::Volume::Source.

◆ getSeed()

long Ogre::Volume::CSGNoiseSource::getSeed ( void  ) const

Gets the initial seed.

Returns
The initial seed.

The documentation for this class was generated from the following file: