|
FIFE
|
A 2D Point. More...
#include <point.h>
Inheritance diagram for FIFE::PointType2D< T >:
Collaboration diagram for FIFE::PointType2D< T >:Public Member Functions | |
| PointType2D (T _x=0, T _y=0) | |
| Constructor. More... | |
| PointType2D (const PointType2D< T > &rhs) | |
| Copy Constructor. More... | |
| PointType2D< T > | operator+ (const PointType2D< T > &p) const |
| Vector addition. More... | |
| PointType2D< T > | operator- (const PointType2D< T > &p) const |
| Vector substraction. More... | |
| PointType2D< T > & | operator+= (const PointType2D< T > &p) |
| Vector inplace addition. More... | |
| PointType2D< T > & | operator-= (const PointType2D< T > &p) |
| Vector inplace substraction. More... | |
| PointType2D< T > | operator* (const T &i) const |
| Scalar multiplication with an integer value. More... | |
| PointType2D< T > | operator/ (const T &i) const |
| Scalar division with an integer value. More... | |
| bool | operator== (const PointType2D< T > &p) const |
| Equality comparision. More... | |
| bool | operator!= (const PointType2D< T > &p) const |
| Equality comparision. More... | |
| T | length () const |
| Return length. More... | |
| void | normalize () |
| Normalizes the point. More... | |
| void | rotate (T angle) |
| Rotates the point around the origin. More... | |
| void | rotate (const PointType2D< T > &origin, T angle) |
| Rotates the point around an origin. More... | |
| void | set (T _x, T _y) |
| Sets the x and y coordinate of the 2D point. More... | |
| T & | operator[] (int32_t ind) |
Public Attributes | |
| union { | |
| T val [2] | |
| struct { | |
| T x | |
| T y | |
| } | |
| }; | |
A 2D Point.
This is a small helper class to aid in 2d vector arithmetics.
|
inlineexplicit |
|
inline |
|
inline |
Return length.
Definition at line 122 of file point.h.
Referenced by FIFE::PointType2D< int32_t >::normalize().
Here is the caller graph for this function:
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Sets the x and y coordinate of the 2D point.
Definition at line 176 of file point.h.
Referenced by FIFE::LibRocketRenderInterface::RenderGeometry().
Here is the caller graph for this function:| union { ... } |
| T FIFE::PointType2D< T >::val[2] |
Definition at line 50 of file point.h.
Referenced by FIFE::PointType2D< int32_t >::operator[]().
| T FIFE::PointType2D< T >::x |
Definition at line 52 of file point.h.
Referenced by FIFE::CellRenderer::addImageToMap(), FIFE::RectType< T >::contains(), FIFE::doublePt2intPt(), FIFE::RenderBackendOpenGL::drawLightPrimitive(), FIFE::OpenGLGuiGraphics::drawLine(), FIFE::RenderBackendSDL::drawLine(), FIFE::RenderBackendOpenGL::drawLine(), FIFE::RenderBackendSDL::drawQuad(), FIFE::RenderBackendOpenGL::drawQuad(), FIFE::RenderBackendSDL::drawRectangle(), FIFE::RenderBackendOpenGL::drawRectangle(), FIFE::RenderBackendOpenGL::drawTriangle(), FIFE::RenderBackendSDL::drawVertex(), FIFE::RenderBackendOpenGL::drawVertex(), FIFE::RenderBackendSDL::fillRectangle(), FIFE::RenderBackendOpenGL::fillRectangle(), FIFE::RendererNode::getCalculatedPoint(), FIFE::Camera::getCellImageDimensions(), FIFE::intPt2doublePt(), FIFE::PointType2D< int32_t >::length(), FIFE::PointType2D< int32_t >::normalize(), FIFE::PointType2D< int32_t >::operator!=(), FIFE::PointType2D< int32_t >::operator*(), FIFE::PointType2D< int32_t >::operator+(), FIFE::PointType2D< int32_t >::operator+=(), FIFE::PointType2D< int32_t >::operator-(), FIFE::PointType2D< int32_t >::operator-=(), FIFE::PointType2D< int32_t >::operator/(), FIFE::PointType2D< int32_t >::operator==(), FIFE::GridRenderer::render(), FIFE::OffRendererPointInfo::render(), FIFE::GenericRendererPointInfo::render(), FIFE::CellSelectionRenderer::render(), FIFE::BlockingInfoRenderer::render(), FIFE::CellRenderer::render(), FIFE::LightRendererImageInfo::render(), FIFE::LightRendererAnimationInfo::render(), FIFE::OffRendererImageInfo::render(), FIFE::GenericRendererImageInfo::render(), FIFE::OffRendererAnimationInfo::render(), FIFE::GenericRendererAnimationInfo::render(), FIFE::LightRendererResizeInfo::render(), FIFE::OffRendererTextInfo::render(), FIFE::GenericRendererTextInfo::render(), FIFE::OffRendererResizeInfo::render(), FIFE::GenericRendererResizeInfo::render(), FIFE::RenderBackendOpenGL::renderGuiGeometry(), FIFE::Camera::renderOverlay(), FIFE::ImageFontBase::renderString(), FIFE::PointType2D< int32_t >::rotate(), FIFE::MapSaver::save(), FIFE::PointType2D< int32_t >::set(), and FIFE::Camera::updateReferenceScale().
| T FIFE::PointType2D< T >::y |
Definition at line 52 of file point.h.
Referenced by FIFE::CellRenderer::addImageToMap(), FIFE::RectType< T >::contains(), FIFE::doublePt2intPt(), FIFE::RenderBackendOpenGL::drawLightPrimitive(), FIFE::OpenGLGuiGraphics::drawLine(), FIFE::RenderBackendSDL::drawLine(), FIFE::RenderBackendOpenGL::drawLine(), FIFE::RenderBackendSDL::drawQuad(), FIFE::RenderBackendOpenGL::drawQuad(), FIFE::RenderBackendSDL::drawRectangle(), FIFE::RenderBackendOpenGL::drawRectangle(), FIFE::RenderBackendOpenGL::drawTriangle(), FIFE::RenderBackendSDL::drawVertex(), FIFE::RenderBackendOpenGL::drawVertex(), FIFE::RenderBackendSDL::fillRectangle(), FIFE::RenderBackendOpenGL::fillRectangle(), FIFE::RendererNode::getCalculatedPoint(), FIFE::Camera::getCellImageDimensions(), FIFE::intPt2doublePt(), FIFE::PointType2D< int32_t >::length(), FIFE::PointType2D< int32_t >::normalize(), FIFE::PointType2D< int32_t >::operator!=(), FIFE::PointType2D< int32_t >::operator*(), FIFE::PointType2D< int32_t >::operator+(), FIFE::PointType2D< int32_t >::operator+=(), FIFE::PointType2D< int32_t >::operator-(), FIFE::PointType2D< int32_t >::operator-=(), FIFE::PointType2D< int32_t >::operator/(), FIFE::PointType2D< int32_t >::operator==(), FIFE::GridRenderer::render(), FIFE::OffRendererPointInfo::render(), FIFE::GenericRendererPointInfo::render(), FIFE::CellSelectionRenderer::render(), FIFE::BlockingInfoRenderer::render(), FIFE::CellRenderer::render(), FIFE::LightRendererImageInfo::render(), FIFE::LightRendererAnimationInfo::render(), FIFE::OffRendererImageInfo::render(), FIFE::GenericRendererImageInfo::render(), FIFE::OffRendererAnimationInfo::render(), FIFE::GenericRendererAnimationInfo::render(), FIFE::LightRendererResizeInfo::render(), FIFE::OffRendererTextInfo::render(), FIFE::GenericRendererTextInfo::render(), FIFE::OffRendererResizeInfo::render(), FIFE::GenericRendererResizeInfo::render(), FIFE::RenderBackendOpenGL::renderGuiGeometry(), FIFE::Camera::renderOverlay(), FIFE::ImageFontBase::renderString(), FIFE::PointType2D< int32_t >::rotate(), FIFE::MapSaver::save(), FIFE::PointType2D< int32_t >::set(), and FIFE::Camera::updateReferenceScale().