PolyVox  0.3.0-dev
Open source voxel management library
Public Member Functions | Static Public Attributes | List of all members
PolyVox::Region Class Reference

Represents a part of a Volume. More...

#include <Region.h>

+ Collaboration diagram for PolyVox::Region:

Public Member Functions

 Region ()
 Constructor.
 
 Region (const Vector3DInt32 &v3dLowerCorner, const Vector3DInt32 &v3dUpperCorner)
 Constructor.
 
 Region (int32_t iLowerX, int32_t iLowerY, int32_t iLowerZ, int32_t iUpperX, int32_t iUpperY, int32_t iUpperZ)
 Constructor.
 
bool operator== (const Region &rhs) const
 Equality Operator.
 
bool operator!= (const Region &rhs) const
 Inequality Operator.
 
int32_t getLowerX (void) const
 Gets the 'x' position of the lower corner.
 
int32_t getLowerY (void) const
 Gets the 'y' position of the lower corner.
 
int32_t getLowerZ (void) const
 Gets the 'z' position of the lower corner.
 
int32_t getUpperX (void) const
 Gets the 'x' position of the upper corner.
 
int32_t getUpperY (void) const
 Gets the 'y' position of the upper corner.
 
int32_t getUpperZ (void) const
 Gets the 'z' position of the upper corner.
 
Vector3DInt32 getLowerCorner (void) const
 Gets the position of the lower corner.
 
Vector3DInt32 getUpperCorner (void) const
 Gets the position of the upper corner.
 
int32_t getWidthInVoxels (void) const
 Gets the width of the region measured in voxels.
 
int32_t getHeightInVoxels (void) const
 Gets the height of the region measured in voxels.
 
int32_t getDepthInVoxels (void) const
 Gets the depth of the region measured in voxels.
 
Vector3DInt32 getDimensionsInVoxels (void) const
 Gets the dimensions of the region measured in voxels.
 
int32_t getWidthInCells (void) const
 Gets the width of the region measured in cells.
 
int32_t getHeightInCells (void) const
 Gets the height of the region measured in cells.
 
int32_t getDepthInCells (void) const
 Gets the depth of the region measured in cells.
 
Vector3DInt32 getDimensionsInCells (void) const
 Gets the dimensions of the region measured in cells.
 
void setLowerX (int32_t iX)
 Sets the 'x' position of the lower corner.
 
void setLowerY (int32_t iY)
 Sets the 'y' position of the lower corner.
 
void setLowerZ (int32_t iZ)
 Sets the 'z' position of the lower corner.
 
void setUpperX (int32_t iX)
 Sets the 'x' position of the upper corner.
 
void setUpperY (int32_t iY)
 Sets the 'y' position of the upper corner.
 
void setUpperZ (int32_t iZ)
 Sets the 'z' position of the upper corner.
 
void setLowerCorner (const Vector3DInt32 &v3dLowerCorner)
 Sets the position of the lower corner.
 
void setUpperCorner (const Vector3DInt32 &v3dUpperCorner)
 Sets the position of the upper corner.
 
bool containsPoint (float fX, float fY, float fZ, float boundary=0.0f) const
 Tests whether the given point is contained in this Region.
 
bool containsPoint (const Vector3DFloat &pos, float boundary=0.0f) const
 Tests whether the given point is contained in this Region.
 
bool containsPoint (int32_t iX, int32_t iY, int32_t iZ, uint8_t boundary=0) const
 Tests whether the given point is contained in this Region.
 
bool containsPoint (const Vector3DInt32 &pos, uint8_t boundary=0) const
 Tests whether the given point is contained in this Region.
 
bool containsPointInX (float pos, float boundary=0.0f) const
 Tests whether the given position is contained in the 'x' range of this Region.
 
bool containsPointInX (int32_t pos, uint8_t boundary=0) const
 Tests whether the given position is contained in the 'x' range of this Region.
 
bool containsPointInY (float pos, float boundary=0.0f) const
 Tests whether the given position is contained in the 'y' range of this Region.
 
bool containsPointInY (int32_t pos, uint8_t boundary=0) const
 Tests whether the given position is contained in the 'y' range of this Region.
 
bool containsPointInZ (float pos, float boundary=0.0f) const
 Tests whether the given position is contained in the 'z' range of this Region.
 
bool containsPointInZ (int32_t pos, uint8_t boundary=0) const
 Tests whether the given position is contained in the 'z' range of this Region.
 
void accumulate (int32_t iX, int32_t iY, int32_t iZ)
 Enlarges the Region so that it contains the specified position.
 
void accumulate (const Vector3DInt32 &v3dPos)
 Enlarges the Region so that it contains the specified position.
 
void accumulate (const Region &reg)
 Enlarges the Region so that it contains the specified Region.
 
void cropTo (const Region &other)
 Crops the extents of this Region accoring to another Region.
 
void grow (int32_t iAmount)
 Grows this region by the amount specified.
 
void grow (int32_t iAmountX, int32_t iAmountY, int32_t iAmountZ)
 Grows this region by the amounts specified.
 
void grow (const Vector3DInt32 &v3dAmount)
 Grows this region by the amounts specified.
 
bool isValid (void) const
 Tests whether all components of the upper corner are at least as great as the corresponding components of the lower corner.
 
void shift (int32_t iAmountX, int32_t iAmountY, int32_t iAmountZ)
 Moves the Region by the amount specified.
 
void shift (const Vector3DInt32 &v3dAmount)
 Moves the Region by the amount specified.
 
void shiftLowerCorner (int32_t iAmountX, int32_t iAmountY, int32_t iAmountZ)
 Moves the lower corner of the Region by the amount specified.
 
void shiftLowerCorner (const Vector3DInt32 &v3dAmount)
 Moves the lower corner of the Region by the amount specified.
 
void shiftUpperCorner (int32_t iAmountX, int32_t iAmountY, int32_t iAmountZ)
 Moves the upper corner of the Region by the amount specified.
 
void shiftUpperCorner (const Vector3DInt32 &v3dAmount)
 Moves the upper corner of the Region by the amount specified.
 
void shrink (int32_t iAmount)
 Shrinks this region by the amount specified.
 
void shrink (int32_t iAmountX, int32_t iAmountY, int32_t iAmountZ)
 Shrinks this region by the amounts specified.
 
void shrink (const Vector3DInt32 &v3dAmount)
 Shrinks this region by the amounts specified.
 

Static Public Attributes

static const Region MaxRegion
 A Region with the lower corner set as low as possible and the upper corner set as high as possible.
 
static const Region InvertedRegion
 A Region with the lower corner set as high as possible and the upper corner set as low as possible.
 

Detailed Description

Represents a part of a Volume.

Many operations in PolyVox are constrained to only part of a volume. For example, when running the surface extractors it is unlikely that you will want to run it on the whole volume at once, as this will give a very large mesh which may be too much to render. Instead you will probably want to run a surface extractor a number of times on different parts of the volume, there by giving a number of meshes which can be culled and rendered seperately.

The Region class is used to define these parts (regions) of the volume. Essentially it consists of an upper and lower bound which specify the range of voxels positions considered to be part of the region. Note that these bounds are inclusive.

As well as the expected set of getters and setters, this class also provide utility functions for increasing and decresing the size of the Region, shifting the Region in 3D space, testing whether it contains a given position, enlarging it so that it does contain a given position, croppng it to another Region, and various other utility functions.

The dimensions of a region can be measured either in voxels or in cells. See the manual for more information about these definitions.

Definition at line 55 of file Region.h.

Constructor & Destructor Documentation

PolyVox::Region::Region ( )

Constructor.

Constructs a Region and clears all extents to zero.

Definition at line 94 of file Region.cpp.

PolyVox::Region::Region ( const Vector3DInt32 v3dLowerCorner,
const Vector3DInt32 v3dUpperCorner 
)

Constructor.

Constructs a Region and sets the lower and upper corners to the specified values.

Parameters
v3dLowerCornerThe desired lower corner of the Region.
v3dUpperCornerThe desired upper corner of the Region.

Definition at line 109 of file Region.cpp.

PolyVox::Region::Region ( int32_t  iLowerX,
int32_t  iLowerY,
int32_t  iLowerZ,
int32_t  iUpperX,
int32_t  iUpperY,
int32_t  iUpperZ 
)

Constructor.

Constructs a Region and sets the extents to the specified values.

Parameters
iLowerXThe desired lower 'x' extent of the Region.
iLowerYThe desired lower 'y' extent of the Region.
iLowerZThe desired lower 'z' extent of the Region.
iUpperXThe desired upper 'x' extent of the Region.
iUpperYThe desired upper 'y' extent of the Region.
iUpperZThe desired upper 'z' extent of the Region.

Definition at line 128 of file Region.cpp.

Member Function Documentation

void PolyVox::Region::accumulate ( int32_t  iX,
int32_t  iY,
int32_t  iZ 
)

Enlarges the Region so that it contains the specified position.

Parameters
iXThe 'x' component of the position to accumulate.
iYThe 'y' component of the position to accumulate.
iZThe 'z' component of the position to accumulate.

Definition at line 54 of file Region.cpp.

Referenced by accumulate().

void PolyVox::Region::accumulate ( const Vector3DInt32 v3dPos)

Enlarges the Region so that it contains the specified position.

Parameters
v3dPosThe position to accumulate.

Definition at line 67 of file Region.cpp.

+ Here is the call graph for this function:

void PolyVox::Region::accumulate ( const Region reg)

Enlarges the Region so that it contains the specified Region.

Note that this is not the same as computing the union of two Regions (as the result of such a union may not be a shape which can be exactly represented by a Region).

Instead, the result is simply big enough to contain both this Region and the one passed as a parameter.

Parameters
regThe Region to accumulate. This must be valid as defined by the isValid() function.
See Also
isValid()

Definition at line 79 of file Region.cpp.

+ Here is the call graph for this function:

bool PolyVox::Region::containsPoint ( float  fX,
float  fY,
float  fZ,
float  boundary = 0.0f 
) const

Tests whether the given point is contained in this Region.

The boundary value can be used to ensure a position is only considered to be inside the Region if it is that far in in all directions.

Also, the test is inclusive such that positions lying exactly on the edge of the Region are considered to be inside it.

Parameters
fXThe 'x' position of the point to test.
fYThe 'y' position of the point to test.
fZThe 'z' position of the point to test.
boundaryThe desired boundary value.

Definition at line 170 of file Region.cpp.

Referenced by containsPoint(), PolyVox::ConstVolumeProxy< VoxelType >::getVoxelAt(), and PolyVox::ConstVolumeProxy< VoxelType >::setVoxelAt().

bool PolyVox::Region::containsPoint ( const Vector3DFloat pos,
float  boundary = 0.0f 
) const

Tests whether the given point is contained in this Region.

The boundary value can be used to ensure a position is only considered to be inside the Region if it is that far in in all directions.

Also, the test is inclusive such that positions lying exactly on the edge of the Region are considered to be inside it.

Parameters
posThe position to test.
boundaryThe desired boundary value.

Definition at line 187 of file Region.cpp.

+ Here is the call graph for this function:

bool PolyVox::Region::containsPoint ( int32_t  iX,
int32_t  iY,
int32_t  iZ,
uint8_t  boundary = 0 
) const

Tests whether the given point is contained in this Region.

The boundary value can be used to ensure a position is only considered to be inside the Region if it is that far in in all directions.

Also, the test is inclusive such that positions lying exactly on the edge of the Region are considered to be inside it.

Parameters
iXThe 'x' position of the point to test.
iYThe 'y' position of the point to test.
iZThe 'z' position of the point to test.
boundaryThe desired boundary value.

Definition at line 201 of file Region.cpp.

bool PolyVox::Region::containsPoint ( const Vector3DInt32 pos,
uint8_t  boundary = 0 
) const

Tests whether the given point is contained in this Region.

The boundary value can be used to ensure a position is only considered to be inside the Region if it is that far in in all directions.

Also, the test is inclusive such that positions lying exactly on the edge of the Region are considered to be inside it.

Parameters
posThe position to test.
boundaryThe desired boundary value.

Definition at line 218 of file Region.cpp.

+ Here is the call graph for this function:

bool PolyVox::Region::containsPointInX ( float  pos,
float  boundary = 0.0f 
) const

Tests whether the given position is contained in the 'x' range of this Region.

The boundary value can be used to ensure a position is only considered to be inside the Region if it is that far in in the 'x' direction.

Also, the test is inclusive such that positions lying exactly on the edge of the Region are considered to be inside it.

Parameters
posThe position to test.
boundaryThe desired boundary value.

Definition at line 230 of file Region.cpp.

Referenced by PolyVox::BaseVolume< _VoxelType >::Sampler< DerivedVolumeType >::moveNegativeX(), and PolyVox::BaseVolume< _VoxelType >::Sampler< DerivedVolumeType >::movePositiveX().

bool PolyVox::Region::containsPointInX ( int32_t  pos,
uint8_t  boundary = 0 
) const

Tests whether the given position is contained in the 'x' range of this Region.

The boundary value can be used to ensure a position is only considered to be inside the Region if it is that far in in the 'x' direction.

Also, the test is inclusive such that positions lying exactly on the edge of the Region are considered to be inside it.

Parameters
posThe position to test.
boundaryThe desired boundary value.

Definition at line 243 of file Region.cpp.

bool PolyVox::Region::containsPointInY ( float  pos,
float  boundary = 0.0f 
) const

Tests whether the given position is contained in the 'y' range of this Region.

The boundary value can be used to ensure a position is only considered to be inside the Region if it is that far in in the 'y' direction.

Also, the test is inclusive such that positions lying exactly on the edge of the Region are considered to be inside it.

Parameters
posThe position to test.
boundaryThe desired boundary value.

Definition at line 256 of file Region.cpp.

Referenced by PolyVox::BaseVolume< _VoxelType >::Sampler< DerivedVolumeType >::moveNegativeY(), and PolyVox::BaseVolume< _VoxelType >::Sampler< DerivedVolumeType >::movePositiveY().

bool PolyVox::Region::containsPointInY ( int32_t  pos,
uint8_t  boundary = 0 
) const

Tests whether the given position is contained in the 'y' range of this Region.

The boundary value can be used to ensure a position is only considered to be inside the Region if it is that far in in the 'y' direction.

Also, the test is inclusive such that positions lying exactly on the edge of the Region are considered to be inside it.

Parameters
posThe position to test.
boundaryThe desired boundary value.

Definition at line 269 of file Region.cpp.

bool PolyVox::Region::containsPointInZ ( float  pos,
float  boundary = 0.0f 
) const

Tests whether the given position is contained in the 'z' range of this Region.

The boundary value can be used to ensure a position is only considered to be inside the Region if it is that far in in the 'z' direction.

Also, the test is inclusive such that positions lying exactly on the edge of the Region are considered to be inside it.

Parameters
posThe position to test.
boundaryThe desired boundary value.

Definition at line 282 of file Region.cpp.

Referenced by PolyVox::BaseVolume< _VoxelType >::Sampler< DerivedVolumeType >::moveNegativeZ(), and PolyVox::BaseVolume< _VoxelType >::Sampler< DerivedVolumeType >::movePositiveZ().

bool PolyVox::Region::containsPointInZ ( int32_t  pos,
uint8_t  boundary = 0 
) const

Tests whether the given position is contained in the 'z' range of this Region.

The boundary value can be used to ensure a position is only considered to be inside the Region if it is that far in in the 'z' direction.

Also, the test is inclusive such that positions lying exactly on the edge of the Region are considered to be inside it.

Parameters
posThe position to test.
boundaryThe desired boundary value.

Definition at line 295 of file Region.cpp.

void PolyVox::Region::cropTo ( const Region other)

Crops the extents of this Region accoring to another Region.

After calling this functions, the extents of this Region are given by the intersection of this Region and the one it was cropped to.

Parameters
otherThe Region to crop to.

Definition at line 306 of file Region.cpp.

int32_t PolyVox::Region::getDepthInCells ( void  ) const
inline

Gets the depth of the region measured in cells.

Returns
The depth of the region measured in cells.
See Also
getDepthInVoxels()

Definition at line 328 of file Region.h.

Referenced by getDepthInVoxels(), and getDimensionsInCells().

int32_t PolyVox::Region::getDepthInVoxels ( void  ) const
inline

Gets the depth of the region measured in voxels.

Returns
The depth of the region measured in voxels.
See Also
getDepthInCells()

Definition at line 292 of file Region.h.

+ Here is the call graph for this function:

Vector3DInt32 PolyVox::Region::getDimensionsInCells ( void  ) const
inline

Gets the dimensions of the region measured in cells.

Returns
The dimensions of the region measured in cells.
See Also
getDimensionsInVoxels()

Definition at line 337 of file Region.h.

Referenced by getDimensionsInVoxels().

+ Here is the call graph for this function:

Vector3DInt32 PolyVox::Region::getDimensionsInVoxels ( void  ) const
inline

Gets the dimensions of the region measured in voxels.

Returns
The dimensions of the region measured in voxels.
See Also
getDimensionsInCells()

Definition at line 301 of file Region.h.

+ Here is the call graph for this function:

int32_t PolyVox::Region::getHeightInCells ( void  ) const
inline

Gets the height of the region measured in cells.

Returns
The height of the region measured in cells.
See Also
getHeightInVoxels()

Definition at line 319 of file Region.h.

Referenced by getDimensionsInCells(), and getHeightInVoxels().

int32_t PolyVox::Region::getHeightInVoxels ( void  ) const
inline

Gets the height of the region measured in voxels.

Returns
The height of the region measured in voxels.
See Also
getHeightInCells()

Definition at line 283 of file Region.h.

+ Here is the call graph for this function:

Vector3DInt32 PolyVox::Region::getLowerCorner ( void  ) const
inline

Gets the position of the lower corner.

Returns
The position of the lower corner.

Definition at line 257 of file Region.h.

Referenced by PolyVox::LargeVolume< VoxelType >::flush(), and PolyVox::LargeVolume< VoxelType >::prefetch().

int32_t PolyVox::Region::getLowerX ( void  ) const
inline

Gets the 'x' position of the lower corner.

Returns
The 'x' position of the lower corner.

Definition at line 209 of file Region.h.

Referenced by accumulate(), and PolyVox::calculateAmbientOcclusion().

int32_t PolyVox::Region::getLowerY ( void  ) const
inline

Gets the 'y' position of the lower corner.

Returns
The 'y' position of the lower corner.

Definition at line 217 of file Region.h.

Referenced by accumulate(), and PolyVox::calculateAmbientOcclusion().

int32_t PolyVox::Region::getLowerZ ( void  ) const
inline

Gets the 'z' position of the lower corner.

Returns
The 'z' position of the lower corner.

Definition at line 225 of file Region.h.

Referenced by accumulate(), and PolyVox::calculateAmbientOcclusion().

Vector3DInt32 PolyVox::Region::getUpperCorner ( void  ) const
inline

Gets the position of the upper corner.

Returns
The position of the upper corner.

Definition at line 265 of file Region.h.

Referenced by PolyVox::LargeVolume< VoxelType >::flush(), PolyVox::MarchingCubesSurfaceExtractor< VolumeType, Controller >::MarchingCubesSurfaceExtractor(), and PolyVox::LargeVolume< VoxelType >::prefetch().

int32_t PolyVox::Region::getUpperX ( void  ) const
inline

Gets the 'x' position of the upper corner.

Returns
The 'x' position of the upper corner.

Definition at line 233 of file Region.h.

Referenced by accumulate(), and PolyVox::calculateAmbientOcclusion().

int32_t PolyVox::Region::getUpperY ( void  ) const
inline

Gets the 'y' position of the upper corner.

Returns
The 'y' position of the upper corner.

Definition at line 241 of file Region.h.

Referenced by accumulate(), and PolyVox::calculateAmbientOcclusion().

int32_t PolyVox::Region::getUpperZ ( void  ) const
inline

Gets the 'z' position of the upper corner.

Returns
The 'z' position of the upper corner.

Definition at line 249 of file Region.h.

Referenced by accumulate(), and PolyVox::calculateAmbientOcclusion().

int32_t PolyVox::Region::getWidthInCells ( void  ) const
inline

Gets the width of the region measured in cells.

Returns
The width of the region measured in cells.
See Also
getWidthInVoxels()

Definition at line 310 of file Region.h.

Referenced by getDimensionsInCells(), and getWidthInVoxels().

int32_t PolyVox::Region::getWidthInVoxels ( void  ) const
inline

Gets the width of the region measured in voxels.

Returns
The width of the region measured in voxels.
See Also
getWidthInCells()

Definition at line 274 of file Region.h.

+ Here is the call graph for this function:

void PolyVox::Region::grow ( int32_t  iAmount)

Grows this region by the amount specified.

The same amount of growth is applied in all directions.

Negative growth is possible but you should prefer the shrink() function for clarity.

Parameters
iAmountThe amount to grow by.

Definition at line 321 of file Region.cpp.

Referenced by grow().

void PolyVox::Region::grow ( int32_t  iAmountX,
int32_t  iAmountY,
int32_t  iAmountZ 
)

Grows this region by the amounts specified.

The amount can be specified seperatly for each direction.

Negative growth is possible but you should prefer the shrink() function for clarity.

Parameters
iAmountXThe amount to grow by in 'x'.
iAmountYThe amount to grow by in 'y'.
iAmountZThe amount to grow by in 'z'.

Definition at line 339 of file Region.cpp.

void PolyVox::Region::grow ( const Vector3DInt32 v3dAmount)

Grows this region by the amounts specified.

The amount can be specified seperatly for each direction.

Negative growth is possible but you should prefer the shrink() function for clarity.

Parameters
v3dAmountThe amount to grow by (one component for each direction).

Definition at line 355 of file Region.cpp.

+ Here is the call graph for this function:

bool PolyVox::Region::isValid ( void  ) const

Tests whether all components of the upper corner are at least as great as the corresponding components of the lower corner.

Definition at line 362 of file Region.cpp.

Referenced by accumulate().

bool PolyVox::Region::operator!= ( const Region rhs) const

Inequality Operator.

Two regions are considered different if any of their extents differ.

Parameters
rhsThe Region to compare to.
Returns
true if the Regions are different.
See Also
operator==

Definition at line 156 of file Region.cpp.

bool PolyVox::Region::operator== ( const Region rhs) const

Equality Operator.

Two regions are considered equal if all their extents match.

Parameters
rhsThe Region to compare to.
Returns
true if the Regions match.
See Also
operator!=

Definition at line 144 of file Region.cpp.

void PolyVox::Region::setLowerCorner ( const Vector3DInt32 v3dLowerCorner)
inline

Sets the position of the lower corner.

Parameters
v3dLowerCornerThe new position of the lower corner.

Definition at line 393 of file Region.h.

+ Here is the call graph for this function:

void PolyVox::Region::setLowerX ( int32_t  iX)
inline

Sets the 'x' position of the lower corner.

Parameters
iXThe new 'x' position of the lower corner.

Definition at line 345 of file Region.h.

void PolyVox::Region::setLowerY ( int32_t  iY)
inline

Sets the 'y' position of the lower corner.

Parameters
iYThe new 'y' position of the lower corner.

Definition at line 353 of file Region.h.

void PolyVox::Region::setLowerZ ( int32_t  iZ)
inline

Sets the 'z' position of the lower corner.

Parameters
iZThe new 'z' position of the lower corner.

Definition at line 361 of file Region.h.

void PolyVox::Region::setUpperCorner ( const Vector3DInt32 v3dUpperCorner)
inline

Sets the position of the upper corner.

Parameters
v3dUpperCornerThe new position of the upper corner.

Definition at line 403 of file Region.h.

Referenced by PolyVox::MarchingCubesSurfaceExtractor< VolumeType, Controller >::MarchingCubesSurfaceExtractor().

+ Here is the call graph for this function:

void PolyVox::Region::setUpperX ( int32_t  iX)
inline

Sets the 'x' position of the upper corner.

Parameters
iXThe new 'x' position of the upper corner.

Definition at line 369 of file Region.h.

void PolyVox::Region::setUpperY ( int32_t  iY)
inline

Sets the 'y' position of the upper corner.

Parameters
iYThe new 'y' position of the upper corner.

Definition at line 377 of file Region.h.

void PolyVox::Region::setUpperZ ( int32_t  iZ)
inline

Sets the 'z' position of the upper corner.

Parameters
iZThe new 'z' position of the upper corner.

Definition at line 385 of file Region.h.

void PolyVox::Region::shift ( int32_t  iAmountX,
int32_t  iAmountY,
int32_t  iAmountZ 
)

Moves the Region by the amount specified.

Parameters
iAmountXThe amount to move the Region by in 'x'.
iAmountYThe amount to move the Region by in 'y'.
iAmountZThe amount to move the Region by in 'z'.

Definition at line 372 of file Region.cpp.

+ Here is the call graph for this function:

void PolyVox::Region::shift ( const Vector3DInt32 v3dAmount)

Moves the Region by the amount specified.

Parameters
v3dAmountThe amount to move the Region by.

Definition at line 381 of file Region.cpp.

+ Here is the call graph for this function:

void PolyVox::Region::shiftLowerCorner ( int32_t  iAmountX,
int32_t  iAmountY,
int32_t  iAmountZ 
)

Moves the lower corner of the Region by the amount specified.

Parameters
iAmountXThe amount to move the lower corner by in 'x'.
iAmountYThe amount to move the lower corner by in 'y'.
iAmountZThe amount to move the lower corner by in 'z'.

Definition at line 392 of file Region.cpp.

Referenced by shift(), and shiftLowerCorner().

void PolyVox::Region::shiftLowerCorner ( const Vector3DInt32 v3dAmount)

Moves the lower corner of the Region by the amount specified.

Parameters
v3dAmountThe amount to move the lower corner by.

Definition at line 402 of file Region.cpp.

+ Here is the call graph for this function:

void PolyVox::Region::shiftUpperCorner ( int32_t  iAmountX,
int32_t  iAmountY,
int32_t  iAmountZ 
)

Moves the upper corner of the Region by the amount specified.

Parameters
iAmountXThe amount to move the upper corner by in 'x'.
iAmountYThe amount to move the upper corner by in 'y'.
iAmountZThe amount to move the upper corner by in 'z'.

Definition at line 412 of file Region.cpp.

Referenced by shift(), and shiftUpperCorner().

void PolyVox::Region::shiftUpperCorner ( const Vector3DInt32 v3dAmount)

Moves the upper corner of the Region by the amount specified.

Parameters
v3dAmountThe amount to move the upper corner by.

Definition at line 422 of file Region.cpp.

+ Here is the call graph for this function:

void PolyVox::Region::shrink ( int32_t  iAmount)

Shrinks this region by the amount specified.

The same amount of shrinkage is applied in all directions.

Negative shrinkage is possible but you should prefer the grow() function for clarity.

Parameters
iAmountThe amount to shrink by.

Definition at line 432 of file Region.cpp.

Referenced by shrink().

void PolyVox::Region::shrink ( int32_t  iAmountX,
int32_t  iAmountY,
int32_t  iAmountZ 
)

Shrinks this region by the amounts specified.

The amount can be specified seperatly for each direction.

Negative shrinkage is possible but you should prefer the grow() function for clarity.

Parameters
iAmountXThe amount to shrink by in 'x'.
iAmountYThe amount to shrink by in 'y'.
iAmountZThe amount to shrink by in 'z'.

Definition at line 450 of file Region.cpp.

void PolyVox::Region::shrink ( const Vector3DInt32 v3dAmount)

Shrinks this region by the amounts specified.

The amount can be specified seperatly for each direction.

Negative shrinkage is possible but you should prefer the grow() function for clarity.

Parameters
v3dAmountThe amount to shrink by (one component for each direction).

Definition at line 466 of file Region.cpp.

+ Here is the call graph for this function:

Member Data Documentation

const Region PolyVox::Region::InvertedRegion
static

A Region with the lower corner set as high as possible and the upper corner set as low as possible.

This Region is not considered valid as defined by isValid().

It's main application is to initialise a Region to this value and then() accumulate positions. The result of this will be a Region which encompasses all positions specified.

Definition at line 63 of file Region.h.

const Region PolyVox::Region::MaxRegion
static

A Region with the lower corner set as low as possible and the upper corner set as high as possible.

Definition at line 61 of file Region.h.

Referenced by PolyVox::LargeVolume< VoxelType >::LargeVolume().


The documentation for this class was generated from the following files: