28#ifndef __Ogre_Volume_CSGSource_H__
29#define __Ogre_Volume_CSGSource_H__
127 if (dMin.
x >= (
Real)0.0 && dMin.
y >= (
Real)0.0 && dMin.
z >= (
Real)0.0 &&
130 const Real d[6] = {dMin.
x, dMin.
y, dMin.
z, dMax.
x, dMax.
y, dMax.
z};
132 for (
size_t i = 0; i < 6; ++i)
142 distance = -
mBox.distance(position);
424 return mSrc->getValue(position) + toAdd;
#define _OgreVolumeExport
A 3D box aligned with the x/y/z axes.
static const Real POS_INFINITY
Standard 3-dimensional vector.
4-dimensional homogeneous vector.
static Vector3 mBoxNormals[6]
The six possible normals of the cube.
Real distanceTo(const Vector3 &position) const
Gets the distance of a point to the nearest cube element.
CSGCubeSource(const Vector3 &min, const Vector3 &max)
Constructor.
AxisAlignedBox mBox
The box.
virtual Vector4 getValueAndGradient(const Vector3 &position) const
Overridden from Source.
virtual Real getValue(const Vector3 &position) const
Overridden from Source.
virtual Real getValue(const Vector3 &position) const
Overridden from Source.
CSGDifferenceSource(void)
Constructor, sets the sources to null.
CSGDifferenceSource(const Source *a, const Source *b)
Constructor.
virtual Vector4 getValueAndGradient(const Vector3 &position) const
Overridden from Source.
virtual Vector4 getValueAndGradient(const Vector3 &position) const
Overridden from Source.
CSGIntersectionSource(const Source *a, const Source *b)
Constructor.
CSGIntersectionSource(void)
Constructor, sets the sources to null.
virtual Real getValue(const Vector3 &position) const
Overridden from Source.
virtual Real getValue(const Vector3 &position) const
Overridden from Source.
CSGNegateSource(void)
Constructor.
virtual Vector4 getValueAndGradient(const Vector3 &position) const
Overridden from Source.
CSGNegateSource(const Source *src)
Constructor.
long mSeed
The initial seed.
long getSeed(void) const
Gets the initial seed.
Real * mAmplitudes
The amplitudes of the octaves.
Real * mFrequencies
The frequencies of the octaves.
size_t mNumOctaves
The amount of octaves.
SimplexNoise mNoise
To make some noise.
virtual Real getValue(const Vector3 &position) const
Overridden from Source.
void setData(void)
Prepares the node members.
Real getInternalValue(const Vector3 &position) const
virtual Vector4 getValueAndGradient(const Vector3 &position) const
Overridden from Source.
CSGNoiseSource(const Source *src, Real *frequencies, Real *amplitudes, size_t numOctaves)
Constructor with current time as seed.
CSGNoiseSource(const Source *src, Real *frequencies, Real *amplitudes, size_t numOctaves, long seed)
Constructor.
Real mGradientOff
To calculate the gradient.
const Source * mA
The first operant.
CSGOperationSource(const Source *a, const Source *b)
Constructor.
CSGOperationSource(void)
Constructor, sets the sources to null.
virtual const Source * getSourceA() const
Gets the first operator source.
virtual void setSourceB(Source *b)
Sets the second operator source.
virtual void setSourceA(Source *a)
Sets the first operator source.
const Source * mB
The second operant.
virtual const Source * getSourceB(void) const
Gets the second operator source.
Vector3 mNormal
The normal of the plane.
const Real mD
The distance to zero of the plane.
CSGPlaneSource(const Real d, const Vector3 &normal)
Constructor.
virtual Real getValue(const Vector3 &position) const
Overridden from Source.
virtual Vector4 getValueAndGradient(const Vector3 &position) const
Overridden from Source.
virtual Real getValue(const Vector3 &position) const
Overridden from Source.
virtual Vector4 getValueAndGradient(const Vector3 &position) const
Overridden from Source.
CSGScaleSource(const Source *src, const Real scale)
Constructor.
Real mScale
Holds the dimensions of the volume.
CSGSphereSource(const Real r, const Vector3 ¢er)
Constructor.
virtual Real getValue(const Vector3 &position) const
Overridden from Source.
virtual Vector4 getValueAndGradient(const Vector3 &position) const
Overridden from Source.
const Vector3 mCenter
The center.
virtual const Source * getSource(void) const
Gets the source.
const Source * mSrc
The first operant.
CSGUnarySource(void)
Constructor.
CSGUnarySource(const Source *src)
Constructor.
virtual void setSource(Source *a)
Sets the source.
CSGUnionSource(void)
Constructor, sets the sources to null.
CSGUnionSource(const Source *a, const Source *b)
Constructor.
virtual Vector4 getValueAndGradient(const Vector3 &position) const
Overridden from Source.
virtual Real getValue(const Vector3 &position) const
Overridden from Source.
Simplex Noise ported from public domain Java Implementation http://webstaff.itn.liu....
Abstract class defining the density function.
float Real
Software floating point type.