PolyVox  0.3.0-dev
Open source voxel management library
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
PolyVox Namespace Reference

Main namespace. More...

Namespaces

namespace  RaycastResults
 
namespace  WrapModes
 The BaseVolume class provides common functionality and an interface for other volume classes to implement.
 

Classes

class  AmbientOcclusionCalculatorRaycastCallback
 
class  Array
 Provides an efficient implementation of a multidimensional array. More...
 
class  Array< 1, ElementType >
 
class  Array< 0, ElementType >
 
class  ArraySizes
 The ArraySizes class provide a convienient way to specify the dimensions of an Array. More...
 
struct  AStarPathfinderParams
 Provides a configuration for the AStarPathfinder. More...
 
class  AStarPathfinder
 The AStarPathfinder compute a path from one point in the volume to another. More...
 
class  BaseVolume
 
class  Compressor
 Provides an interface for performing compression of data. More...
 
class  ConstVolumeProxy
 
class  CubicSurfaceExtractor
 The CubicSurfaceExtractor creates a mesh in which each voxel appears to be rendered as a cube. More...
 
class  CubicSurfaceExtractorWithNormals
 
class  DefaultIsQuadNeeded
 
class  DefaultMarchingCubesController
 This class provides a default implementation of a controller for the MarchingCubesSurfaceExtractor. More...
 
class  Density
 This class represents a voxel storing only a density. More...
 
class  DefaultMarchingCubesController< Density< Type > >
 This is a specialisation of DefaultMarchingCubesController for the Density voxel type. More...
 
class  ArraySizesImpl
 
struct  Node
 
class  AllNodesContainerIteratorComparator
 
class  NodeSort
 
class  OpenNodesContainer
 
class  ClosedNodesContainer
 
class  Block
 
struct  StaticAssert
 
struct  StaticAssert< true >
 
class  SubArray
 
class  SubArray< 1, ElementType >
 
class  SubArray< 0, ElementType >
 
class  IteratorController
 
class  LargeVolume
 The LargeVolume class provides a memory efficient method of storing voxel data while also allowing fast access and modification. More...
 
class  LowPassFilter
 
class  MarchingCubesSurfaceExtractor
 
class  Material
 This class represents a voxel storing only a material. More...
 
class  DefaultIsQuadNeeded< Material< Type > >
 
class  MaterialDensityPair
 This class represents a voxel storing only a density. More...
 
class  DefaultIsQuadNeeded< MaterialDensityPair< Type, NoOfMaterialBits, NoOfDensityBits > >
 
class  DefaultMarchingCubesController< MaterialDensityPair< Type, NoOfMaterialBits, NoOfDensityBits > >
 
class  MinizCompressor
 Performs compression of data using the miniz library. More...
 
class  RawVolume
 
class  Region
 Represents a part of a Volume. More...
 
class  RLECompressor
 Performs compression of data using Run Length Encoding (RLE). More...
 
class  SimpleVolume
 
class  LodRecord
 
class  SurfaceMesh
 
class  Vector
 Represents a vector in space. More...
 
class  PositionMaterial
 
class  PositionMaterialNormal
 
class  VolumeResampler
 
class  DummyClass
 

Typedefs

typedef Array< 1, floatArray1DFloat
 A 1D Array of floats.
 
typedef Array< 1, double > Array1DDouble
 A 1D Array of doubles.
 
typedef Array< 1, int8_tArray1DInt8
 A 1D Array of signed 8-bit values.
 
typedef Array< 1, uint8_tArray1DUint8
 A 1D Array of unsigned 8-bit values.
 
typedef Array< 1, int16_tArray1DInt16
 A 1D Array of signed 16-bit values.
 
typedef Array< 1, uint16_tArray1DUint16
 A 1D Array of unsigned 16-bit values.
 
typedef Array< 1, int32_tArray1DInt32
 A 1D Array of signed 32-bit values.
 
typedef Array< 1, uint32_tArray1DUint32
 A 1D Array of unsigned 32-bit values.
 
typedef Array< 2, floatArray2DFloat
 A 2D Array of floats.
 
typedef Array< 2, double > Array2DDouble
 A 2D Array of doubles.
 
typedef Array< 2, int8_tArray2DInt8
 A 2D Array of signed 8-bit values.
 
typedef Array< 2, uint8_tArray2DUint8
 A 2D Array of unsigned 8-bit values.
 
typedef Array< 2, int16_tArray2DInt16
 A 2D Array of signed 16-bit values.
 
typedef Array< 2, uint16_tArray2DUint16
 A 2D Array of unsigned 16-bit values.
 
typedef Array< 2, int32_tArray2DInt32
 A 2D Array of signed 32-bit values.
 
typedef Array< 2, uint32_tArray2DUint32
 A 2D Array of unsigned 32-bit values.
 
typedef Array< 3, floatArray3DFloat
 A 3D Array of floats.
 
typedef Array< 3, double > Array3DDouble
 A 3D Array of doubles.
 
typedef Array< 3, int8_tArray3DInt8
 A 3D Array of signed 8-bit values.
 
typedef Array< 3, uint8_tArray3DUint8
 A 3D Array of unsigned 8-bit values.
 
typedef Array< 3, int16_tArray3DInt16
 A 3D Array of signed 16-bit values.
 
typedef Array< 3, uint16_tArray3DUint16
 A 3D Array of unsigned 16-bit values.
 
typedef Array< 3, int32_tArray3DInt32
 A 3D Array of signed 32-bit values.
 
typedef Array< 3, uint32_tArray3DUint32
 A 3D Array of unsigned 32-bit values.
 
typedef WrapModes::WrapMode WrapMode
 
typedef Density< uint8_tDensity8
 
typedef Density< uint16_tDensity16
 
typedef Density< uint32_tDensity32
 
typedef Density< floatDensityFloat
 
typedef std::set< NodeAllNodesContainer
 
typedef void(* ThrowHandler )(std::exception &e, const char *file, int line)
 
typedef Material< uint8_tMaterial8
 
typedef Material< uint16_tMaterial16
 
typedef MaterialDensityPair
< uint8_t, 4, 4 > 
MaterialDensityPair44
 
typedef MaterialDensityPair
< uint16_t, 8, 8 > 
MaterialDensityPair88
 
typedef Density< int8_tDensityI8
 
typedef Density< uint8_tDensityU8
 
typedef Density< int16_tDensityI16
 
typedef Density< uint16_tDensityU16
 
typedef Density< double > DensityDouble
 
typedef Material< uint8_tMaterialU8
 
typedef Material< uint16_tMaterialU16
 
typedef Material< uint32_tMaterialU32
 
typedef MaterialU32 Material32
 
typedef Vector< 2, float, floatVector2DFloat
 A 2D Vector of floats.
 
typedef Vector< 2, double, double > Vector2DDouble
 A 2D Vector of doubles.
 
typedef Vector< 2, int8_t,
int32_t
Vector2DInt8
 A 2D Vector of signed 8-bit values.
 
typedef Vector< 2, uint8_t,
int32_t
Vector2DUint8
 A 2D Vector of unsigned 8-bit values.
 
typedef Vector< 2, int16_t,
int32_t
Vector2DInt16
 A 2D Vector of signed 16-bit values.
 
typedef Vector< 2, uint16_t,
int32_t
Vector2DUint16
 A 2D Vector of unsigned 16-bit values.
 
typedef Vector< 2, int32_t,
int32_t
Vector2DInt32
 A 2D Vector of signed 32-bit values.
 
typedef Vector< 2, uint32_t,
int32_t
Vector2DUint32
 A 2D Vector of unsigned 32-bit values.
 
typedef Vector< 3, float, floatVector3DFloat
 A 3D Vector of floats.
 
typedef Vector< 3, double, double > Vector3DDouble
 A 3D Vector of doubles.
 
typedef Vector< 3, int8_t,
int32_t
Vector3DInt8
 A 3D Vector of signed 8-bit values.
 
typedef Vector< 3, uint8_t,
int32_t
Vector3DUint8
 A 3D Vector of unsigned 8-bit values.
 
typedef Vector< 3, int16_t,
int32_t
Vector3DInt16
 A 3D Vector of signed 16-bit values.
 
typedef Vector< 3, uint16_t,
int32_t
Vector3DUint16
 A 3D Vector of unsigned 16-bit values.
 
typedef Vector< 3, int32_t,
int32_t
Vector3DInt32
 A 3D Vector of signed 32-bit values.
 
typedef Vector< 3, uint32_t,
int32_t
Vector3DUint32
 A 3D Vector of unsigned 32-bit values.
 
typedef Vector< 4, float, floatVector4DFloat
 A 4D Vector of floats.
 
typedef Vector< 4, double, double > Vector4DDouble
 A 4D Vector of doubles.
 
typedef Vector< 4, int8_t,
int32_t
Vector4DInt8
 A 4D Vector of signed 8-bit values.
 
typedef Vector< 4, uint8_t,
int32_t
Vector4DUint8
 A 4D Vector of unsigned 8-bit values.
 
typedef Vector< 4, int16_t,
int32_t
Vector4DInt16
 A 4D Vector of signed 16-bit values.
 
typedef Vector< 4, uint16_t,
int32_t
Vector4DUint16
 A 4D Vector of unsigned 16-bit values.
 
typedef Vector< 4, int32_t,
int32_t
Vector4DInt32
 A 4D Vector of signed 32-bit values.
 
typedef Vector< 4, uint32_t,
int32_t
Vector4DUint32
 A 4D Vector of unsigned 32-bit values.
 
typedef
RaycastResults::RaycastResult 
RaycastResult
 

Enumerations

enum  NormalGenerationMethod {
  SIMPLE, CENTRAL_DIFFERENCE, SOBEL, CENTRAL_DIFFERENCE_SMOOTHED,
  SOBEL_SMOOTHED
}
 
enum  Connectivity { SixConnected, EighteenConnected, TwentySixConnected }
 The Connectivity of a voxel determines how many neighbours it has. More...
 
enum  LogSeverity { LS_DEBUG, LS_INFO, LS_WARN, LS_ERROR }
 Log levels for filtering logging events. More...
 

Functions

template<typename VolumeType , typename IsVoxelTransparentCallback >
void calculateAmbientOcclusion (VolumeType *volInput, Array< 3, uint8_t > *arrayResult, Region region, float fRayLength, uint8_t uNoOfSamplesPerOutputElement, IsVoxelTransparentCallback isVoxelTransparentCallback)
 Calculate the ambient occlusion for the volume.
 
template<typename VolumeType >
bool aStarDefaultVoxelValidator (const VolumeType *volData, const Vector3DInt32 &v3dPos)
 This function provides the default method for checking whether a given voxel is valid for the path computed by the AStarPathfinder.
 
template<typename Type >
Density< Type > operator+ (const Density< Type > &lhs, const Density< Type > &rhs)
 
template<typename Type >
Density< Type > operator- (const Density< Type > &lhs, const Density< Type > &rhs)
 
template<typename Type >
Density< Type > operator/ (const Density< Type > &lhs, uint32_t rhs)
 
template<typename VolumeType >
Vector3DFloat computeCentralDifferenceGradient (const typename VolumeType::Sampler &volIter)
 
template<typename VolumeType >
Vector3DFloat computeSmoothCentralDifferenceGradient (typename VolumeType::Sampler &volIter)
 
template<typename VolumeType >
Vector3DFloat computeDecimatedCentralDifferenceGradient (typename VolumeType::Sampler &volIter)
 
template<typename VolumeType >
Vector3DFloat computeSobelGradient (const typename VolumeType::Sampler &volIter)
 
template<typename VolumeType >
Vector3DFloat computeSmoothSobelGradient (typename VolumeType::Sampler &volIter)
 
template<typename VolumeType >
Vector3DFloat computeDecimatedCentralDifferenceGradient (const typename VolumeType::Sampler &volIter)
 
ThrowHandler getThrowHandler ()
 
void setThrowHandler (ThrowHandler newHandler)
 
POLYVOX_API uint8_t logBase2 (uint32_t uInput)
 
POLYVOX_API bool isPowerOf2 (uint32_t uInput)
 
int32_t roundTowardsNegInf (float r)
 
int32_t roundToInteger (float r)
 
template<typename Type >
Type clamp (const Type &value, const Type &low, const Type &high)
 
int32_t roundToNearestInteger (float r)
 
template<typename Type >
Type lerp (const Type &v0, const Type &v1, const float x)
 
template<typename Type >
Type bilerp (const Type &v00, const Type &v10, const Type &v01, const Type &v11, const float x, const float y)
 
template<typename Type >
Type trilerp (const Type &v000, const Type &v100, const Type &v010, const Type &v110, const Type &v001, const Type &v101, const Type &v011, const Type &v111, const float x, const float y, const float z)
 
template<typename VolumeType , typename Callback >
RaycastResult raycastWithEndpoints (VolumeType *volData, const Vector3DFloat &v3dStart, const Vector3DFloat &v3dEnd, Callback &callback)
 Cast a ray through a volume by specifying the start and end positions.
 
template<typename VolumeType , typename Callback >
RaycastResult raycastWithDirection (VolumeType *volData, const Vector3DFloat &v3dStart, const Vector3DFloat &v3dDirectionAndLength, Callback &callback)
 Cast a ray through a volume by specifying the start and a direction.
 
template<typename VertexType >
boost::shared_ptr< SurfaceMesh
< VertexType > > 
extractSubset (SurfaceMesh< VertexType > &inputMesh, std::set< uint8_t > setMaterials)
 
template<uint32_t Size, typename StorageType , typename OperationType >
Vector< Size, StorageType,
OperationType > 
operator+ (const Vector< Size, StorageType, OperationType > &lhs, const Vector< Size, StorageType, OperationType > &rhs)
 Addition operator.
 
template<uint32_t Size, typename StorageType , typename OperationType >
Vector< Size, StorageType,
OperationType > 
operator- (const Vector< Size, StorageType, OperationType > &lhs, const Vector< Size, StorageType, OperationType > &rhs)
 Subtraction operator.
 
template<uint32_t Size, typename StorageType , typename OperationType >
Vector< Size, StorageType,
OperationType > 
operator* (const Vector< Size, StorageType, OperationType > &lhs, const Vector< Size, StorageType, OperationType > &rhs)
 Multiplication operator.
 
template<uint32_t Size, typename StorageType , typename OperationType >
Vector< Size, StorageType,
OperationType > 
operator/ (const Vector< Size, StorageType, OperationType > &lhs, const Vector< Size, StorageType, OperationType > &rhs)
 Division operator.
 
template<uint32_t Size, typename StorageType , typename OperationType >
Vector< Size, StorageType,
OperationType > 
operator* (const Vector< Size, StorageType, OperationType > &lhs, const StorageType &rhs)
 Multiplication operator.
 
template<uint32_t Size, typename StorageType , typename OperationType >
Vector< Size, StorageType,
OperationType > 
operator/ (const Vector< Size, StorageType, OperationType > &lhs, const StorageType &rhs)
 Division operator.
 
template<uint32_t Size, typename StorageType , typename OperationType >
std::ostream & operator<< (std::ostream &os, const Vector< Size, StorageType, OperationType > &vector)
 Stream insertion operator.
 
template<typename VolumeType >
float computeSmoothedVoxel (typename VolumeType::Sampler &volIter)
 
void defaultThrowHandler (std::exception &e, const char *file, int line)
 
ThrowHandlergetThrowHandlerInstance ()
 

Variables

const float sqrt_1 = 1.0f
 
const float sqrt_2 = 1.4143f
 
const float sqrt_3 = 1.7321f
 
const Vector3DInt32 arrayPathfinderFaces [6]
 
const Vector3DInt32 arrayPathfinderEdges [12]
 
const Vector3DInt32 arrayPathfinderCorners [8]
 
const POLYVOX_API int edgeTable [256]
 
const POLYVOX_API int triTable [256][16]
 
POLYVOX_API const Vector3DFloat randomUnitVectors []
 
POLYVOX_API const Vector3DFloat randomVectors []
 
void(* logHandler )(std::string, int severity)
 

Detailed Description

Main namespace.

Typedef Documentation

typedef std::set<Node> PolyVox::AllNodesContainer

Definition at line 99 of file AStarPathfinderImpl.h.

typedef Array< 1, double > PolyVox::Array1DDouble

A 1D Array of doubles.

Definition at line 159 of file Array.h.

A 1D Array of floats.

Definition at line 157 of file Array.h.

A 1D Array of signed 16-bit values.

Definition at line 165 of file Array.h.

A 1D Array of signed 32-bit values.

Definition at line 169 of file Array.h.

A 1D Array of signed 8-bit values.

Definition at line 161 of file Array.h.

A 1D Array of unsigned 16-bit values.

Definition at line 167 of file Array.h.

A 1D Array of unsigned 32-bit values.

Definition at line 171 of file Array.h.

A 1D Array of unsigned 8-bit values.

Definition at line 163 of file Array.h.

typedef Array< 2, double > PolyVox::Array2DDouble

A 2D Array of doubles.

Definition at line 176 of file Array.h.

A 2D Array of floats.

Definition at line 174 of file Array.h.

A 2D Array of signed 16-bit values.

Definition at line 182 of file Array.h.

A 2D Array of signed 32-bit values.

Definition at line 186 of file Array.h.

A 2D Array of signed 8-bit values.

Definition at line 178 of file Array.h.

A 2D Array of unsigned 16-bit values.

Definition at line 184 of file Array.h.

A 2D Array of unsigned 32-bit values.

Definition at line 188 of file Array.h.

A 2D Array of unsigned 8-bit values.

Definition at line 180 of file Array.h.

typedef Array< 3, double > PolyVox::Array3DDouble

A 3D Array of doubles.

Definition at line 193 of file Array.h.

A 3D Array of floats.

Definition at line 191 of file Array.h.

A 3D Array of signed 16-bit values.

Definition at line 199 of file Array.h.

A 3D Array of signed 32-bit values.

Definition at line 203 of file Array.h.

A 3D Array of signed 8-bit values.

Definition at line 195 of file Array.h.

A 3D Array of unsigned 16-bit values.

Definition at line 201 of file Array.h.

A 3D Array of unsigned 32-bit values.

Definition at line 205 of file Array.h.

A 3D Array of unsigned 8-bit values.

Definition at line 197 of file Array.h.

Definition at line 136 of file Density.h.

Definition at line 137 of file Density.h.

Definition at line 135 of file Density.h.

Definition at line 84 of file PolyVoxForwardDeclarations.h.

Definition at line 138 of file Density.h.

Definition at line 81 of file PolyVoxForwardDeclarations.h.

Definition at line 77 of file PolyVoxForwardDeclarations.h.

Definition at line 82 of file PolyVoxForwardDeclarations.h.

Definition at line 80 of file PolyVoxForwardDeclarations.h.

Definition at line 70 of file Material.h.

Definition at line 105 of file PolyVoxForwardDeclarations.h.

Definition at line 69 of file Material.h.

Definition at line 149 of file MaterialDensityPair.h.

Definition at line 150 of file MaterialDensityPair.h.

Definition at line 100 of file PolyVoxForwardDeclarations.h.

Definition at line 101 of file PolyVoxForwardDeclarations.h.

Definition at line 97 of file PolyVoxForwardDeclarations.h.

Definition at line 42 of file Raycast.h.

typedef void(* PolyVox::ThrowHandler)(std::exception &e, const char *file, int line)

Definition at line 138 of file ErrorHandling.h.

typedef Vector< 2, double, double > PolyVox::Vector2DDouble

A 2D Vector of doubles.

Definition at line 156 of file PolyVoxForwardDeclarations.h.

A 2D Vector of floats.

Definition at line 153 of file PolyVoxForwardDeclarations.h.

A 2D Vector of signed 16-bit values.

Definition at line 159 of file PolyVoxForwardDeclarations.h.

A 2D Vector of signed 32-bit values.

Definition at line 161 of file PolyVoxForwardDeclarations.h.

A 2D Vector of signed 8-bit values.

Definition at line 157 of file PolyVoxForwardDeclarations.h.

A 2D Vector of unsigned 16-bit values.

Definition at line 160 of file PolyVoxForwardDeclarations.h.

A 2D Vector of unsigned 32-bit values.

Definition at line 162 of file PolyVoxForwardDeclarations.h.

A 2D Vector of unsigned 8-bit values.

Definition at line 158 of file PolyVoxForwardDeclarations.h.

typedef Vector< 3, double, double > PolyVox::Vector3DDouble

A 3D Vector of doubles.

Definition at line 165 of file PolyVoxForwardDeclarations.h.

A 3D Vector of floats.

Definition at line 164 of file PolyVoxForwardDeclarations.h.

A 3D Vector of signed 16-bit values.

Definition at line 168 of file PolyVoxForwardDeclarations.h.

A 3D Vector of signed 32-bit values.

Definition at line 170 of file PolyVoxForwardDeclarations.h.

A 3D Vector of signed 8-bit values.

Definition at line 166 of file PolyVoxForwardDeclarations.h.

A 3D Vector of unsigned 16-bit values.

Definition at line 169 of file PolyVoxForwardDeclarations.h.

A 3D Vector of unsigned 32-bit values.

Definition at line 171 of file PolyVoxForwardDeclarations.h.

A 3D Vector of unsigned 8-bit values.

Definition at line 167 of file PolyVoxForwardDeclarations.h.

typedef Vector< 4, double, double > PolyVox::Vector4DDouble

A 4D Vector of doubles.

Definition at line 174 of file PolyVoxForwardDeclarations.h.

A 4D Vector of floats.

Definition at line 173 of file PolyVoxForwardDeclarations.h.

A 4D Vector of signed 16-bit values.

Definition at line 177 of file PolyVoxForwardDeclarations.h.

A 4D Vector of signed 32-bit values.

Definition at line 179 of file PolyVoxForwardDeclarations.h.

A 4D Vector of signed 8-bit values.

Definition at line 175 of file PolyVoxForwardDeclarations.h.

A 4D Vector of unsigned 16-bit values.

Definition at line 178 of file PolyVoxForwardDeclarations.h.

A 4D Vector of unsigned 32-bit values.

Definition at line 180 of file PolyVoxForwardDeclarations.h.

A 4D Vector of unsigned 8-bit values.

Definition at line 176 of file PolyVoxForwardDeclarations.h.

Definition at line 48 of file BaseVolume.h.

Enumeration Type Documentation

The Connectivity of a voxel determines how many neighbours it has.

Enumerator:
SixConnected 

Each voxel has six neighbours, which are those sharing a face.

EighteenConnected 

Each voxel has 18 neighbours, which are those sharing a face or an edge.

TwentySixConnected 

Each voxel has 26 neighbours, which are those sharing a face, edge, or corner.

Definition at line 41 of file AStarPathfinderImpl.h.

Log levels for filtering logging events.

Enumerator:
LS_DEBUG 

Only displayed if it is a debug build.

LS_INFO 
LS_WARN 
LS_ERROR 

Definition at line 40 of file Log.h.

Enumerator:
SIMPLE 

Fastest.

CENTRAL_DIFFERENCE 
SOBEL 
CENTRAL_DIFFERENCE_SMOOTHED 
SOBEL_SMOOTHED 

Smoothest.

Definition at line 34 of file GradientEstimators.h.

Function Documentation

template<typename VolumeType >
bool PolyVox::aStarDefaultVoxelValidator ( const VolumeType *  volData,
const Vector3DInt32 &  v3dPos 
)

This function provides the default method for checking whether a given voxel is valid for the path computed by the AStarPathfinder.

Using this function, a voxel is considered valid for the path if it is inside the volume and if its density is below that returned by the voxel's getDensity() function.

Returns
true is the voxel is valid for the path

Definition at line 34 of file AStarPathfinder.inl.

template<typename Type >
Type PolyVox::bilerp ( const Type &  v00,
const Type &  v10,
const Type &  v01,
const Type &  v11,
const float  x,
const float  y 
)

Definition at line 43 of file Interpolation.h.

Referenced by trilerp().

+ Here is the call graph for this function:

template<typename VolumeType , typename IsVoxelTransparentCallback >
void PolyVox::calculateAmbientOcclusion ( VolumeType *  volInput,
Array< 3, uint8_t > *  arrayResult,
Region  region,
float  fRayLength,
uint8_t  uNoOfSamplesPerOutputElement,
IsVoxelTransparentCallback  isVoxelTransparentCallback 
)

Calculate the ambient occlusion for the volume.

Parameters
volInputThe volume to calculate the ambient occlusion for
[out]arrayResultThe output of the calculator
regionThe region of the volume for which the occlusion should be calculated
fRayLengthThe length for each test ray
uNoOfSamplesPerOutputElementThe number of samples to calculate the occlusion
isVoxelTransparentCallbackA callback which takes a VoxelType and returns a bool whether the voxel is transparent

Definition at line 35 of file AmbientOcclusionCalculator.inl.

+ Here is the call graph for this function:

template<typename Type >
Type PolyVox::clamp ( const Type &  value,
const Type &  low,
const Type &  high 
)
inline
template<typename VolumeType >
Vector3DFloat PolyVox::computeCentralDifferenceGradient ( const typename VolumeType::Sampler &  volIter)

Definition at line 27 of file GradientEstimators.inl.

template<typename VolumeType >
Vector3DFloat PolyVox::computeDecimatedCentralDifferenceGradient ( const typename VolumeType::Sampler &  volIter)

Definition at line 48 of file GradientEstimators.inl.

+ Here is the call graph for this function:

template<typename VolumeType >
Vector3DFloat PolyVox::computeDecimatedCentralDifferenceGradient ( typename VolumeType::Sampler &  volIter)
template<typename VolumeType >
Vector3DFloat PolyVox::computeSmoothCentralDifferenceGradient ( typename VolumeType::Sampler &  volIter)

Definition at line 73 of file GradientEstimators.inl.

+ Here is the call graph for this function:

template<typename VolumeType >
float PolyVox::computeSmoothedVoxel ( typename VolumeType::Sampler &  volIter)
template<typename VolumeType >
Vector3DFloat PolyVox::computeSmoothSobelGradient ( typename VolumeType::Sampler &  volIter)

Definition at line 187 of file GradientEstimators.inl.

+ Here is the call graph for this function:

template<typename VolumeType >
Vector3DFloat PolyVox::computeSobelGradient ( const typename VolumeType::Sampler &  volIter)

Definition at line 104 of file GradientEstimators.inl.

void PolyVox::defaultThrowHandler ( std::exception &  e,
const char *  file,
int  line 
)

Definition at line 29 of file ErrorHandling.cpp.

Referenced by getThrowHandlerInstance().

template<typename VertexType >
polyvox_shared_ptr< SurfaceMesh< VertexType > > PolyVox::extractSubset ( SurfaceMesh< VertexType > &  inputMesh,
std::set< uint8_t setMaterials 
)

Definition at line 398 of file SurfaceMesh.inl.

ThrowHandler PolyVox::getThrowHandler ( )

Definition at line 61 of file ErrorHandling.cpp.

+ Here is the call graph for this function:

ThrowHandler& PolyVox::getThrowHandlerInstance ( )

Definition at line 55 of file ErrorHandling.cpp.

Referenced by getThrowHandler(), and setThrowHandler().

+ Here is the call graph for this function:

bool PolyVox::isPowerOf2 ( uint32_t  uInput)
template<typename Type >
Type PolyVox::lerp ( const Type &  v0,
const Type &  v1,
const float  x 
)

Definition at line 30 of file Interpolation.h.

Referenced by bilerp(), and trilerp().

uint8_t PolyVox::logBase2 ( uint32_t  uInput)

Definition at line 31 of file Utility.cpp.

Referenced by PolyVox::Block< VoxelType >::initialise(), and PolyVox::SimpleVolume< VoxelType >::Block::initialise().

+ Here is the call graph for this function:

template<uint32_t Size, typename StorageType , typename OperationType >
Vector< Size, StorageType, OperationType > PolyVox::operator* ( const Vector< Size, StorageType, OperationType > &  lhs,
const Vector< Size, StorageType, OperationType > &  rhs 
)

Multiplication operator.

Multiplication operator mulitplies corresponding elements of the two Vectors.

Parameters
lhsThe Vector to multiply.
rhsThe Vector to multiply by.
Returns
The resulting Vector.

Definition at line 338 of file Vector.inl.

template<uint32_t Size, typename StorageType , typename OperationType >
Vector< Size, StorageType, OperationType > PolyVox::operator* ( const Vector< Size, StorageType, OperationType > &  lhs,
const StorageType &  rhs 
)

Multiplication operator.

Multiplication operator multiplies each element of the Vector by a number.

Parameters
lhsThe Vector to multiply.
rhsThe number the Vector is multiplied by.
Returns
The resulting Vector.

Definition at line 366 of file Vector.inl.

template<typename Type >
Density<Type> PolyVox::operator+ ( const Density< Type > &  lhs,
const Density< Type > &  rhs 
)

Definition at line 110 of file Density.h.

template<uint32_t Size, typename StorageType , typename OperationType >
Vector< Size, StorageType, OperationType > PolyVox::operator+ ( const Vector< Size, StorageType, OperationType > &  lhs,
const Vector< Size, StorageType, OperationType > &  rhs 
)

Addition operator.

Addition operator adds corresponding elements of the two Vectors.

Parameters
lhsThe Vector to add to.
rhsThe Vector to add.
Returns
The resulting Vector.

Definition at line 310 of file Vector.inl.

template<typename Type >
Density<Type> PolyVox::operator- ( const Density< Type > &  lhs,
const Density< Type > &  rhs 
)

Definition at line 118 of file Density.h.

template<uint32_t Size, typename StorageType , typename OperationType >
Vector< Size, StorageType, OperationType > PolyVox::operator- ( const Vector< Size, StorageType, OperationType > &  lhs,
const Vector< Size, StorageType, OperationType > &  rhs 
)

Subtraction operator.

Subtraction operator subtracts corresponding elements of one Vector from the other.

Parameters
lhsThe Vector to subtract from.
rhsThe Vector to subtract.
Returns
The resulting Vector.

Definition at line 324 of file Vector.inl.

template<typename Type >
Density<Type> PolyVox::operator/ ( const Density< Type > &  lhs,
uint32_t  rhs 
)

Definition at line 126 of file Density.h.

template<uint32_t Size, typename StorageType , typename OperationType >
Vector< Size, StorageType, OperationType > PolyVox::operator/ ( const Vector< Size, StorageType, OperationType > &  lhs,
const Vector< Size, StorageType, OperationType > &  rhs 
)

Division operator.

Division operator divides corresponding elements of one Vector by the other.

Parameters
lhsThe Vector to divide.
rhsThe Vector to divide by.
Returns
The resulting Vector.

Definition at line 352 of file Vector.inl.

template<uint32_t Size, typename StorageType , typename OperationType >
Vector< Size, StorageType, OperationType > PolyVox::operator/ ( const Vector< Size, StorageType, OperationType > &  lhs,
const StorageType &  rhs 
)

Division operator.

Division operator divides each element of the Vector by a number.

Parameters
lhsThe Vector to divide.
rhsThe number the Vector is divided by.
Returns
The resulting Vector.

Definition at line 380 of file Vector.inl.

template<uint32_t Size, typename StorageType , typename OperationType >
std::ostream & PolyVox::operator<< ( std::ostream &  os,
const Vector< Size, StorageType, OperationType > &  vector 
)

Stream insertion operator.

Enables the Vector to be used intuitively with output streams such as cout.

Parameters
osThe output stream to write to.
vectorThe Vector to write to the stream.
Returns
A reference to the output stream to allow chaining.

Definition at line 394 of file Vector.inl.

+ Here is the call graph for this function:

template<typename VolumeType , typename Callback >
RaycastResult PolyVox::raycastWithDirection ( VolumeType *  volData,
const Vector3DFloat &  v3dStart,
const Vector3DFloat &  v3dDirectionAndLength,
Callback &  callback 
)

Cast a ray through a volume by specifying the start and a direction.

The ray will move from v3dStart along v3dDirectionAndLength, calling callback for each voxel it passes through until callback returns false. In this case it returns a RaycastResults::Interupted. If it passes from start to end without callback returning false, it returns RaycastResults::Completed.

Note
These has been confusion in the past with people not realising that the length of the direction vector is important. Most graphics API can provide a camera position and view direction for picking purposes, but the view direction is usually normalised (i.e. of length one). If you use this view direction directly you will only iterate over a single voxel and won't find what you are looking for. Instead you must scale the direction vector so that it's length represents the maximum distance over which you want the ray to be cast.
Parameters
volDataThe volume to pass the ray though
v3dStartThe start position in the volume
v3dDirectionAndLengthThe direction and length of the ray
callbackThe callback to call for each voxel
Returns
A RaycastResults designating whether the ray hit anything or not

Definition at line 173 of file Raycast.inl.

Referenced by calculateAmbientOcclusion().

template<typename VolumeType , typename Callback >
RaycastResult PolyVox::raycastWithEndpoints ( VolumeType *  volData,
const Vector3DFloat &  v3dStart,
const Vector3DFloat &  v3dEnd,
Callback &  callback 
)

Cast a ray through a volume by specifying the start and end positions.

The ray will move from v3dStart to v3dEnd, calling callback for each voxel it passes through until callback returns false. In this case it returns a RaycastResults::Interupted. If it passes from start to end without callback returning false, it returns RaycastResults::Completed.

Parameters
volDataThe volume to pass the ray though
v3dStartThe start position in the volume
v3dEndThe end position in the volume
callbackThe callback to call for each voxel
Returns
A RaycastResults designating whether the ray hit anything or not

Definition at line 72 of file Raycast.inl.

+ Here is the call graph for this function:

int32_t PolyVox::roundToInteger ( float  r)
int32_t PolyVox::roundToNearestInteger ( float  r)
inline

Definition at line 44 of file Utility.h.

int32_t PolyVox::roundTowardsNegInf ( float  r)
inline

Definition at line 39 of file Utility.h.

void PolyVox::setThrowHandler ( ThrowHandler  newHandler)

Definition at line 66 of file ErrorHandling.cpp.

+ Here is the call graph for this function:

template<typename Type >
Type PolyVox::trilerp ( const Type &  v000,
const Type &  v100,
const Type &  v010,
const Type &  v110,
const Type &  v001,
const Type &  v101,
const Type &  v011,
const Type &  v111,
const float  x,
const float  y,
const float  z 
)

Definition at line 61 of file Interpolation.h.

+ Here is the call graph for this function:

Variable Documentation

const Vector3DInt32 PolyVox::arrayPathfinderCorners
Initial value:
=
{
Vector3DInt32(-1, -1, -1),
Vector3DInt32(-1, -1, +1),
Vector3DInt32(-1, +1, -1),
Vector3DInt32(-1, +1, +1),
Vector3DInt32(+1, -1, -1),
Vector3DInt32(+1, -1, +1),
Vector3DInt32(+1, +1, -1),
Vector3DInt32(+1, +1, +1)
}

Definition at line 56 of file AStarPathfinder.cpp.

Referenced by PolyVox::AStarPathfinder< VolumeType >::execute().

const Vector3DInt32 PolyVox::arrayPathfinderEdges
Initial value:
=
{
Vector3DInt32(0, -1, -1),
Vector3DInt32(0, -1, +1),
Vector3DInt32(0, +1, -1),
Vector3DInt32(0, +1, +1),
Vector3DInt32(-1, 0, -1),
Vector3DInt32(-1, 0, +1),
Vector3DInt32(+1, 0, -1),
Vector3DInt32(+1, 0, +1),
Vector3DInt32(-1, -1, 0),
Vector3DInt32(-1, +1, 0),
Vector3DInt32(+1, -1, 0),
Vector3DInt32(+1, +1, 0)
}

Definition at line 40 of file AStarPathfinder.cpp.

Referenced by PolyVox::AStarPathfinder< VolumeType >::execute().

const Vector3DInt32 PolyVox::arrayPathfinderFaces
Initial value:
=
{
Vector3DInt32(0, 0, -1),
Vector3DInt32(0, 0, +1),
Vector3DInt32(0, -1, 0),
Vector3DInt32(0, +1, 0),
Vector3DInt32(-1, 0, 0),
Vector3DInt32(+1, 0, 0)
}

Definition at line 30 of file AStarPathfinder.cpp.

Referenced by PolyVox::AStarPathfinder< VolumeType >::execute().

const int PolyVox::edgeTable

Definition at line 33 of file MarchingCubesTables.cpp.

void(* PolyVox::logHandler)(std::string, int severity)=0

Definition at line 28 of file Log.cpp.

const Vector3DFloat PolyVox::randomUnitVectors

Definition at line 28 of file RandomUnitVectors.cpp.

Referenced by calculateAmbientOcclusion().

const Vector3DFloat PolyVox::randomVectors

Definition at line 28 of file RandomVectors.cpp.

Referenced by calculateAmbientOcclusion().

const float PolyVox::sqrt_1 = 1.0f

Definition at line 37 of file AStarPathfinder.h.

Referenced by PolyVox::AStarPathfinder< VolumeType >::execute().

const float PolyVox::sqrt_2 = 1.4143f

Definition at line 38 of file AStarPathfinder.h.

Referenced by PolyVox::AStarPathfinder< VolumeType >::execute().

const float PolyVox::sqrt_3 = 1.7321f

Definition at line 39 of file AStarPathfinder.h.

Referenced by PolyVox::AStarPathfinder< VolumeType >::execute().

const int PolyVox::triTable

Definition at line 69 of file MarchingCubesTables.cpp.