|  | 
|  | Vector () | 
|  | 
|  | Vector (float _x, float _y, float _z) | 
|  | 
|  | Vector (Vector &w) | 
|  | 
|  | ~Vector () | 
|  | 
| bool | operator!= (Vector &arg) | 
|  | 
| Vector | operator- (Vector &arg) | 
|  | 
| Vector | operator-= (Vector &arg) | 
|  | 
| Vector | operator+ (Vector &arg) | 
|  | 
| Vector | operator+= (Vector &arg) | 
|  | 
| Vector | operator* (float s) | 
|  | 
| Vector & | operator*= (float s) | 
|  | 
| Vector | operator/ (float s) | 
|  | 
| Vector & | operator/= (float s) | 
|  | 
| float | Distance3 (Vector &v) | 
|  | 
| float | Distance3Squared (Vector &v) | 
|  | 
| float | DistanceFromLineSquared (float startx, float starty, float startz, Vector &direction) | 
|  | 
| float | Distance2Squared (Vector &v) | 
|  | 
| float | Distance2 (Vector &v) | 
|  | 
| Vector | Rotate (float angle) | 
|  | 
| Vector | Rotate (Vector &orig, float angle) | 
|  | 
| Vector | Rotate (Vector &orig, float angle, Vector &r) | 
|  | 
| void | Normalize (void) | 
|  | 
| float | Magnitude () | 
|  | 
| float | MagnitudeSquared () | 
|  | 
| Vector | CrossProduct (Vector &w) | 
|  | 
| float | DotProduct (Vector &w) | 
|  | 
| float | AngleToVector (Vector &arg) | 
|  | 
| bool | PointInTriangle (Vector &a, Vector &b, Vector &c) | 
|  | 
| bool | CloseTo (Vector &arg, float tolerance=0.0001f) | 
|  | 
| float | DistanceFromLine (Vector &start, Vector &direction) | 
|  | 
| Vector | ProjectPointToLine (Vector &origin, Vector &direction) | 
|  | 
Default constructor. 
Ensures all values are initialized 
 
 
      
        
          | Vector::Vector | ( | float | _x, | 
        
          |  |  | float | _y, | 
        
          |  |  | float | _z | 
        
          |  | ) |  |  | 
      
 
 
      
        
          | float Vector::AngleToVector | ( | Vector & | arg | ) |  | 
      
 
Returns the angle (in radians) between this vector and the argument vect. 
- Parameters
- 
  
  
- Returns
- The resulting angle (in radians) 
 
 
      
        
          | bool Vector::CloseTo | ( | Vector & | arg, | 
        
          |  |  | float | tolerance = 0.0001f | 
        
          |  | ) |  |  | 
      
 
Returns true if this vector is within the radius specified by tolerance. 
- Parameters
- 
  
    | arg | vector to compare with |  | tolerance | the tolerance value |  
 
- Returns
- true if this point within the tolerance 
 
 
Returns the vector cross-product of this vector with the argument vector HS Algebra review: vector cross-product is the vector that is perpendicular to the two given vectors. 
- Parameters
- 
  
  
- Returns
- The resulting cross-product (vector) 
 
 
      
        
          | float Vector::Distance2 | ( | Vector & | v | ) |  | 
      
 
Compute cartesian distance between this point and another one, in 2D. 
- Parameters
- 
  
    | v | The Vector to compute distance to |  
 
- Returns
- The distance between the two points 
 
 
      
        
          | float Vector::Distance2Squared | ( | Vector & | v | ) |  | 
      
 
Compute the square of the cartesian distance between this point and another one, in 2D. 
- Parameters
- 
  
    | v | The vector to compute distance squared to |  
 
- Returns
- The square of the distance between the two points 
 
 
      
        
          | float Vector::Distance3 | ( | Vector & | v | ) |  | 
      
 
Compute the square between this point and another one, in 3D. 
- Parameters
- 
  
    | v | The point to compute distance to. |  
 
- Returns
- The distance between the two points 
 
 
      
        
          | float Vector::Distance3Squared | ( | Vector & | v | ) |  | 
      
 
Compute cartesian distance between this point and another one, in 3D. 
- Parameters
- 
  
    | v | The point to compute distance to. |  
 
- Returns
- The distance between the two points 
 
 
      
        
          | float Vector::DistanceFromLine | ( | Vector & | start, | 
        
          |  |  | Vector & | direction | 
        
          |  | ) |  |  | 
      
 
Returns the distance of this point from the line defined by start and direction. 
- Parameters
- 
  
    | start | Starting point of the line |  | direction | Normalized direction vector for the line |  
 
 
 
      
        
          | float Vector::DistanceFromLineSquared | ( | float | startx, | 
        
          |  |  | float | starty, | 
        
          |  |  | float | startz, | 
        
          |  |  | Vector & | direction | 
        
          |  | ) |  |  | 
      
 
Returns the squared distance of this point from the line defined by start and direction, in 3D. 
- Parameters
- 
  
    | startx | starting x coordinate of the line. |  | starty | starting y coordinate of the line. |  | startz | starting z coordinate of the line. |  | direction | Normalized direction vector for the line. |  
 
- Returns
- the distance from this point. 
 
 
      
        
          | float Vector::DotProduct | ( | Vector & | w | ) |  | 
      
 
Returns the vector dot-product of this vector with the argument vector. 
- Parameters
- 
  
  
- Returns
- The resulting dot-product (scalar) 
 
 
      
        
          | float Vector::Magnitude | ( |  | ) |  | 
      
 
Returns the magnitude of the vector. 
- Returns
- The resulting scalar 
 
 
      
        
          | float Vector::MagnitudeSquared | ( |  | ) |  | 
      
 
Returns the magnitude of the vector squared. 
- Returns
- The resulting scalar 
 
 
      
        
          | void Vector::Normalize | ( | void |  | ) |  | 
      
 
Normalizes the vector into a unit vector. 
 
 
      
        
          | bool Vector::operator!= | ( | Vector & | arg | ) |  | 
      
 
 
      
        
          | Vector Vector::operator* | ( | float | s | ) |  | 
      
 
 
      
        
          | Vector& Vector::operator*= | ( | float | s | ) |  | 
      
 
 
      
        
          | Vector Vector::operator/ | ( | float | s | ) |  | 
      
 
 
      
        
          | Vector& Vector::operator/= | ( | float | s | ) |  | 
      
 
 
Returns true if this vector is in the given triangle specified by abc. 
- Parameters
- 
  
    | a | First triangle vector |  | b | Second triangle vector |  | c | Third triangle vector |  
 
- Returns
- true if this point is inside the triangle, false otherwise 
 
 
Returns the projection of this point onto the line defined by origin and direction. 
- Parameters
- 
  
    | origin | Starting point of the line |  | direction | Normalized direction vector for the line |  
 
 
 
      
        
          | Vector Vector::Rotate | ( | float | angle | ) |  | 
      
 
Rotate this point in 2D clockwise around the z axis. 
- Parameters
- 
  
    | angle | The angle to rotate around, in degrees. |  
 
- Returns
- The rotated vector 
 
 
Rotate this point around a different point in 2D counter-clockwise around the z axis. 
- Parameters
- 
  
    | orig | The rotation origin to rotate around. |  | angle | The angle to rotate around, in degrees. |  
 
- Returns
- The rotated vector 
 
 
Rotate this vector by angle theta counter-clockwise around an arbitrary axis r. 
- Parameters
- 
  
    | orig | The rotation origin to rotate around. |  | angle | The angle to rotate around, in degrees. |  | r | The axis to rotate around. |  
 
- Returns
- The rotated vector 
 
 
The documentation for this class was generated from the following file: