The GradientKernel class contains a size variable gradient calculation kernel. Upon instanciation the size is specified as the radius of the kernel from zero, corresponding to a 2x2x2 kernel (0.5 voxels in radius), up to any value which the processor can handle at the desired update rate.
Public Member Functions | |
| GradientKernel (int size) | |
| Creates a gradient kernel of the specified size, which may be any integer number from zero and up. | |
| template<class T> | |
| H3D::Vec3f | getGradient (H3D::H3DFloat x, H3D::H3DFloat y, H3D::H3DFloat z, T *data, int maxx, int maxy, int maxz) const |
| Calculates the gradient vector. | |
| H3D::Vec3f | getGradient (H3D::H3DFloat x, H3D::H3DFloat y, H3D::H3DFloat z, H3D::Vec3f *data, int maxx, int maxy, int maxz) const |
| Calculates the gradient vector. | |
| H3D::Vec3f | getCurl (H3D::H3DFloat px, H3D::H3DFloat py, H3D::H3DFloat pz, H3D::Vec3f *data, int maxx, int maxy, int maxz) const |
| Calculates the vector curl. | |
| H3D::H3DFloat | getDivergence (H3D::H3DFloat px, H3D::H3DFloat py, H3D::H3DFloat pz, H3D::Vec3f *data, int maxx, int maxy, int maxz) const |
| Calculates the vector divergence. | |
| template<class T> | |
| H3D::Vec3f | getGradient (int x, int y, int z, T *data, int maxx, int maxy, int maxz) const |
| Calculates the gradient vector. | |
| int | getSize () const |
| Returns the size of the kernel. | |
Protected Attributes | |
| int | length |
| int | size |
| int * | dx |
| int * | dy |
| int * | dz |
| H3D::H3DFloat * | vx |
| H3D::H3DFloat * | vy |
| H3D::H3DFloat * | vz |
| VHTK::GradientKernel::GradientKernel | ( | int | size | ) | [inline] |
Creates a gradient kernel of the specified size, which may be any integer number from zero and up.
| H3D::Vec3f VHTK::GradientKernel::getGradient | ( | H3D::H3DFloat | x, | |
| H3D::H3DFloat | y, | |||
| H3D::H3DFloat | z, | |||
| T * | data, | |||
| int | maxx, | |||
| int | maxy, | |||
| int | maxz | |||
| ) | const [inline] |
Calculates the gradient vector.
The vector is defined in local coordinates and thus have to be rotated to the global coordinates (but not scaled).
| H3D::Vec3f VHTK::GradientKernel::getGradient | ( | H3D::H3DFloat | x, | |
| H3D::H3DFloat | y, | |||
| H3D::H3DFloat | z, | |||
| H3D::Vec3f * | data, | |||
| int | maxx, | |||
| int | maxy, | |||
| int | maxz | |||
| ) | const [inline] |
Calculates the gradient vector.
The vector is defined in local coordinates and thus have to be rotated to the global coordinates (but not scaled).
| H3D::Vec3f VHTK::GradientKernel::getCurl | ( | H3D::H3DFloat | px, | |
| H3D::H3DFloat | py, | |||
| H3D::H3DFloat | pz, | |||
| H3D::Vec3f * | data, | |||
| int | maxx, | |||
| int | maxy, | |||
| int | maxz | |||
| ) | const [inline] |
Calculates the vector curl.
| H3D::H3DFloat VHTK::GradientKernel::getDivergence | ( | H3D::H3DFloat | px, | |
| H3D::H3DFloat | py, | |||
| H3D::H3DFloat | pz, | |||
| H3D::Vec3f * | data, | |||
| int | maxx, | |||
| int | maxy, | |||
| int | maxz | |||
| ) | const [inline] |
Calculates the vector divergence.
| H3D::Vec3f VHTK::GradientKernel::getGradient | ( | int | x, | |
| int | y, | |||
| int | z, | |||
| T * | data, | |||
| int | maxx, | |||
| int | maxy, | |||
| int | maxz | |||
| ) | const [inline] |
Calculates the gradient vector.
The vector is defined in local coordinates.
| int VHTK::GradientKernel::getSize | ( | ) | const [inline] |
Returns the size of the kernel.
1.5.6