Public Attributes

decPoint3 Class Reference

3 Component Integer Point. More...

#include <decPoint3.h>

List of all members.

Public Member Functions

Constructors and Destructors
 decPoint3 ()
 Creates a new point initialized to ( 0,0,0 ).
 decPoint3 (int nx, int ny, int nz)
 Creates a new point with the given values.
 decPoint3 (const decPoint3 &p)
 Creates a new point with the values of another point.
Management
float Length () const
 Retrieves the length of the point.
void SetZero ()
 Sets all components to 0.
void Set (int nx, int ny, int nz)
 Sets the components to the given values.
Operators
decPoint3 operator- () const
 Retrieves the negation of this point.
decPoint3operator= (const decPoint3 &p)
 Sets the components of this point to the values of another one.
decPoint3operator+= (const decPoint3 &p)
 Adds the components of another point to this one.
decPoint3operator-= (const decPoint3 &p)
 Subtracts the components of another point from this point.
decPoint3operator*= (float k)
 Multiplies the components of this point with a value k.
decPoint3operator/= (float k)
 Divides the components of this point by a value k.
decPoint3 operator+ (const decPoint3 &p) const
 Retrieves a new point with the sum of this point with another one.
decPoint3 operator- (const decPoint3 &p) const
 Retrieves a new point with the difference of this point to another one.
decPoint3 operator* (float k) const
 Retrieves a new point with this point scaled by k.
int operator* (const decPoint3 &p) const
 Calculates the dot product of this point with another one.
decPoint3 operator/ (float k) const
 Retrieves a new point with this point divided by k.
bool operator== (const decPoint3 &p) const
 Determines if this point is component wise equal to another point.
bool operator!= (const decPoint3 &p) const
 Determines if this point is component wise not equal to another point.
bool operator< (const decPoint3 &p) const
 Determines if all the components of this point are less then the components of another one.
bool operator> (const decPoint3 &p) const
 Determines if all the components of this point are greater then the components of another one.
bool operator<= (const decPoint3 &p) const
 Determines if all the components of this point are less then or equal to the components of another one.
bool operator>= (const decPoint3 &p) const
 Determines if all the components of this point are greater then or equal to the components of another one.

Public Attributes

int x
 X Component of point.
int y
 Y Component of point.
int z
 Z Component of point.

Detailed Description

3 Component Integer Point.

Author:
Plüss Roland
Version:
1.0
Date:
2008

Constructor & Destructor Documentation

decPoint3::decPoint3 (  ) [inline]

Creates a new point initialized to ( 0,0,0 ).

References x, y, and z.

Referenced by operator*(), operator+(), operator-(), and operator/().

decPoint3::decPoint3 ( int  nx,
int  ny,
int  nz 
) [inline]

Creates a new point with the given values.

References x, y, and z.

decPoint3::decPoint3 ( const decPoint3 p ) [inline]

Creates a new point with the values of another point.

References x, y, and z.


Member Function Documentation

float decPoint3::Length (  ) const

Retrieves the length of the point.

bool decPoint3::operator!= ( const decPoint3 p ) const [inline]

Determines if this point is component wise not equal to another point.

References x, y, and z.

decPoint3 decPoint3::operator* ( float  k ) const [inline]

Retrieves a new point with this point scaled by k.

References decPoint3(), x, y, and z.

int decPoint3::operator* ( const decPoint3 p ) const [inline]

Calculates the dot product of this point with another one.

References x, y, and z.

decPoint3& decPoint3::operator*= ( float  k ) [inline]

Multiplies the components of this point with a value k.

References x, y, and z.

decPoint3 decPoint3::operator+ ( const decPoint3 p ) const [inline]

Retrieves a new point with the sum of this point with another one.

References decPoint3(), x, y, and z.

decPoint3& decPoint3::operator+= ( const decPoint3 p ) [inline]

Adds the components of another point to this one.

References x, y, and z.

decPoint3 decPoint3::operator- (  ) const [inline]

Retrieves the negation of this point.

References decPoint3(), x, y, and z.

decPoint3 decPoint3::operator- ( const decPoint3 p ) const [inline]

Retrieves a new point with the difference of this point to another one.

References decPoint3(), x, y, and z.

decPoint3& decPoint3::operator-= ( const decPoint3 p ) [inline]

Subtracts the components of another point from this point.

References x, y, and z.

decPoint3 decPoint3::operator/ ( float  k ) const [inline]

Retrieves a new point with this point divided by k.

If k is 0 an exception is thrown.

References decPoint3(), THROW, x, y, and z.

decPoint3& decPoint3::operator/= ( float  k ) [inline]

Divides the components of this point by a value k.

If the value k is 0 an exception is thrown.

References THROW, x, y, and z.

bool decPoint3::operator< ( const decPoint3 p ) const [inline]

Determines if all the components of this point are less then the components of another one.

References x, y, and z.

bool decPoint3::operator<= ( const decPoint3 p ) const [inline]

Determines if all the components of this point are less then or equal to the components of another one.

References x, y, and z.

decPoint3& decPoint3::operator= ( const decPoint3 p ) [inline]

Sets the components of this point to the values of another one.

References x, y, and z.

bool decPoint3::operator== ( const decPoint3 p ) const [inline]

Determines if this point is component wise equal to another point.

References x, y, and z.

bool decPoint3::operator> ( const decPoint3 p ) const [inline]

Determines if all the components of this point are greater then the components of another one.

References x, y, and z.

bool decPoint3::operator>= ( const decPoint3 p ) const [inline]

Determines if all the components of this point are greater then or equal to the components of another one.

References x, y, and z.

void decPoint3::Set ( int  nx,
int  ny,
int  nz 
) [inline]

Sets the components to the given values.

References x, y, and z.

void decPoint3::SetZero (  ) [inline]

Sets all components to 0.

References x, y, and z.


Member Data Documentation


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