Drag[en]gine Game Engine
1.21
|
3 Component Integer Point. More...
#include <decPoint3.h>
Public Member Functions | |
Constructors and Destructors | |
decPoint3 () | |
Create new point initialized to ( 0,0,0 ). More... | |
decPoint3 (int nx, int ny, int nz) | |
Create new point with the given values. More... | |
decPoint3 (const decPoint3 &p) | |
Create new point with the values of another point. More... | |
decPoint3 (const decPoint &p, int nz) | |
Create new point with the values from a 2-component point augmented with a third value. More... | |
decPoint3 (const decVector &p) | |
Create new point with the values of a 3-component vector discarding fractional parts of all components. More... | |
decPoint3 (const decDVector &p) | |
Create new point with the values of a 3-component vector discarding fractional parts of all components. More... | |
Management | |
float | Length () const |
Length of the point. More... | |
void | SetZero () |
Sets all components to 0. More... | |
void | Set (int nx, int ny, int nz) |
Set components to the given values. More... | |
decPoint3 | Absolute () const |
Retrieves absolute point. More... | |
void | SetSmallest (const decPoint3 &p) |
Set each component to the smallest value of this point and another point. More... | |
decPoint3 | Smallest (const decPoint3 &p) const |
Retrieve point with each component set to the smallest value of this point and another point. More... | |
void | SetLargest (const decPoint3 &p) |
Set each component to the largest value of this point and another point. More... | |
decPoint3 | Largest (const decPoint3 &p) const |
Retrieve point with each component set to the largest value of this point and another point. More... | |
void | SetClamped (const decPoint3 &minValue, const decPoint3 &maxValue) |
Clamp each component to the provided range. More... | |
decPoint3 | Clamped (const decPoint3 &minValue, const decPoint3 &maxValue) const |
Retrieves point with each component clamped to the provided range. More... | |
Operators | |
decPoint3 | operator- () const |
Negation of this point. More... | |
decPoint3 & | operator= (const decPoint3 &p) |
Set components of this point to the values of another one. More... | |
decPoint3 & | operator+= (const decPoint3 &p) |
Adds the components of another point to this one. More... | |
decPoint3 & | operator-= (const decPoint3 &p) |
Subtracts the components of another point from this point. More... | |
decPoint3 & | operator*= (int k) |
Multiplies the components of this point with a value k. More... | |
decPoint3 & | operator/= (int k) |
Divides the components of this point by a value k. If the value k is 0 an exception is thrown. More... | |
decPoint3 | operator+ (const decPoint3 &p) const |
Retrieves a new point with the sum of this point with another one. More... | |
decPoint3 | operator- (const decPoint3 &p) const |
Retrieves a new point with the difference of this point to another one. More... | |
decPoint3 | operator* (int k) const |
Retrieves a new point with this point scaled by k. More... | |
int | operator* (const decPoint3 &p) const |
Calculates the dot product of this point with another one. More... | |
decPoint3 | operator/ (int k) const |
Retrieves a new point with this point divided by k. If k is 0 an exception is thrown. More... | |
bool | operator== (const decPoint3 &p) const |
Determines if this point is component wise equal to another point. More... | |
bool | operator!= (const decPoint3 &p) const |
Determines if this point is component wise not equal to another point. More... | |
bool | operator< (const decPoint3 &p) const |
Determines if all the components of this point are less then the components of another one. More... | |
bool | operator> (const decPoint3 &p) const |
Determines if all the components of this point are greater then the components of another one. More... | |
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. More... | |
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. More... | |
Public Attributes | |
int | x |
X Component of point. More... | |
int | y |
Y Component of point. More... | |
int | z |
Z Component of point. More... | |
3 Component Integer Point.
decPoint3::decPoint3 | ( | ) |
Create new point initialized to ( 0,0,0 ).
decPoint3::decPoint3 | ( | int | nx, |
int | ny, | ||
int | nz | ||
) |
Create new point with the given values.
decPoint3::decPoint3 | ( | const decPoint3 & | p | ) |
Create new point with the values of another point.
decPoint3::decPoint3 | ( | const decPoint & | p, |
int | nz | ||
) |
Create new point with the values from a 2-component point augmented with a third value.
decPoint3::decPoint3 | ( | const decVector & | p | ) |
Create new point with the values of a 3-component vector discarding fractional parts of all components.
decPoint3::decPoint3 | ( | const decDVector & | p | ) |
Create new point with the values of a 3-component vector discarding fractional parts of all components.
decPoint3 decPoint3::Absolute | ( | ) | const |
Retrieves absolute point.
Retrieves point with each component clamped to the provided range.
Retrieve point with each component set to the largest value of this point and another point.
float decPoint3::Length | ( | ) | const |
Length of the point.
bool decPoint3::operator!= | ( | const decPoint3 & | p | ) | const |
Determines if this point is component wise not equal to another point.
int decPoint3::operator* | ( | const decPoint3 & | p | ) | const |
Calculates the dot product of this point with another one.
decPoint3 decPoint3::operator* | ( | int | k | ) | const |
Retrieves a new point with this point scaled by k.
decPoint3& decPoint3::operator*= | ( | int | k | ) |
Multiplies the components of this point with a value k.
Retrieves a new point with the sum of this point with another one.
Adds the components of another point to this one.
decPoint3 decPoint3::operator- | ( | ) | const |
Negation of this point.
Retrieves a new point with the difference of this point to another one.
Subtracts the components of another point from this point.
decPoint3 decPoint3::operator/ | ( | int | k | ) | const |
Retrieves a new point with this point divided by k. If k is 0 an exception is thrown.
decPoint3& decPoint3::operator/= | ( | int | k | ) |
Divides the components of this point by a value k. If the value k is 0 an exception is thrown.
bool decPoint3::operator< | ( | const decPoint3 & | p | ) | const |
Determines if all the components of this point are less then the components of another one.
bool decPoint3::operator<= | ( | const decPoint3 & | p | ) | const |
Determines if all the components of this point are less then or equal to the components of another one.
Set components of this point to the values of another one.
bool decPoint3::operator== | ( | const decPoint3 & | p | ) | const |
Determines if this point is component wise equal to another point.
bool decPoint3::operator> | ( | const decPoint3 & | p | ) | const |
Determines if all the components of this point are greater then the components of another one.
bool decPoint3::operator>= | ( | const decPoint3 & | p | ) | const |
Determines if all the components of this point are greater then or equal to the components of another one.
void decPoint3::Set | ( | int | nx, |
int | ny, | ||
int | nz | ||
) |
Set components to the given values.
Clamp each component to the provided range.
void decPoint3::SetLargest | ( | const decPoint3 & | p | ) |
Set each component to the largest value of this point and another point.
void decPoint3::SetSmallest | ( | const decPoint3 & | p | ) |
Set each component to the smallest value of this point and another point.
void decPoint3::SetZero | ( | ) |
Sets all components to 0.
Retrieve point with each component set to the smallest value of this point and another point.
int decPoint3::x |
X Component of point.
int decPoint3::y |
Y Component of point.
int decPoint3::z |
Z Component of point.