Public Member Functions

PolyVox::Vector< Size, Type > Class Template Reference

Represents a vector in space. More...

#include <Vector.h>

Inheritance diagram for PolyVox::Vector< Size, Type >:
Collaboration diagram for PolyVox::Vector< Size, Type >:

List of all members.

Public Member Functions

 Vector (Type x, Type y) throw ()
 Constructor.
 Vector (Type x, Type y, Type z) throw ()
 Constructor.
 Vector (Type x, Type y, Type z, Type w) throw ()
 Constructor.
 Vector (void) throw ()
 Constructor.
 Vector (const Vector< Size, Type > &vector) throw ()
 Copy Constructor.
template<typename CastType >
 Vector (const Vector< Size, CastType > &vector) throw ()
 Copy Constructor which performs casting.
 ~Vector (void) throw ()
 Destructor.
Vector< Size, Type > & operator= (const Vector< Size, Type > &rhs) throw ()
 Assignment Operator.
bool operator== (const Vector< Size, Type > &rhs) const throw ()
 Equality Operator.
bool operator!= (const Vector< Size, Type > &rhs) const throw ()
 Inequality Operator.
bool operator< (const Vector< Size, Type > &rhs) const throw ()
 Comparison Operator.
Vector< Size, Type > & operator+= (const Vector< Size, Type > &rhs) throw ()
 Addition and Assignment Operator.
Vector< Size, Type > & operator-= (const Vector< Size, Type > &rhs) throw ()
 Subtraction and Assignment Operator.
Vector< Size, Type > & operator*= (const Vector< Size, Type > &rhs) throw ()
 Multiplication and Assignment Operator.
Vector< Size, Type > & operator/= (const Vector< Size, Type > &rhs) throw ()
 Division and Assignment Operator.
Vector< Size, Type > & operator*= (const Type &rhs) throw ()
 Multiplication and Assignment Operator.
Vector< Size, Type > & operator/= (const Type &rhs) throw ()
 Division and Assignment Operator.
Type getElement (uint32_t index) const throw ()
 Element Access.
Type getX (void) const throw ()
 Get the x component of the vector.
Type getY (void) const throw ()
 Get the y component of the vector.
Type getZ (void) const throw ()
 Get the z component of the vector.
Type getW (void) const throw ()
 Get the w component of the vector.
void setElement (uint32_t index, Type tValue) throw ()
 Element Access.
void setElements (Type x, Type y) throw ()
 Element Access.
void setElements (Type x, Type y, Type z) throw ()
 Element Access.
void setElements (Type x, Type y, Type z, Type w) throw ()
 Element Access.
void setX (Type tX) throw ()
 Set the x component of the vector.
void setY (Type tY) throw ()
 Set the y component of the vector.
void setZ (Type tZ) throw ()
 Set the z component of the vector.
void setW (Type tW) throw ()
 Set the w component of the vector.
double length (void) const throw ()
 Get the length of the vector.
double lengthSquared (void) const throw ()
 Get the squared length of the vector.
double angleTo (const Vector< Size, Type > &vector) const throw ()
 Find the angle between this vector and that which is passed as a parameter.
Vector< Size, Type > cross (const Vector< Size, Type > &vector) const throw ()
 Find the cross product between this vector and the vector passed as a parameter.
Type dot (const Vector< Size, Type > &rhs) const throw ()
 Find the dot product between this vector and the vector passed as a parameter.
void normalise (void) throw ()
 Normalise the vector.

Detailed Description

template<uint32_t Size, typename Type>
class PolyVox::Vector< Size, Type >

Represents a vector in space.

This Vector class is templated on both size and data type. It is designed to be generic but so far had only been tested with vectors of size 2 and 3. Also note that some of the operations do not make sense with integer types, for example it does not make conceptual sense to try and normalise an integer Vector.

The elements of the Vector are accessed via the overloaded () operator which takes an index indicating the element to fetch. They are set using the set() function which takes an index indicating the element to set and a new value for that element. For convienience, the functions getX(), setX(), getY(), setY(), getZ(), setZ(), getw() and setW() do the same thing for the first 4 elements of the Vector.

A variety of overloaded operators are also provided for comparison and arithmetic operations. For most of these arithmetic operators only the unary versions are documented below - however often binary versions are also generated by std::operators.

Lastly, note that for convienience a set of typedefs are included for 2 and 3 dimensional vectors with type float, double, int32_t, and uint32_t. They are used as follows:

    Vector2DInt4 test(1,2); //Declares a 2 dimensional Vector of type int4.

Definition at line 62 of file Vector.h.


Constructor & Destructor Documentation

template<uint32_t Size, typename Type>
PolyVox::Vector< Size, Type >::Vector ( Type  x,
Type  y 
) throw ()

Constructor.

Creates a Vector object and initialises it with given values.

Parameters:
x x component to set.
y y component to set.

Definition at line 33 of file Vector.inl.

template<uint32_t Size, typename Type>
PolyVox::Vector< Size, Type >::Vector ( Type  x,
Type  y,
Type  z 
) throw ()

Constructor.

Creates a Vector3D object and initialises it with given values.

Parameters:
x x component to set.
y y component to set.
z z component to set.

Definition at line 47 of file Vector.inl.

template<uint32_t Size, typename Type>
PolyVox::Vector< Size, Type >::Vector ( Type  x,
Type  y,
Type  z,
Type  w 
) throw ()

Constructor.

Creates a Vector3D object and initialises it with given values.

Parameters:
x x component to set.
y y component to set.
z z component to set.
w w component to set.

Definition at line 63 of file Vector.inl.

template<uint32_t Size, typename Type>
PolyVox::Vector< Size, Type >::Vector ( void   )  throw ()

Constructor.

Creates a Vector object but does not initialise it.

Definition at line 75 of file Vector.inl.

template<uint32_t Size, typename Type>
PolyVox::Vector< Size, Type >::Vector ( const Vector< Size, Type > &  vector  )  throw ()

Copy Constructor.

Copy constructor builds object based on object passed as parameter.

Parameters:
vector A reference to the Vector to be copied.

Definition at line 84 of file Vector.inl.

template<uint32_t Size, typename Type >
template<typename CastType >
PolyVox::Vector< Size, Type >::Vector ( const Vector< Size, CastType > &  vector  )  throw () [explicit]

Copy Constructor which performs casting.

This copy constructor allows casting between vectors with different data types.

It is now possible to use code such as:

Vector3DDouble v3dDouble(1.0,2.0,3.0); Vector3DFloat v3dFloat = static_cast<Vector3DFloat>(v3dDouble); //Casting

Parameters:
vector A reference to the Vector to be copied.

Definition at line 100 of file Vector.inl.

template<uint32_t Size, typename Type >
PolyVox::Vector< Size, Type >::~Vector ( void   )  throw ()

Destructor.

Destroys the Vector.

Definition at line 112 of file Vector.inl.


Member Function Documentation

template<uint32_t Size, typename Type>
double PolyVox::Vector< Size, Type >::angleTo ( const Vector< Size, Type > &  vector  )  const throw () [inline]

Find the angle between this vector and that which is passed as a parameter.

This function is commutative, such that a.angleTo(b) == b.angleTo(a).

The angle returned is in radians and varies between 0 and 3.14(pi). It is always positive.

NOTE: This function does not make much sense on integer Vectors.

Parameters:
Vector3D The Vector to find the angle to.
Returns:
The angle between them in radians.

Definition at line 552 of file Vector.inl.

template<uint32_t Size, typename Type>
Vector< Size, Type > PolyVox::Vector< Size, Type >::cross ( const Vector< Size, Type > &  vector  )  const throw () [inline]

Find the cross product between this vector and the vector passed as a parameter.

This function is used to calculate the cross product of two Vectors.

The cross product is the Vector which is perpendicular to the two given Vectors. It is worth remembering that, unlike the dot product, it is not commutative. E.g a.b != b.a. The cross product obeys the right-hand rule such that if the two vectors are given by the index finger and middle finger respectively then the cross product is given by the thumb.

Parameters:
a first Vector.
b Second Vector.
Returns:
The value of the cross product.
See also:
dot()

Definition at line 571 of file Vector.inl.

template<uint32_t Size, typename Type>
Type PolyVox::Vector< Size, Type >::dot ( const Vector< Size, Type > &  rhs  )  const throw () [inline]

Find the dot product between this vector and the vector passed as a parameter.

Calculates the dot product of the Vector and the parameter.

This function is commutative, such that a.dot(b) == b.dot(a).

Parameters:
rhs The Vector to find the dot product with.
Returns:
The value of the dot product.
See also:
cross()

Definition at line 587 of file Vector.inl.

template<uint32_t Size, typename Type >
Type PolyVox::Vector< Size, Type >::getElement ( uint32_t  index  )  const throw () [inline]

Element Access.

Returns the element at the given position.

Parameters:
index The index of the element to return.
Returns:
The element.

Definition at line 387 of file Vector.inl.

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

template<uint32_t Size, typename Type >
Type PolyVox::Vector< Size, Type >::getW ( void   )  const throw () [inline]

Get the w component of the vector.

Returns:
A const reference to the W component of a 4 dimensional Vector.

Definition at line 423 of file Vector.inl.

template<uint32_t Size, typename Type >
Type PolyVox::Vector< Size, Type >::getX ( void   )  const throw () [inline]

Get the x component of the vector.

Returns:
A const reference to the X component of a 1, 2, 3, or 4 dimensional Vector.

Definition at line 396 of file Vector.inl.

Referenced by PolyVox::AmbientOcclusionCalculator< VolumeType, VoxelType >::AmbientOcclusionCalculator(), PolyVox::Region::containsPoint(), PolyVox::Region::containsPointInX(), PolyVox::Region::cropTo(), PolyVox::VolumeResampler< SrcVolumeType, DestVolumeType, VoxelType >::execute(), PolyVox::SurfaceExtractor< VolumeType, VoxelType >::execute(), PolyVox::RaycastWithCallback< VolumeType, VoxelType >::execute(), PolyVox::Raycast< VolumeType, VoxelType >::execute(), PolyVox::LowPassFilter< SrcVolumeType, DestVolumeType, VoxelType >::execute(), PolyVox::CubicSurfaceExtractorWithNormals< VolumeType, VoxelType >::execute(), PolyVox::CubicSurfaceExtractor< VolumeType, VoxelType >::execute(), PolyVox::AmbientOcclusionCalculator< VolumeType, VoxelType >::execute(), PolyVox::LowPassFilter< SrcVolumeType, DestVolumeType, VoxelType >::executeSAT(), PolyVox::LargeVolume< VoxelType >::flush(), PolyVox::SimpleVolume< VoxelType >::Block::getVoxelAt(), PolyVox::SimpleVolume< VoxelType >::getVoxelAt(), PolyVox::RawVolume< VoxelType >::getVoxelAt(), PolyVox::LargeVolume< VoxelType >::getVoxelAt(), PolyVox::ConstVolumeProxy< VoxelType >::getVoxelAt(), PolyVox::BaseVolume< VoxelType >::getWidth(), PolyVox::IteratorController< IteratorType >::moveForward(), PolyVox::LargeVolume< VoxelType >::prefetch(), PolyVox::Region::Region(), PolyVox::SimpleVolume< VoxelType >::resize(), PolyVox::SimpleVolume< VoxelType >::Sampler::setPosition(), PolyVox::RawVolume< VoxelType >::Sampler::setPosition(), PolyVox::LargeVolume< VoxelType >::Sampler::setPosition(), PolyVox::BaseVolume< VoxelType >::Sampler< DerivedVolumeType >::setPosition(), PolyVox::SimpleVolume< VoxelType >::Block::setVoxelAt(), PolyVox::SimpleVolume< VoxelType >::setVoxelAt(), PolyVox::RawVolume< VoxelType >::setVoxelAt(), PolyVox::LargeVolume< VoxelType >::setVoxelAt(), PolyVox::ConstVolumeProxy< VoxelType >::setVoxelAt(), PolyVox::VolumeChangeTracker< VoxelType >::unlockRegion(), and PolyVox::Region::width().

template<uint32_t Size, typename Type >
Type PolyVox::Vector< Size, Type >::getY ( void   )  const throw () [inline]

Get the y component of the vector.

Returns:
A const reference to the Y component of a 2, 3, or 4 dimensional Vector.

Definition at line 405 of file Vector.inl.

Referenced by PolyVox::AmbientOcclusionCalculator< VolumeType, VoxelType >::AmbientOcclusionCalculator(), PolyVox::Region::containsPoint(), PolyVox::Region::containsPointInY(), PolyVox::Region::cropTo(), PolyVox::VolumeResampler< SrcVolumeType, DestVolumeType, VoxelType >::execute(), PolyVox::SurfaceExtractor< VolumeType, VoxelType >::execute(), PolyVox::RaycastWithCallback< VolumeType, VoxelType >::execute(), PolyVox::Raycast< VolumeType, VoxelType >::execute(), PolyVox::LowPassFilter< SrcVolumeType, DestVolumeType, VoxelType >::execute(), PolyVox::CubicSurfaceExtractorWithNormals< VolumeType, VoxelType >::execute(), PolyVox::CubicSurfaceExtractor< VolumeType, VoxelType >::execute(), PolyVox::AmbientOcclusionCalculator< VolumeType, VoxelType >::execute(), PolyVox::LowPassFilter< SrcVolumeType, DestVolumeType, VoxelType >::executeSAT(), PolyVox::LargeVolume< VoxelType >::flush(), PolyVox::BaseVolume< VoxelType >::getHeight(), PolyVox::SimpleVolume< VoxelType >::Block::getVoxelAt(), PolyVox::SimpleVolume< VoxelType >::getVoxelAt(), PolyVox::RawVolume< VoxelType >::getVoxelAt(), PolyVox::LargeVolume< VoxelType >::getVoxelAt(), PolyVox::ConstVolumeProxy< VoxelType >::getVoxelAt(), PolyVox::Region::height(), PolyVox::IteratorController< IteratorType >::moveForward(), PolyVox::LargeVolume< VoxelType >::prefetch(), PolyVox::Region::Region(), PolyVox::SimpleVolume< VoxelType >::resize(), PolyVox::SimpleVolume< VoxelType >::Sampler::setPosition(), PolyVox::RawVolume< VoxelType >::Sampler::setPosition(), PolyVox::LargeVolume< VoxelType >::Sampler::setPosition(), PolyVox::BaseVolume< VoxelType >::Sampler< DerivedVolumeType >::setPosition(), PolyVox::SimpleVolume< VoxelType >::Block::setVoxelAt(), PolyVox::SimpleVolume< VoxelType >::setVoxelAt(), PolyVox::RawVolume< VoxelType >::setVoxelAt(), PolyVox::LargeVolume< VoxelType >::setVoxelAt(), PolyVox::ConstVolumeProxy< VoxelType >::setVoxelAt(), and PolyVox::VolumeChangeTracker< VoxelType >::unlockRegion().

template<uint32_t Size, typename Type >
Type PolyVox::Vector< Size, Type >::getZ ( void   )  const throw () [inline]

Get the z component of the vector.

Returns:
A const reference to the Z component of a 3 or 4 dimensional Vector.

Definition at line 414 of file Vector.inl.

Referenced by PolyVox::AmbientOcclusionCalculator< VolumeType, VoxelType >::AmbientOcclusionCalculator(), PolyVox::Region::containsPoint(), PolyVox::Region::containsPointInZ(), PolyVox::Region::cropTo(), PolyVox::Region::depth(), PolyVox::VolumeResampler< SrcVolumeType, DestVolumeType, VoxelType >::execute(), PolyVox::SurfaceExtractor< VolumeType, VoxelType >::execute(), PolyVox::RaycastWithCallback< VolumeType, VoxelType >::execute(), PolyVox::Raycast< VolumeType, VoxelType >::execute(), PolyVox::LowPassFilter< SrcVolumeType, DestVolumeType, VoxelType >::execute(), PolyVox::CubicSurfaceExtractorWithNormals< VolumeType, VoxelType >::execute(), PolyVox::CubicSurfaceExtractor< VolumeType, VoxelType >::execute(), PolyVox::AmbientOcclusionCalculator< VolumeType, VoxelType >::execute(), PolyVox::LowPassFilter< SrcVolumeType, DestVolumeType, VoxelType >::executeSAT(), PolyVox::LargeVolume< VoxelType >::flush(), PolyVox::BaseVolume< VoxelType >::getDepth(), PolyVox::SimpleVolume< VoxelType >::Block::getVoxelAt(), PolyVox::SimpleVolume< VoxelType >::getVoxelAt(), PolyVox::RawVolume< VoxelType >::getVoxelAt(), PolyVox::LargeVolume< VoxelType >::getVoxelAt(), PolyVox::ConstVolumeProxy< VoxelType >::getVoxelAt(), PolyVox::IteratorController< IteratorType >::moveForward(), PolyVox::LargeVolume< VoxelType >::prefetch(), PolyVox::Region::Region(), PolyVox::SimpleVolume< VoxelType >::resize(), PolyVox::SimpleVolume< VoxelType >::Sampler::setPosition(), PolyVox::RawVolume< VoxelType >::Sampler::setPosition(), PolyVox::LargeVolume< VoxelType >::Sampler::setPosition(), PolyVox::BaseVolume< VoxelType >::Sampler< DerivedVolumeType >::setPosition(), PolyVox::SimpleVolume< VoxelType >::Block::setVoxelAt(), PolyVox::SimpleVolume< VoxelType >::setVoxelAt(), PolyVox::RawVolume< VoxelType >::setVoxelAt(), PolyVox::LargeVolume< VoxelType >::setVoxelAt(), PolyVox::ConstVolumeProxy< VoxelType >::setVoxelAt(), and PolyVox::VolumeChangeTracker< VoxelType >::unlockRegion().

template<uint32_t Size, typename Type >
double PolyVox::Vector< Size, Type >::length ( void   )  const throw () [inline]

Get the length of the vector.

NOTE: This function does not make much sense on integer Vectors.

Returns:
Length of the Vector.

Definition at line 523 of file Vector.inl.

Referenced by PolyVox::Vector< Size, Type >::normalise().

Here is the call graph for this function:

template<uint32_t Size, typename Type >
double PolyVox::Vector< Size, Type >::lengthSquared ( void   )  const throw () [inline]

Get the squared length of the vector.

Returns:
Squared length of the Vector.

Definition at line 532 of file Vector.inl.

Referenced by PolyVox::Vector< Size, Type >::length().

template<uint32_t Size, typename Type >
void PolyVox::Vector< Size, Type >::normalise ( void   )  throw () [inline]

Normalise the vector.

Divides the i, j, and k components by the length to give a Vector of length 1.0.

NOTE: This function does not make much sense on integer Vectors.

Definition at line 603 of file Vector.inl.

Here is the call graph for this function:

template<uint32_t Size, typename Type>
bool PolyVox::Vector< Size, Type >::operator!= ( const Vector< Size, Type > &  rhs  )  const throw () [inline]

Inequality Operator.

Checks whether two Vectors are not equal.

Parameters:
rhs The Vector to compare to.
Returns:
true if the Vectors do not match.
See also:
operator==

Definition at line 160 of file Vector.inl.

template<uint32_t Size, typename Type>
Vector< Size, Type > & PolyVox::Vector< Size, Type >::operator*= ( const Type &  rhs  )  throw () [inline]

Multiplication and Assignment Operator.

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

Parameters:
rhs the number the Vector is multiplied by.
Returns:
The resulting Vector.

Definition at line 251 of file Vector.inl.

template<uint32_t Size, typename Type>
Vector< Size, Type > & PolyVox::Vector< Size, Type >::operator*= ( const Vector< Size, Type > &  rhs  )  throw () [inline]

Multiplication and Assignment Operator.

Multiplication operator multiplies corresponding elements of the two Vectors.

Parameters:
rhs Vector to multiply by
Returns:
The resulting Vector.

Definition at line 221 of file Vector.inl.

template<uint32_t Size, typename Type>
Vector< Size, Type > & PolyVox::Vector< Size, Type >::operator+= ( const Vector< Size, Type > &  rhs  )  throw () [inline]

Addition and Assignment Operator.

Addition operator adds corresponding elements of the two Vectors.

Parameters:
rhs Vector to add
Returns:
The resulting Vector.

Definition at line 191 of file Vector.inl.

template<uint32_t Size, typename Type>
Vector< Size, Type > & PolyVox::Vector< Size, Type >::operator-= ( const Vector< Size, Type > &  rhs  )  throw () [inline]

Subtraction and Assignment Operator.

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

Parameters:
rhs Vector to subtract
Returns:
The resulting Vector.

Definition at line 206 of file Vector.inl.

template<uint32_t Size, typename Type>
Vector< Size, Type > & PolyVox::Vector< Size, Type >::operator/= ( const Vector< Size, Type > &  rhs  )  throw () [inline]

Division and Assignment Operator.

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

Parameters:
rhs Vector to divide by
Returns:
The resulting Vector.

Definition at line 236 of file Vector.inl.

template<uint32_t Size, typename Type>
Vector< Size, Type > & PolyVox::Vector< Size, Type >::operator/= ( const Type &  rhs  )  throw () [inline]

Division and Assignment Operator.

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

Parameters:
rhs the number the Vector is divided by.
Returns:
The resulting Vector.

Definition at line 266 of file Vector.inl.

template<uint32_t Size, typename Type>
bool PolyVox::Vector< Size, Type >::operator< ( const Vector< Size, Type > &  rhs  )  const throw () [inline]

Comparison Operator.

Checks whether this vector is less than the parameter.

The metric is meaningless but it allows Vectors to me used as key in sdt::map, etc.

Parameters:
rhs The Vector to compare to.
Returns:
true if this is less than the parameter
See also:
operator!=

Definition at line 173 of file Vector.inl.

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

Assignment Operator.

Assignment operator copies each element of first Vector to the second.

Parameters:
rhs Vector to assign to.
Returns:
A reference to the result to allow chaining.

Definition at line 122 of file Vector.inl.

template<uint32_t Size, typename Type>
bool PolyVox::Vector< Size, Type >::operator== ( const Vector< Size, Type > &  rhs  )  const throw () [inline]

Equality Operator.

Checks whether two Vectors are equal.

Parameters:
rhs The Vector to compare to.
Returns:
true if the Vectors match.
See also:
operator!=

Definition at line 139 of file Vector.inl.

template<uint32_t Size, typename Type>
void PolyVox::Vector< Size, Type >::setElement ( uint32_t  index,
Type  tValue 
) throw () [inline]

Element Access.

Parameters:
index The index of the element to set.
tValue The new value for the element.

Definition at line 433 of file Vector.inl.

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

template<uint32_t Size, typename Type>
void PolyVox::Vector< Size, Type >::setElements ( Type  x,
Type  y,
Type  z 
) throw () [inline]

Element Access.

Sets several elements of a vector at once.

Parameters:
x x component to set.
y y component to set.
z z component to set.

Definition at line 458 of file Vector.inl.

template<uint32_t Size, typename Type>
void PolyVox::Vector< Size, Type >::setElements ( Type  x,
Type  y,
Type  z,
Type  w 
) throw () [inline]

Element Access.

Sets several elements of a vector at once.

Parameters:
x x component to set.
y y component to set.
z z component to set.
w w component to set.

Definition at line 474 of file Vector.inl.

template<uint32_t Size, typename Type>
void PolyVox::Vector< Size, Type >::setElements ( Type  x,
Type  y 
) throw () [inline]

Element Access.

Sets several elements of a vector at once.

Parameters:
x x component to set.
y y component to set.

Definition at line 444 of file Vector.inl.

template<uint32_t Size, typename Type>
void PolyVox::Vector< Size, Type >::setW ( Type  tW  )  throw () [inline]

Set the w component of the vector.

Parameters:
tX The new value for the W component of a 4 dimensional Vector.

Definition at line 513 of file Vector.inl.

template<uint32_t Size, typename Type>
void PolyVox::Vector< Size, Type >::setX ( Type  tX  )  throw () [inline]

Set the x component of the vector.

Parameters:
tX The new value for the X component of a 1, 2, 3, or 4 dimensional Vector.

Definition at line 486 of file Vector.inl.

Referenced by PolyVox::Region::cropTo().

template<uint32_t Size, typename Type>
void PolyVox::Vector< Size, Type >::setY ( Type  tY  )  throw () [inline]

Set the y component of the vector.

Parameters:
tX The new value for the Y component of a 2, 3, or 4 dimensional Vector.

Definition at line 495 of file Vector.inl.

Referenced by PolyVox::Region::cropTo().

template<uint32_t Size, typename Type>
void PolyVox::Vector< Size, Type >::setZ ( Type  tZ  )  throw () [inline]

Set the z component of the vector.

Parameters:
tX The new value for the Z component of a 3 or 4 dimensional Vector.

Definition at line 504 of file Vector.inl.

Referenced by PolyVox::Region::cropTo(), and PolyVox::SurfaceExtractor< VolumeType, VoxelType >::execute().


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