ScummVM API documentation
Titanic::FVector Class Reference

#include <fvector.h>

Public Member Functions

 FVector (float x, float y, float z)
 
void clear ()
 
FVector swapComponents () const
 
FVector crossProduct (const FVector &src) const
 
void rotVectAxisY (float angleDeg)
 
bool normalize (float &hyp)
 
void normalize ()
 
FVector half (const FVector &v) const
 
FVector getPolarCoord () const
 
float getDistance (const FVector &src) const
 
FVector matProdRowVect (const FPose &pose) const
 
FPose getFrameTransform (const FVector &v)
 
FPose formRotXY () const
 
bool operator== (const FVector &src) const
 
bool operator!= (const FVector &src) const
 
FVector operator+ (const FVector &delta) const
 
FVector operator- (const FVector &delta) const
 
const FVector operator* (float right) const
 
const FVector operator* (const FVector &right) const
 
void operator+= (const FVector &delta)
 
void operator-= (const FVector &delta)
 
void operator+= (const FPoint &delta)
 
void operator-= (const FPoint &delta)
 
Common::String toString () const
 

Public Attributes

float _x
 
float _y
 
float _z
 

Detailed Description

Floating point vector class.

Member Function Documentation

◆ clear()

void Titanic::FVector::clear ( )
inline

Clears the vector

◆ swapComponents()

FVector Titanic::FVector::swapComponents ( ) const

Returns a vector with all components of this vector circularlly rotated up 1. this x being _y, this y being _z, and this z being _x. A sign change may also be done on x/_y based on some conditions.

◆ crossProduct()

FVector Titanic::FVector::crossProduct ( const FVector src) const

Calculates the cross-product between this matrix and a passed one

◆ rotVectAxisY()

void Titanic::FVector::rotVectAxisY ( float  angleDeg)

Rotate this vector about the Y axis

◆ normalize()

bool Titanic::FVector::normalize ( float &  hyp)

Attempts to normalizes the vector so the length from origin equals 1.0 Return value is whether or not it was successful in normalizing First argument is scale value that normalizes the vector

◆ half()

FVector Titanic::FVector::half ( const FVector v) const

Calculates a vector halfway between two given vectors

◆ getPolarCoord()

FVector Titanic::FVector::getPolarCoord ( ) const

Returns a vector, v, that represents a magnitude, and two angles in radians

  1. Scale this vector to be unit magnitude and store scale in x component of v
  2. X rotation angle from +y axis of this vector is put in y component of v
  3. z component output of v is the 4-quadrant angle that z makes with x (Y axis rotation)

◆ getDistance()

float Titanic::FVector::getDistance ( const FVector src) const

Returns the distance between a specified point and this one

◆ matProdRowVect()

FVector Titanic::FVector::matProdRowVect ( const FPose pose) const

Returns a vector that is this vector on the left as a row vector times the 3x4 affine matrix on the right.

◆ getFrameTransform()

FPose Titanic::FVector::getFrameTransform ( const FVector v)

Returns a matrix that contains the frame rotation based on this vector and a vector rotation based on input vector v

◆ formRotXY()

FPose Titanic::FVector::formRotXY ( ) const

Constructs an affine matrix that does a x then a y axis frame rotation based on the orientation of this vector

◆ operator==()

bool Titanic::FVector::operator== ( const FVector src) const
inline

Returns true if the passed vector equals this one

◆ operator!=()

bool Titanic::FVector::operator!= ( const FVector src) const
inline

Returns true if the passed vector does not equal this one

◆ toString()

Common::String Titanic::FVector::toString ( ) const

Converts the vector to a string


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