3 Component Integer Point. More...
#include <decPoint3.h>
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. | |
| decPoint3 & | operator= (const decPoint3 &p) |
| Sets the components of this point to the values of another one. | |
| decPoint3 & | operator+= (const decPoint3 &p) |
| Adds the components of another point to this one. | |
| decPoint3 & | operator-= (const decPoint3 &p) |
| Subtracts the components of another point from this point. | |
| decPoint3 & | operator*= (float k) |
| Multiplies the components of this point with a value k. | |
| decPoint3 & | operator/= (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. | |
3 Component Integer Point.
| decPoint3::decPoint3 | ( | ) | [inline] |
Creates a new point initialized to ( 0,0,0 ).
Referenced by operator*(), operator+(), operator-(), and operator/().
| decPoint3::decPoint3 | ( | int | nx, |
| int | ny, | ||
| int | nz | ||
| ) | [inline] |
| decPoint3::decPoint3 | ( | const decPoint3 & | p ) | [inline] |
| float decPoint3::Length | ( | ) | const |
Retrieves the length of the point.
| bool decPoint3::operator!= | ( | const decPoint3 & | p ) | const [inline] |
| 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] |
| decPoint3& decPoint3::operator*= | ( | float | k ) | [inline] |
Retrieves a new point with the sum of this point with another one.
References decPoint3(), x, y, and z.
| decPoint3 decPoint3::operator- | ( | ) | const [inline] |
Retrieves the negation of this point.
References decPoint3(), x, y, and z.
Retrieves a new point with the difference of this point to another one.
References decPoint3(), 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] |
| bool decPoint3::operator< | ( | const decPoint3 & | p ) | const [inline] |
| bool decPoint3::operator<= | ( | const decPoint3 & | p ) | const [inline] |
| bool decPoint3::operator== | ( | const decPoint3 & | p ) | const [inline] |
| bool decPoint3::operator> | ( | const decPoint3 & | p ) | const [inline] |
| bool decPoint3::operator>= | ( | const decPoint3 & | p ) | const [inline] |
| void decPoint3::Set | ( | int | nx, |
| int | ny, | ||
| int | nz | ||
| ) | [inline] |
| int decPoint3::x |
X Component of point.
Referenced by decPoint3(), operator!=(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator<(), operator<=(), operator=(), operator==(), operator>(), operator>=(), Set(), and SetZero().
| int decPoint3::y |
Y Component of point.
Referenced by decPoint3(), operator!=(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator<(), operator<=(), operator=(), operator==(), operator>(), operator>=(), Set(), and SetZero().
| int decPoint3::z |
Z Component of point.
Referenced by decPoint3(), operator!=(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator<(), operator<=(), operator=(), operator==(), operator>(), operator>=(), Set(), and SetZero().
1.7.2