PolyVox  0.2.0
Open source voxel management library
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
PolyVox Namespace Reference

Main namespace. More...

Namespaces

namespace  RaycastResults

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
 The BaseVolume class provides common functionality and an interface for other volume classes to implement. 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
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  MeshDecimator
 The MeshDecimator reduces the number of triangles in a mesh. More...
class  RawVolume
class  Region
 Represents a part of a Volume. More...
class  SimpleVolume
class  LodRecord
class  SurfaceMesh
class  Vector
 Represents a vector in space. More...
class  PositionMaterial
class  PositionMaterialNormal
class  VolumeResampler
class  VolumeSerializationProgressListener
class  VolumeChangeTracker
 Voxel scene manager. More...
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_t > Array1DInt8
 A 1D Array of signed 8-bit values.
typedef Array< 1, uint8_t > Array1DUint8
 A 1D Array of unsigned 8-bit values.
typedef Array< 1, int16_t > Array1DInt16
 A 1D Array of signed 16-bit values.
typedef Array< 1, uint16_t > Array1DUint16
 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_t > Array1DUint32
 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_t > Array2DInt8
 A 2D Array of signed 8-bit values.
typedef Array< 2, uint8_t > Array2DUint8
 A 2D Array of unsigned 8-bit values.
typedef Array< 2, int16_t > Array2DInt16
 A 2D Array of signed 16-bit values.
typedef Array< 2, uint16_t > Array2DUint16
 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_t > Array2DUint32
 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_t > Array3DInt8
 A 3D Array of signed 8-bit values.
typedef Array< 3, uint8_t > Array3DUint8
 A 3D Array of unsigned 8-bit values.
typedef Array< 3, int16_t > Array3DInt16
 A 3D Array of signed 16-bit values.
typedef Array< 3, uint16_t > Array3DUint16
 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_t > Array3DUint32
 A 3D Array of unsigned 32-bit values.
typedef Density< uint8_t > Density8
typedef Density< uint16_t > Density16
typedef Density< uint32_t > Density32
typedef Density< floatDensityFloat
typedef std::set< NodeAllNodesContainer
typedef Material< uint8_t > Material8
typedef Material< uint16_t > Material16
typedef MaterialDensityPair
< uint8_t, 4, 4 > 
MaterialDensityPair44
typedef MaterialDensityPair
< uint16_t, 8, 8 > 
MaterialDensityPair88
typedef Density< int8_t > DensityI8
typedef Density< uint8_t > DensityU8
typedef Density< int16_t > DensityI16
typedef Density< uint16_t > DensityU16
typedef Density< double > DensityDouble
typedef Material< uint8_t > MaterialU8
typedef Material< uint16_t > MaterialU16
typedef Material< uint32_t > MaterialU32
typedef MaterialU32 Material32
typedef Vector< 3, floatVector3DFloat
 A 3D Vector of floats.
typedef Vector< 3, double > Vector3DDouble
 A 3D Vector of doubles.
typedef Vector< 3, int8_t > Vector3DInt8
 A 3D Vector of signed 8-bit values.
typedef Vector< 3, uint8_t > Vector3DUint8
 A 3D Vector of unsigned 8-bit values.
typedef Vector< 3, int16_t > Vector3DInt16
 A 3D Vector of signed 16-bit values.
typedef Vector< 3, uint16_t > Vector3DUint16
 A 3D Vector of unsigned 16-bit values.
typedef Vector< 3, int32_tVector3DInt32
 A 3D Vector of signed 32-bit values.
typedef Vector< 3, uint32_t > Vector3DUint32
 A 3D Vector of unsigned 32-bit values.
typedef
RaycastResults::RaycastResult 
RaycastResult
typedef SimpleVolume
< MaterialDensityPair88
Volume
typedef SurfaceMesh
< PositionMaterialNormal
Mesh

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)
POLYVOX_API uint8_t logBase2 (uint32_t uInput)
POLYVOX_API bool isPowerOf2 (uint32_t uInput)
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.
POLYVOX_DEPRECATED void extractCubicMesh (Volume &volume, const Region &region, Mesh &resultMesh)
POLYVOX_DEPRECATED void extractSmoothMesh (Volume &volume, const Region &region, Mesh &resultMesh)
template<typename VertexType >
std::shared_ptr< SurfaceMesh
< VertexType > > 
extractSubset (SurfaceMesh< VertexType > &inputMesh, std::set< uint8_t > setMaterials)
template<uint32_t Size, typename Type >
Vector< Size, Type > operator+ (const Vector< Size, Type > &lhs, const Vector< Size, Type > &rhs)
 Addition operator.
template<uint32_t Size, typename Type >
Vector< Size, Type > operator- (const Vector< Size, Type > &lhs, const Vector< Size, Type > &rhs)
 Subtraction operator.
template<uint32_t Size, typename Type >
Vector< Size, Type > operator* (const Vector< Size, Type > &lhs, const Vector< Size, Type > &rhs)
 Multiplication operator.
template<uint32_t Size, typename Type >
Vector< Size, Type > operator/ (const Vector< Size, Type > &lhs, const Vector< Size, Type > &rhs)
 Division operator.
template<uint32_t Size, typename Type >
Vector< Size, Type > operator* (const Vector< Size, Type > &lhs, const Type &rhs)
 Multiplication operator.
template<uint32_t Size, typename Type >
Vector< Size, Type > operator/ (const Vector< Size, Type > &lhs, const Type &rhs)
 Division operator.
template<uint32_t Size, typename Type >
std::ostream & operator<< (std::ostream &os, const Vector< Size, Type > &vector)
 Stream insertion operator.
template<typename VolumeType >
float computeSmoothedVoxel (typename VolumeType::Sampler &volIter)
template<typename VolumeType >
POLYVOX_DEPRECATED
polyvox_shared_ptr< VolumeType > 
loadVolumeRaw (std::istream &stream, VolumeSerializationProgressListener *progressListener=0)
template<typename VolumeType >
POLYVOX_DEPRECATED void saveVolumeRaw (std::ostream &stream, VolumeType &volume, VolumeSerializationProgressListener *progressListener=0)
template<typename VolumeType >
POLYVOX_DEPRECATED
polyvox_shared_ptr< VolumeType > 
loadVolumeRle (std::istream &stream, VolumeSerializationProgressListener *progressListener=0)
template<typename VolumeType >
POLYVOX_DEPRECATED void saveVolumeRle (std::ostream &stream, VolumeType &volume, VolumeSerializationProgressListener *progressListener=0)
template<typename VolumeType >
POLYVOX_DEPRECATED bool loadVolume (std::istream &stream, VolumeType &volume, VolumeSerializationProgressListener *progressListener=0)
template<typename VolumeType >
POLYVOX_DEPRECATED bool saveVolume (std::ostream &stream, VolumeType &volume, VolumeSerializationProgressListener *progressListener=0)
template<typename VolumeType >
POLYVOX_DEPRECATED bool loadVersion0 (std::istream &stream, VolumeType &volume, VolumeSerializationProgressListener *progressListener=0)
template<typename VolumeType >
POLYVOX_DEPRECATED bool saveVersion0 (std::ostream &stream, VolumeType &volume, VolumeSerializationProgressListener *progressListener=0)

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.

typedef Array< 1, int16_t > PolyVox::Array1DInt16

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.

typedef Array< 1, int8_t > PolyVox::Array1DInt8

A 1D Array of signed 8-bit values.

Definition at line 161 of file Array.h.

typedef Array< 1, uint16_t > PolyVox::Array1DUint16

A 1D Array of unsigned 16-bit values.

Definition at line 167 of file Array.h.

typedef Array< 1, uint32_t > PolyVox::Array1DUint32

A 1D Array of unsigned 32-bit values.

Definition at line 171 of file Array.h.

typedef Array< 1, uint8_t > PolyVox::Array1DUint8

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.

typedef Array< 2, int16_t > PolyVox::Array2DInt16

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.

typedef Array< 2, int8_t > PolyVox::Array2DInt8

A 2D Array of signed 8-bit values.

Definition at line 178 of file Array.h.

typedef Array< 2, uint16_t > PolyVox::Array2DUint16

A 2D Array of unsigned 16-bit values.

Definition at line 184 of file Array.h.

typedef Array< 2, uint32_t > PolyVox::Array2DUint32

A 2D Array of unsigned 32-bit values.

Definition at line 188 of file Array.h.

typedef Array< 2, uint8_t > PolyVox::Array2DUint8

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.

typedef Array< 3, int16_t > PolyVox::Array3DInt16

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.

typedef Array< 3, int8_t > PolyVox::Array3DInt8

A 3D Array of signed 8-bit values.

Definition at line 195 of file Array.h.

typedef Array< 3, uint16_t > PolyVox::Array3DUint16

A 3D Array of unsigned 16-bit values.

Definition at line 201 of file Array.h.

typedef Array< 3, uint32_t > PolyVox::Array3DUint32

A 3D Array of unsigned 32-bit values.

Definition at line 205 of file Array.h.

typedef Array< 3, uint8_t > PolyVox::Array3DUint8

A 3D Array of unsigned 8-bit values.

Definition at line 197 of file Array.h.

Definition at line 140 of file Density.h.

typedef Density<uint32_t> PolyVox::Density32

Definition at line 141 of file Density.h.

Definition at line 139 of file Density.h.

Definition at line 78 of file PolyVoxForwardDeclarations.h.

Definition at line 142 of file Density.h.

typedef Density<int16_t> PolyVox::DensityI16

Definition at line 75 of file PolyVoxForwardDeclarations.h.

typedef Density<int8_t> PolyVox::DensityI8

Definition at line 71 of file PolyVoxForwardDeclarations.h.

typedef Density<uint16_t> PolyVox::DensityU16

Definition at line 76 of file PolyVoxForwardDeclarations.h.

typedef Density<uint8_t> PolyVox::DensityU8

Definition at line 74 of file PolyVoxForwardDeclarations.h.

Definition at line 75 of file Material.h.

Definition at line 99 of file PolyVoxForwardDeclarations.h.

Definition at line 74 of file Material.h.

Definition at line 144 of file MaterialDensityPair.h.

Definition at line 145 of file MaterialDensityPair.h.

typedef Material<uint16_t> PolyVox::MaterialU16

Definition at line 94 of file PolyVoxForwardDeclarations.h.

typedef Material<uint32_t> PolyVox::MaterialU32

Definition at line 95 of file PolyVoxForwardDeclarations.h.

typedef Material<uint8_t> PolyVox::MaterialU8

Definition at line 91 of file PolyVoxForwardDeclarations.h.

Definition at line 37 of file SimpleInterface.h.

Definition at line 42 of file Raycast.h.

typedef Vector< 3, double > PolyVox::Vector3DDouble

A 3D Vector of doubles.

Definition at line 144 of file PolyVoxForwardDeclarations.h.

A 3D Vector of floats.

Definition at line 142 of file PolyVoxForwardDeclarations.h.

typedef Vector< 3, int16_t > PolyVox::Vector3DInt16

A 3D Vector of signed 16-bit values.

Definition at line 147 of file PolyVoxForwardDeclarations.h.

A 3D Vector of signed 32-bit values.

Definition at line 149 of file PolyVoxForwardDeclarations.h.

typedef Vector< 3, int8_t > PolyVox::Vector3DInt8

A 3D Vector of signed 8-bit values.

Definition at line 145 of file PolyVoxForwardDeclarations.h.

typedef Vector< 3, uint16_t > PolyVox::Vector3DUint16

A 3D Vector of unsigned 16-bit values.

Definition at line 148 of file PolyVoxForwardDeclarations.h.

typedef Vector< 3, uint32_t > PolyVox::Vector3DUint32

A 3D Vector of unsigned 32-bit values.

Definition at line 150 of file PolyVoxForwardDeclarations.h.

typedef Vector< 3, uint8_t > PolyVox::Vector3DUint8

A 3D Vector of unsigned 8-bit values.

Definition at line 146 of file PolyVoxForwardDeclarations.h.

Definition at line 36 of file SimpleInterface.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 32 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 45 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 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.

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::extractCubicMesh ( Volume &  volume,
const Region &  region,
Mesh &  resultMesh 
)
Deprecated:

Definition at line 32 of file SimpleInterface.cpp.

+ Here is the call graph for this function:

void PolyVox::extractSmoothMesh ( Volume &  volume,
const Region &  region,
Mesh &  resultMesh 
)
Deprecated:

Definition at line 38 of file SimpleInterface.cpp.

+ Here is the call graph for this function:

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.

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

Definition at line 32 of file Interpolation.h.

Referenced by bilerp(), and trilerp().

template<typename VolumeType >
bool PolyVox::loadVersion0 ( std::istream &  stream,
VolumeType &  volume,
VolumeSerializationProgressListener *  progressListener = 0 
)
Deprecated:

Definition at line 308 of file Serialization.inl.

Referenced by loadVolume().

+ Here is the call graph for this function:

template<typename VolumeType >
bool PolyVox::loadVolume ( std::istream &  stream,
VolumeType &  volume,
VolumeSerializationProgressListener *  progressListener = 0 
)
Deprecated:

Definition at line 269 of file Serialization.inl.

+ Here is the call graph for this function:

template<typename VolumeType >
polyvox_shared_ptr< VolumeType > PolyVox::loadVolumeRaw ( std::istream &  stream,
VolumeSerializationProgressListener *  progressListener = 0 
)
Deprecated:

Definition at line 29 of file Serialization.inl.

+ Here is the call graph for this function:

template<typename VolumeType >
polyvox_shared_ptr< VolumeType > PolyVox::loadVolumeRle ( std::istream &  stream,
VolumeSerializationProgressListener *  progressListener = 0 
)
Deprecated:

Definition at line 129 of file Serialization.inl.

+ Here is the call graph for this function:

uint8_t PolyVox::logBase2 ( uint32_t  uInput)
template<uint32_t Size, typename Type >
Vector< Size, Type > PolyVox::operator* ( const Vector< Size, Type > &  lhs,
const Vector< Size, Type > &  rhs 
)

Multiplication operator.

Multiplication operator mulitplies corresponding elements of the two Vectors.

Parameters:
lhsVector to multiply.
rhsVector to multiply by.
Returns:
The resulting Vector.

Definition at line 310 of file Vector.inl.

template<uint32_t Size, typename Type >
Vector< Size, Type > PolyVox::operator* ( const Vector< Size, Type > &  lhs,
const Type &  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 338 of file Vector.inl.

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

Definition at line 114 of file Density.h.

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

Addition operator.

Addition operator adds corresponding elements of the two Vectors.

Parameters:
lhsVector to add to.
rhsVector to add.
Returns:
The resulting Vector.

Definition at line 282 of file Vector.inl.

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

Definition at line 122 of file Density.h.

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

Subtraction operator.

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

Parameters:
lhsVector to subtract from.
rhsVector to subtract.
Returns:
The resulting Vector.

Definition at line 296 of file Vector.inl.

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

Definition at line 130 of file Density.h.

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

Division operator.

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

Parameters:
lhsVector to divide.
rhsVector to divide by.
Returns:
The resulting Vector.

Definition at line 324 of file Vector.inl.

template<uint32_t Size, typename Type >
Vector< Size, Type > PolyVox::operator/ ( const Vector< Size, Type > &  lhs,
const Type &  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 352 of file Vector.inl.

template<uint32_t Size, typename Type >
std::ostream & PolyVox::operator<< ( std::ostream &  os,
const Vector< Size, Type > &  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 366 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:

template<typename VolumeType >
bool PolyVox::saveVersion0 ( std::ostream &  stream,
VolumeType &  volume,
VolumeSerializationProgressListener *  progressListener = 0 
)
Deprecated:

Definition at line 368 of file Serialization.inl.

Referenced by saveVolume().

+ Here is the call graph for this function:

template<typename VolumeType >
bool PolyVox::saveVolume ( std::ostream &  stream,
VolumeType &  volume,
VolumeSerializationProgressListener *  progressListener = 0 
)
Deprecated:

Definition at line 294 of file Serialization.inl.

+ Here is the call graph for this function:

template<typename VolumeType >
void PolyVox::saveVolumeRaw ( std::ostream &  stream,
VolumeType &  volume,
VolumeSerializationProgressListener *  progressListener = 0 
)
Deprecated:

Definition at line 80 of file Serialization.inl.

+ Here is the call graph for this function:

template<typename VolumeType >
void PolyVox::saveVolumeRle ( std::ostream &  stream,
VolumeType &  volume,
VolumeSerializationProgressListener *  progressListener = 0 
)
Deprecated:

Definition at line 194 of file Serialization.inl.

+ 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 63 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.