Vault  4.1
Public Member Functions | Static Public Member Functions | Friends
VPointT< T > Class Template Reference

VPointT defines a point with x and y coordinates. More...

#include <vgeometry.h>

List of all members.

Public Member Functions

 VPointT (T x, T y)
 VPointT (VBinaryIOStream &stream)
void readFromStream (VBinaryIOStream &stream)
void writeToStream (VBinaryIOStream &stream) const
getX () const
getY () const
void setX (T x)
void setY (T y)
T & rX ()
T & rY ()
VPointT< T > & operator+= (const VPointT< T > &p)
VPointT< T > & operator-= (const VPointT< T > &p)
VPointT< T > & operator*= (T scale)
VPointT< T > & operator/= (T divisor)

Static Public Member Functions

static VDouble getDistance (const VPointT< T > &p1, const VPointT< T > &p2)
 Returns the distance between two points.
static bool equal (const VPointT< T > &p1, const VPointT< T > &p2)
static bool notEqual (const VPointT< T > &p1, const VPointT< T > &p2)

Friends

bool operator== (const VPointT< T > &p1, const VPointT< T > &p2)
bool operator!= (const VPointT< T > &p1, const VPointT< T > &p2)
VPointT< T > operator+ (const VPointT< T > &p1, const VPointT< T > &p2)
VPointT< T > operator+ (const VPointT< T > &p, const VSizeT< T > &s)
VPointT< T > operator- (const VPointT< T > &p1, const VPointT< T > &p2)
VPointT< T > operator- (const VPointT< T > &p, const VSizeT< T > &s)
VPointT< T > operator- (const VPointT< T > &p)
VPointT< T > operator* (const VPointT< T > &p, T scale)
VPointT< T > operator* (T scale, const VPointT< T > &p)
VPointT< T > operator/ (const VPointT< T > &p, T divisor)

Detailed Description

template<typename T>
class VPointT< T >

VPointT defines a point with x and y coordinates.

VPoint uses VDouble coordinates; VIPoint uses int coordinates.

Definition at line 163 of file vgeometry.h.


Member Function Documentation

template<typename T>
static VDouble VPointT< T >::getDistance ( const VPointT< T > &  p1,
const VPointT< T > &  p2 
) [inline, static]

Returns the distance between two points.

Definition at line 167 of file vgeometry.h.


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

Copyright ©1997-2014 Trygve Isaacson. All rights reserved. This documentation was generated with Doxygen.