zenilib  0.5.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Zeni::Point2f Class Reference

A 2D Point represented with floats. More...

#include <Coordinate.h>

Public Member Functions

 Point2f ()
 
 Point2f (const float &x_, const float &y_)
 
 Point2f (const Point2i &rhs)
 
 Point2f (const Point3i &rhs)
 z in rhs is ignored. More...
 
 Point2f (const Point3f &rhs)
 z in rhs is ignored. More...
 
 Point2f (const Vector2f &rhs)
 
Point2f interpolate_to (const float &rhs_part, const Point2f &rhs) const
 Get a point inbetween this point and another point of the same type. More...
 
Point2f operator+ (const Vector2f &rhs) const
 
Point2foperator+= (const Vector2f &rhs)
 
Vector2f operator- (const Point2f &rhs) const
 
Point2f operator- (const Vector2f &rhs) const
 
Point2foperator-= (const Vector2f &rhs)
 

Public Attributes

float x
 
float y
 

Static Public Attributes

static const float z = 0
 

Detailed Description

A 2D Point represented with floats.

Author
bazald

Contact: bazal.nosp@m.d@ze.nosp@m.nipex.nosp@m..com

Definition at line 98 of file Coordinate.h.

Constructor & Destructor Documentation

Zeni::Point2f::Point2f ( )
inline

Definition at line 54 of file Coordinate.hxx.

Referenced by interpolate_to(), operator+(), and operator-().

Zeni::Point2f::Point2f ( const float &  x_,
const float &  y_ 
)
inline

Definition at line 59 of file Coordinate.hxx.

Zeni::Point2f::Point2f ( const Point2i rhs)
inlineexplicit

Definition at line 64 of file Coordinate.hxx.

Zeni::Point2f::Point2f ( const Point3i rhs)
inlineexplicit

z in rhs is ignored.

Definition at line 69 of file Coordinate.hxx.

Zeni::Point2f::Point2f ( const Point3f rhs)
inlineexplicit

z in rhs is ignored.

Definition at line 74 of file Coordinate.hxx.

Zeni::Point2f::Point2f ( const Vector2f rhs)
inline

Definition at line 79 of file Coordinate.hxx.

Member Function Documentation

Point2f Zeni::Point2f::interpolate_to ( const float &  rhs_part,
const Point2f rhs 
) const

Get a point inbetween this point and another point of the same type.

Definition at line 28 of file Coordinate.cpp.

References Point2f(), x, and y.

Referenced by Zeni::Vertex3f_Texture::interpolate_to(), and Zeni::Vertex2f_Texture::interpolate_to().

Point2f Zeni::Point2f::operator+ ( const Vector2f rhs) const
inline

Definition at line 88 of file Coordinate.hxx.

References Zeni::Vector2f::i, Zeni::Vector2f::j, and Point2f().

Point2f & Zeni::Point2f::operator+= ( const Vector2f rhs)
inline

Definition at line 96 of file Coordinate.hxx.

References Zeni::Vector2f::i, and Zeni::Vector2f::j.

Vector2f Zeni::Point2f::operator- ( const Point2f rhs) const
inline

Definition at line 84 of file Coordinate.hxx.

References x, and y.

Point2f Zeni::Point2f::operator- ( const Vector2f rhs) const
inline

Definition at line 92 of file Coordinate.hxx.

References Zeni::Vector2f::i, Zeni::Vector2f::j, and Point2f().

Point2f & Zeni::Point2f::operator-= ( const Vector2f rhs)
inline

Definition at line 102 of file Coordinate.hxx.

References Zeni::Vector2f::i, and Zeni::Vector2f::j.

Member Data Documentation

const float Zeni::Point2f::z = 0
static

Definition at line 118 of file Coordinate.h.


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