This is the interface class for the Vector3D and Vector2D classes.
More...
#include <vector.h>
|
void | SetX (float x_) |
| This function uses to set x coordinator of a vector instance.
|
|
void | SetZ (float z_) |
| This function uses to set z coordinator of a vector instance.
|
|
float | GetX () const |
| This function uses to get x coordinator of a vector instance.
|
|
float | GetZ () const |
| This function uses to get z coordinator of a vector instance.
|
|
float | GetY () const |
| This function uses to get y coordinator of a vector instance.
|
|
float | Magnitude () |
| This function returns the magitude of a vector instance.
|
|
bool | operator== (const Vector &) |
| Convert vector distance to std::vector<float> instances. More...
|
|
virtual void | Print ()=0 |
| Function to print the coordinate of a vector instance.
|
|
|
float | x |
|
float | y |
|
float | z |
| Coordinates of a vector.
|
|
This is the interface class for the Vector3D and Vector2D classes.
This class will set up (virtual) common methods as well as attributes shared by both Vector3D and vector2D class. Also has some friends functions to find relationship between more than one vector instances
◆ operator==()
bool csci3081::Vector::operator== |
( |
const Vector & |
other | ) |
|
Convert vector distance to std::vector<float> instances.
- Parameters
-
- Returns
- True if argument vector is equal to current object False otherwise
◆ Distance
Compute the distance (float variable) between two vectors instances.
- Parameters
-
- Returns
- float Distance of v1 and v2
◆ DotProduct
Compute the dot product (float variable) between two vectors instances.
- Parameters
-
- Returns
- float Dot product of v1 and v2
◆ toVectorFloat
std::vector<float> toVectorFloat |
( |
Vector & |
v | ) |
|
|
friend |
Convert vector distance to std::vector<float> instances.
- Parameters
-
- Returns
- std::vector<float> Have x,y,z as its elements
The documentation for this class was generated from the following files:
- /home/user/repo/project/include/vector.h
- /home/user/repo/project/src/vector.cc