FIFE  6e1afdbeda11afe9ac53e6023a4be96ef88f1dc6
FIFE::PointType3D< T > Class Template Reference

A 3D Point. More...

#include <point.h>

+ Inheritance diagram for FIFE::PointType3D< T >:
+ Collaboration diagram for FIFE::PointType3D< T >:

Public Member Functions

 PointType3D (T _x=0, T _y=0, T _z=0)
 Constructor. More...
 
 PointType3D (const PointType3D< T > &rhs)
 Copy Constructor. More...
 
PointType3D< T > operator+ (const PointType3D< T > &p) const
 Vector addition. More...
 
PointType3D< T > operator- (const PointType3D< T > &p) const
 Vector substraction. More...
 
PointType3D< T > & operator+= (const PointType3D< T > &p)
 Vector inplace addition. More...
 
PointType3D< T > & operator-= (const PointType3D< T > &p)
 Vector inplace substraction. More...
 
PointType3D< T > operator* (const T &i) const
 Scalar multiplication with an integer value. More...
 
PointType3D< T > operator/ (const T &i) const
 Scalar division with an integer value. More...
 
bool operator== (const PointType3D< T > &p) const
 Equality comparision. More...
 
bool operator!= (const PointType3D< T > &p) const
 Equality comparision. More...
 
length () const
 Return length. More...
 
void normalize ()
 Normalizes the point. More...
 
void set (T _x, T _y, T _z)
 Sets the x, y and z coordinates of the 3D point. More...
 
T & operator[] (int32_t ind)
 

Public Attributes

union {
   T   val [3]
 
   struct {
      T   x
 
      T   y
 
      T   z
 
   } 
 
}; 
 

Detailed Description

template<typename T>
class FIFE::PointType3D< T >

A 3D Point.

This is a small helper class to aid in 3d vector arithmetics.

See also
Rect

Definition at line 205 of file point.h.

Constructor & Destructor Documentation

template<typename T>
FIFE::PointType3D< T >::PointType3D ( _x = 0,
_y = 0,
_z = 0 
)
inlineexplicit

Constructor.

Creates a with 0 as default values.

Definition at line 218 of file point.h.

template<typename T>
FIFE::PointType3D< T >::PointType3D ( const PointType3D< T > &  rhs)
inline

Copy Constructor.

Definition at line 223 of file point.h.

Member Function Documentation

template<typename T>
T FIFE::PointType3D< T >::length ( ) const
inline

Return length.

Definition at line 283 of file point.h.

template<typename T>
void FIFE::PointType3D< T >::normalize ( )
inline

Normalizes the point.

Definition at line 291 of file point.h.

template<typename T>
bool FIFE::PointType3D< T >::operator!= ( const PointType3D< T > &  p) const
inline

Equality comparision.

Definition at line 277 of file point.h.

template<typename T>
PointType3D<T> FIFE::PointType3D< T >::operator* ( const T &  i) const
inline

Scalar multiplication with an integer value.

Definition at line 258 of file point.h.

template<typename T>
PointType3D<T> FIFE::PointType3D< T >::operator+ ( const PointType3D< T > &  p) const
inline

Vector addition.

Definition at line 228 of file point.h.

template<typename T>
PointType3D<T>& FIFE::PointType3D< T >::operator+= ( const PointType3D< T > &  p)
inline

Vector inplace addition.

Definition at line 240 of file point.h.

template<typename T>
PointType3D<T> FIFE::PointType3D< T >::operator- ( const PointType3D< T > &  p) const
inline

Vector substraction.

Definition at line 234 of file point.h.

template<typename T>
PointType3D<T>& FIFE::PointType3D< T >::operator-= ( const PointType3D< T > &  p)
inline

Vector inplace substraction.

Definition at line 249 of file point.h.

template<typename T>
PointType3D<T> FIFE::PointType3D< T >::operator/ ( const T &  i) const
inline

Scalar division with an integer value.

Definition at line 264 of file point.h.

template<typename T>
bool FIFE::PointType3D< T >::operator== ( const PointType3D< T > &  p) const
inline

Equality comparision.

Definition at line 270 of file point.h.

template<typename T>
T& FIFE::PointType3D< T >::operator[] ( int32_t  ind)
inline

Definition at line 315 of file point.h.

template<typename T>
void FIFE::PointType3D< T >::set ( _x,
_y,
_z 
)
inline

Sets the x, y and z coordinates of the 3D point.

Definition at line 309 of file point.h.

Member Data Documentation

union { ... }
template<typename T>
T FIFE::PointType3D< T >::val[3]

Definition at line 208 of file point.h.

template<typename T>
T FIFE::PointType3D< T >::x

Definition at line 210 of file point.h.

Referenced by FIFE::CellCache::addCell(), FIFE::InstanceTree::addInstance(), FIFE::Cell::addInstance(), FIFE::Cell::addInstances(), FIFE::CoordinateRenderer::adjustLayerArea(), FIFE::CellCache::calculateCurrentSize(), FIFE::CellCache::CellCache(), FIFE::CellCache::convertCoordToInt(), FIFE::CellCache::createCell(), FIFE::Layer::createInstance(), FIFE::doublePt2intPt(), FIFE::InstanceTree::findInstances(), FIFE::RoutePather::followRoute(), FIFE::CellGrid::getAccessibleCoordinates(), FIFE::SquareGrid::getAdjacentCost(), FIFE::getAngleBetween(), FIFE::RendererNode::getCalculatedPoint(), FIFE::CellCache::getCell(), FIFE::Location::getCellOffsetDistance(), FIFE::CellCache::getCellsInCircle(), FIFE::CellCache::getCellsInCircleSegment(), FIFE::CellCache::getCellsInRect(), FIFE::HexGrid::getCoordinatesInLine(), FIFE::SquareGrid::getCoordinatesInLine(), FIFE::getFacing(), FIFE::SquareGrid::getHeuristicCost(), FIFE::HexGrid::getHeuristicCost(), FIFE::Layer::getInstancesInCircle(), FIFE::Layer::getInstancesInCircleSegment(), FIFE::Location::getLayerDistanceTo(), FIFE::Camera::getLayerViewPort(), FIFE::Location::getMapDistanceTo(), FIFE::Camera::getMapViewPort(), FIFE::Camera::getMatchingInstances(), FIFE::Map::getMinMaxCoordinates(), FIFE::Layer::getMinMaxCoordinates(), FIFE::Camera::getOriginalZToY(), FIFE::Camera::getRealCellDimensions(), FIFE::HexGrid::getVertices(), FIFE::SquareGrid::getVertices(), FIFE::Camera::getZOffset(), FIFE::Instance::Instance(), FIFE::intPt2doublePt(), FIFE::HexGrid::isAccessible(), FIFE::SquareGrid::isAccessible(), FIFE::CellCache::isInCellCache(), FIFE::SoundEmitter::isPosition(), FIFE::RoutePather::locationsEqual(), FIFE::Trigger::moveTo(), FIFE::PointType3D< double >::operator!=(), FIFE::InstanceDistanceSortLocation::operator()(), FIFE::Matrix< double >::operator*(), FIFE::PointType3D< double >::operator+(), FIFE::PointType3D< double >::operator+=(), FIFE::PointType3D< double >::operator-(), FIFE::PointType3D< double >::operator-=(), FIFE::operator<<(), FIFE::Location::operator=(), FIFE::PointType3D< double >::operator==(), FIFE::CellGrid::orientation(), FIFE::Cell::removeInstance(), FIFE::GridRenderer::render(), FIFE::CoordinateRenderer::render(), FIFE::CellSelectionRenderer::render(), FIFE::BlockingInfoRenderer::render(), FIFE::CellRenderer::render(), FIFE::InstanceRenderer::renderAlreadySorted(), FIFE::InstanceRenderer::renderUnsorted(), FIFE::Location::reset(), FIFE::CellCache::resize(), FIFE::MapSaver::save(), FIFE::SoundEmitter::setDirection(), FIFE::EaxReverb::setLateReverbPan(), FIFE::SoundManager::setListenerOrientation(), FIFE::SoundManager::setListenerPosition(), FIFE::SoundManager::setListenerVelocity(), FIFE::SoundEmitter::setPosition(), FIFE::EaxReverb::setReflectionsPan(), FIFE::SoundEmitter::setVelocity(), FIFE::HexGrid::toExactLayerCoordinates(), FIFE::SquareGrid::toLayerCoordinatesFromExactLayerCoordinates(), FIFE::HexGrid::toLayerCoordinatesFromExactLayerCoordinates(), FIFE::HexGrid::toLayerCoordinatesHelper(), FIFE::HexGrid::toMapCoordinates(), FIFE::SquareGrid::toMultiCoordinates(), FIFE::HexGrid::toMultiCoordinates(), FIFE::LayerCache::update(), FIFE::SoundManager::update(), FIFE::Camera::update(), FIFE::Cell::updateCellFowInfo(), FIFE::Camera::updateMatrices(), FIFE::Instance::updateMultiInstances(), FIFE::LayerCache::updatePosition(), FIFE::LayerCache::updateScreenCoordinate(), FIFE::RenderVisitor::visit(), and FIFE::InstanceListCollector::visit().

template<typename T>
T FIFE::PointType3D< T >::y

Definition at line 210 of file point.h.

Referenced by FIFE::CellCache::addCell(), FIFE::InstanceTree::addInstance(), FIFE::Cell::addInstance(), FIFE::Cell::addInstances(), FIFE::CoordinateRenderer::adjustLayerArea(), FIFE::CellCache::calculateCurrentSize(), FIFE::Camera::calculateZValue(), FIFE::CellCache::CellCache(), FIFE::CellCache::convertCoordToInt(), FIFE::CellCache::createCell(), FIFE::Layer::createInstance(), FIFE::doublePt2intPt(), FIFE::InstanceTree::findInstances(), FIFE::RoutePather::followRoute(), FIFE::CellGrid::getAccessibleCoordinates(), FIFE::SquareGrid::getAdjacentCost(), FIFE::getAngleBetween(), FIFE::RendererNode::getCalculatedPoint(), FIFE::CellCache::getCell(), FIFE::Location::getCellOffsetDistance(), FIFE::CellCache::getCellsInCircle(), FIFE::CellCache::getCellsInCircleSegment(), FIFE::CellCache::getCellsInRect(), FIFE::HexGrid::getCoordinatesInLine(), FIFE::SquareGrid::getCoordinatesInLine(), FIFE::getFacing(), FIFE::SquareGrid::getHeuristicCost(), FIFE::HexGrid::getHeuristicCost(), FIFE::Layer::getInstancesInCircle(), FIFE::Layer::getInstancesInCircleSegment(), FIFE::Location::getLayerDistanceTo(), FIFE::Camera::getLayerViewPort(), FIFE::Location::getMapDistanceTo(), FIFE::Camera::getMapViewPort(), FIFE::Camera::getMatchingInstances(), FIFE::Map::getMinMaxCoordinates(), FIFE::Layer::getMinMaxCoordinates(), FIFE::Camera::getOriginalZToY(), FIFE::Camera::getRealCellDimensions(), FIFE::HexGrid::getVertices(), FIFE::SquareGrid::getVertices(), FIFE::Camera::getZOffset(), FIFE::Instance::Instance(), FIFE::intPt2doublePt(), FIFE::HexGrid::isAccessible(), FIFE::SquareGrid::isAccessible(), FIFE::CellCache::isInCellCache(), FIFE::SoundEmitter::isPosition(), FIFE::RoutePather::locationsEqual(), FIFE::Trigger::moveTo(), FIFE::PointType3D< double >::operator!=(), FIFE::InstanceDistanceSortLocation::operator()(), FIFE::Matrix< double >::operator*(), FIFE::PointType3D< double >::operator+(), FIFE::PointType3D< double >::operator+=(), FIFE::PointType3D< double >::operator-(), FIFE::PointType3D< double >::operator-=(), FIFE::operator<<(), FIFE::Location::operator=(), FIFE::PointType3D< double >::operator==(), FIFE::CellGrid::orientation(), FIFE::Cell::removeInstance(), FIFE::GridRenderer::render(), FIFE::CoordinateRenderer::render(), FIFE::CellSelectionRenderer::render(), FIFE::BlockingInfoRenderer::render(), FIFE::CellRenderer::render(), FIFE::InstanceRenderer::renderAlreadySorted(), FIFE::InstanceRenderer::renderUnsorted(), FIFE::Location::reset(), FIFE::CellCache::resize(), FIFE::MapSaver::save(), FIFE::SoundEmitter::setDirection(), FIFE::EaxReverb::setLateReverbPan(), FIFE::SoundManager::setListenerOrientation(), FIFE::SoundManager::setListenerPosition(), FIFE::SoundManager::setListenerVelocity(), FIFE::SoundEmitter::setPosition(), FIFE::EaxReverb::setReflectionsPan(), FIFE::SoundEmitter::setVelocity(), FIFE::HexGrid::toExactLayerCoordinates(), FIFE::HexGrid::toLayerCoordinates(), FIFE::SquareGrid::toLayerCoordinatesFromExactLayerCoordinates(), FIFE::HexGrid::toLayerCoordinatesFromExactLayerCoordinates(), FIFE::HexGrid::toLayerCoordinatesHelper(), FIFE::HexGrid::toMapCoordinates(), FIFE::HexGrid::toMultiCoordinates(), FIFE::SquareGrid::toMultiCoordinates(), FIFE::LayerCache::update(), FIFE::SoundManager::update(), FIFE::Camera::update(), FIFE::Cell::updateCellFowInfo(), FIFE::Camera::updateMatrices(), FIFE::Instance::updateMultiInstances(), FIFE::LayerCache::updatePosition(), FIFE::LayerCache::updateScreenCoordinate(), FIFE::RenderVisitor::visit(), and FIFE::InstanceListCollector::visit().

template<typename T>
T FIFE::PointType3D< T >::z

Definition at line 210 of file point.h.

Referenced by FIFE::Camera::calculateZValue(), FIFE::Layer::createInstance(), FIFE::doublePt2intPt(), FIFE::RoutePather::followRoute(), FIFE::Location::getLayerDistanceTo(), FIFE::Location::getMapDistanceTo(), FIFE::Camera::getOriginalZToY(), FIFE::Camera::getZOffset(), FIFE::Instance::Instance(), FIFE::intPt2doublePt(), FIFE::SoundEmitter::isPosition(), FIFE::PointType3D< double >::operator!=(), FIFE::InstanceDistanceSortCamera::operator()(), FIFE::InstanceDistanceSortLocation::operator()(), FIFE::InstanceDistanceSortCameraAndLocation::operator()(), FIFE::Matrix< double >::operator*(), FIFE::PointType3D< double >::operator+(), FIFE::PointType3D< double >::operator+=(), FIFE::PointType3D< double >::operator-(), FIFE::PointType3D< double >::operator-=(), FIFE::Location::operator=(), FIFE::PointType3D< double >::operator==(), FIFE::InstanceRenderer::renderAlreadySorted(), FIFE::InstanceRenderer::renderUnsorted(), FIFE::Location::reset(), FIFE::CellCache::resize(), FIFE::MapSaver::save(), FIFE::SoundEmitter::setDirection(), FIFE::EaxReverb::setLateReverbPan(), FIFE::SoundManager::setListenerOrientation(), FIFE::SoundManager::setListenerPosition(), FIFE::SoundManager::setListenerVelocity(), FIFE::SoundEmitter::setPosition(), FIFE::EaxReverb::setReflectionsPan(), FIFE::SoundEmitter::setVelocity(), FIFE::SquareGrid::toLayerCoordinatesFromExactLayerCoordinates(), FIFE::HexGrid::toLayerCoordinatesHelper(), FIFE::SoundManager::update(), FIFE::Cell::updateCellBlockingInfo(), FIFE::Camera::updateMatrices(), FIFE::SingleLayerSearch::updateSearch(), and FIFE::MultiLayerSearch::updateSearch().


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