gcu::Vector Class Reference
3D vector.
More...
#include <gcu/vector.h>
List of all members.
Detailed Description
3D vector.
3D vectors class.
Definition at line 39 of file vector.h.
Constructor & Destructor Documentation
Constructs a vector with all three coordinates equal to 0.
gcu::Vector::Vector |
( |
double |
x, |
|
|
double |
y, |
|
|
double |
z | |
|
) |
| | |
- Parameters:
-
| x | the first coordinate. |
| y | the second coordinate. |
| z | the third coordinate. |
Constructs a vector using the given coordinates.
gcu::Vector::Vector |
( |
double |
d[3] |
) |
|
- Parameters:
-
| d | an array of coordinates. |
Constructs a vector using the given coordinates.
gcu::Vector::Vector |
( |
Vector const & |
v |
) |
|
- Parameters:
-
Coopy constructor.
Member Function Documentation
Vector gcu::Vector::CreateOrthogonal |
( |
|
) |
const |
- Returns:
- a Vector orthogonal to this.
- Parameters:
-
- Returns:
- the vectorial product of this and v.
double gcu::Vector::GetLength |
( |
|
) |
const |
gcu::Vector::GetRefX |
( |
void |
|
) |
[inline] |
- Returns:
- the first vector coordinate as a reference.
Definition at line 138 of file vector.h.
gcu::Vector::GetRefY |
( |
void |
|
) |
[inline] |
- Returns:
- the second vector coordinate as a reference.
Definition at line 150 of file vector.h.
gcu::Vector::GetRefZ |
( |
void |
|
) |
[inline] |
- Returns:
- the third vector coordinate as a reference.
Definition at line 162 of file vector.h.
gcu::Vector::GetX |
( |
void |
|
) |
const [inline] |
- Returns:
- the first vector coordinate.
Definition at line 138 of file vector.h.
gcu::Vector::GetY |
( |
void |
|
) |
const [inline] |
- Returns:
- the second vector coordinate.
Definition at line 150 of file vector.h.
gcu::Vector::GetZ |
( |
void |
|
) |
const [inline] |
- Returns:
- the third vector coordinate.
Definition at line 162 of file vector.h.
Vector gcu::Vector::operator* |
( |
double |
m |
) |
const |
- Parameters:
-
- Returns:
- a Vector equal to m * this.
Vector gcu::Vector::operator*= |
( |
double |
m |
) |
|
- Parameters:
-
Multiplies
this by
m.
- Returns:
- this after the multiplication.
- Parameters:
-
- Returns:
- the sum of v and this.
- Parameters:
-
- Returns:
- the difference this minus v.
Vector gcu::Vector::operator/ |
( |
double |
d |
) |
const |
- Parameters:
-
- Returns:
- a Vector equal to (1/d) * this.
Vector gcu::Vector::operator/= |
( |
double |
d |
) |
|
- Parameters:
-
Divides
this by
d.
- Returns:
- this after the division.
double gcu::Vector::operator[] |
( |
unsigned |
i |
) |
const |
- Parameters:
-
return the ith coordinate.
gcu::Vector::SetX |
( |
double |
x |
) |
[inline] |
- Parameters:
-
Sets the first vector coordinate.
Definition at line 138 of file vector.h.
gcu::Vector::SetY |
( |
double |
y |
) |
[inline] |
- Parameters:
-
Sets the second vector coordinate.
Definition at line 150 of file vector.h.
gcu::Vector::SetZ |
( |
double |
z |
) |
[inline] |
- Parameters:
-
Sets the third vector coordinate.
Definition at line 162 of file vector.h.
The documentation for this class was generated from the following file: