MAK Legion API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Legion::Vector3f Class Reference
+ Collaboration diagram for Legion::Vector3f:

Public Member Functions

 Vector3f ()
 
 Vector3f (float x, float y, float z)
 
 Vector3f (const float *tuple)
 
 Vector3f (const Vector3f &other)
 
 Vector3f (const Vector3d &other)
 
Vector3foperator= (const Vector3f &vec)
 
bool operator== (const Vector3f &vec) const
 
bool operator!= (const Vector3f &vec) const
 
bool operator< (const Vector3f &vec) const
 
bool operator<= (const Vector3f &vec) const
 
bool operator> (const Vector3f &vec) const
 
bool operator>= (const Vector3f &vec) const
 
Vector3f operator+ (const Vector3f &vec) const
 
Vector3f operator- (const Vector3f &vec) const
 
Vector3f operator* (float scalar) const
 
Vector3f operator/ (float scalar) const
 
Vector3f operator- () const
 
Vector3foperator+= (const Vector3f &vec)
 
Vector3foperator-= (const Vector3f &vec)
 
Vector3foperator*= (float scalar)
 
Vector3foperator/= (float scalar)
 
float length () const
 
float lengthSquared () const
 
float dot (const Vector3f &vec) const
 
Vector3f cross (const Vector3f &vec) const
 
Vector3f unitCross (const Vector3f &vec) const
 
float normalize ()
 
float distanceFrom (const Vector3f &vec) const
 
float distanceFromSquared (const Vector3f &vec) const
 
void setLength (float newLength)
 
void invert ()
 
bool isZero ()
 
float angleBetween (const Vector3f &v) const
 Calculates the angle between this vector and another one in grad. More...
 
bool isBetweenPoints (const Vector3f &begin, const Vector3f &end) const
 Returns if this vector interpreted as a point is on a line between two other points. More...
 

Static Public Member Functions

static Vector3f interpolate (const Vector3f &v0, const Vector3f &v1, float t)
 returns interpolated vector More...
 

Public Attributes

union {
   struct {
      float   x
 
      float   y
 
      float   z
 
   } 
 
   float   data [3]
 
}; 
 

Constructor & Destructor Documentation

Legion::Vector3f::Vector3f ( )
Legion::Vector3f::Vector3f ( float  x,
float  y,
float  z 
)
Legion::Vector3f::Vector3f ( const float *  tuple)
Legion::Vector3f::Vector3f ( const Vector3f other)
Legion::Vector3f::Vector3f ( const Vector3d other)

Member Function Documentation

float Legion::Vector3f::angleBetween ( const Vector3f v) const
inline

Calculates the angle between this vector and another one in grad.

Vector3f Legion::Vector3f::cross ( const Vector3f vec) const
inline
float Legion::Vector3f::distanceFrom ( const Vector3f vec) const
inline
float Legion::Vector3f::distanceFromSquared ( const Vector3f vec) const
inline
float Legion::Vector3f::dot ( const Vector3f vec) const
inline
static Vector3f Legion::Vector3f::interpolate ( const Vector3f v0,
const Vector3f v1,
float  t 
)
static

returns interpolated vector

Parameters
other,:other vector to interpolate between
d,:value between 0.0f and 1.0f.
void Legion::Vector3f::invert ( )
inline
bool Legion::Vector3f::isBetweenPoints ( const Vector3f begin,
const Vector3f end 
) const
inline

Returns if this vector interpreted as a point is on a line between two other points.

It is assumed that the point is on the line.

Parameters
begin,:Beginning vector to compare between.
end,:Ending vector to compare between.
Returns
True if this vector is between begin and end. False if not.
bool Legion::Vector3f::isZero ( )
inline
float Legion::Vector3f::length ( ) const
inline
float Legion::Vector3f::lengthSquared ( ) const
inline
float Legion::Vector3f::normalize ( )
inline
bool Legion::Vector3f::operator!= ( const Vector3f vec) const
inline
Vector3f Legion::Vector3f::operator* ( float  scalar) const
inline
Vector3f& Legion::Vector3f::operator*= ( float  scalar)
inline
Vector3f Legion::Vector3f::operator+ ( const Vector3f vec) const
inline
Vector3f& Legion::Vector3f::operator+= ( const Vector3f vec)
inline
Vector3f Legion::Vector3f::operator- ( const Vector3f vec) const
inline
Vector3f Legion::Vector3f::operator- ( ) const
inline
Vector3f& Legion::Vector3f::operator-= ( const Vector3f vec)
inline
Vector3f Legion::Vector3f::operator/ ( float  scalar) const
inline
Vector3f& Legion::Vector3f::operator/= ( float  scalar)
inline
bool Legion::Vector3f::operator< ( const Vector3f vec) const
inline
bool Legion::Vector3f::operator<= ( const Vector3f vec) const
inline
Vector3f& Legion::Vector3f::operator= ( const Vector3f vec)
inline
bool Legion::Vector3f::operator== ( const Vector3f vec) const
inline
bool Legion::Vector3f::operator> ( const Vector3f vec) const
inline
bool Legion::Vector3f::operator>= ( const Vector3f vec) const
inline
void Legion::Vector3f::setLength ( float  newLength)
inline
Vector3f Legion::Vector3f::unitCross ( const Vector3f vec) const
inline

Member Data Documentation

union { ... }
float Legion::Vector3f::data[3]
float Legion::Vector3f::x
float Legion::Vector3f::y
float Legion::Vector3f::z

Referenced by vecToOrientation().


The documentation for this class was generated from the following file:

Document ID: Generated on Mon Mar 8 15:11:30 EST 2021 from SVN revision 225633
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)