Go to the documentation of this file.
28 #ifndef __Ogre_Volume_GridSource_H__
29 #define __Ogre_Volume_GridSource_H__
122 (getVolumeGridValue(x + 1, y - 1, z) - getVolumeGridValue(x - 1, y - 1, z))
123 + (
Real)2.0 * (getVolumeGridValue(x + 1, y, z) - getVolumeGridValue(x - 1, y, z))
124 + (getVolumeGridValue(x + 1, y + 1, z) - getVolumeGridValue(x - 1, y + 1, z)),
125 (getVolumeGridValue(x, y + 1, z - 1) - getVolumeGridValue(x, y - 1, z - 1))
126 + (
Real)2.0 * (getVolumeGridValue(x, y + 1, z) - getVolumeGridValue(x, y - 1, z))
127 + (getVolumeGridValue(x, y + 1, z + 1) - getVolumeGridValue(x, y - 1, z + 1)),
128 (getVolumeGridValue(x - 1, y, z + 1) - getVolumeGridValue(x - 1, y, z - 1))
129 + (
Real)2.0 * (getVolumeGridValue(x, y, z + 1) - getVolumeGridValue(x, y, z - 1))
130 + (getVolumeGridValue(x + 1, y, z + 1) - getVolumeGridValue(x + 1, y, z - 1))) / (
Real)4.0;
134 getVolumeGridValue(x + 1, y, z) - getVolumeGridValue(x - 1, y, z),
135 getVolumeGridValue(x, y + 1, z) - getVolumeGridValue(x, y - 1, z),
136 getVolumeGridValue(x, y, z + 1) - getVolumeGridValue(x, y, z - 1));
141 GridSource(
bool trilinearValue,
bool trilinearGradient,
bool sobelGradient);
virtual Vector3 getIntersectionEnd(const Ray &ray, Real maxDistance) const
Overridden from VolumeSource.
virtual Vector3 getIntersectionStart(const Ray &ray, Real maxDistance) const
Overridden from VolumeSource.
const bool mSobelGradient
Whether to blur the gradient a bit Sobel like.
virtual Real getValue(const Vector3 &position) const
Overridden from VolumeSource.
Real mPosZScale
The scale of the position based on the world depth.
virtual void combineWithSource(CSGOperationSource *operation, Source *source, const Vector3 ¢er, Real radius)
Updates this grid with another source in a certain area.
const Vector3 getGradient(size_t x, size_t y, size_t z) const
Gets a gradient of a point with optional sobel blurring.
Real mPosXScale
The scale of the position based on the world width.
virtual void setVolumeGridValue(int x, int y, int z, float value)=0
Sets the volume value of a position.
Real mPosYScale
The scale of the position based on the world height.
virtual float getVolumeGridValue(size_t x, size_t y, size_t z) const =0
Gets the volume value of a position.
virtual Vector4 getValueAndGradient(const Vector3 &position) const
Overridden from VolumeSource.
size_t mDepth
The texture depth.
virtual ~GridSource(void)
Destructor.
size_t mWidth
The texture width.
size_t getDepth(void) const
Gets the depth of the texture.
Real mVolumeSpaceToWorldSpaceFactor
Factor to come from volume coordinate to world coordinate.
const bool mTrilinearGradient
Whether to use trilinear filtering or not for the gradient.
size_t getHeight(void) const
Gets the height of the texture.
Abstract operation volume source holding two sources as operants.
size_t mHeight
The texture height.
size_t getWidth(void) const
Gets the width of the texture.
#define _OgreVolumeExport
bool mTrilinearValue
Whether to use trilinear filtering or not for the value.
4-dimensional homogeneous vector.
Real getVolumeSpaceToWorldSpaceFactor(void) const
Overridden from VolumeSource.
GridSource(bool trilinearValue, bool trilinearGradient, bool sobelGradient)
float Real
Software floating point type.
Representation of a ray in space, i.e.
Standard 3-dimensional vector.
Abstract class defining the density function.
A volume source from a discrete 3d grid.
Copyright © 2012 Torus Knot Software Ltd

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.