#include <viewport.h>
Public Member Functions | |
CViewport (CViewport *src) | |
void | copyFrom (const CViewport *src) |
void | load (SimpleFile *file, int param) |
void | save (SimpleFile *file, int indent) |
void | setPosition (const FVector &v) |
void | setPosition (const FPose &pose) |
void | setOrientation (const FMatrix &m) |
void | setOrientation (const FVector &v) |
void | randomizeOrientation () |
void | changeStarColorPixel (StarMode mode, double pixelOffSet) |
void | reposition (double factor) |
void | changeOrientation (const FMatrix &matrix) |
FPose | getPose () |
FPose | getRawPose () |
FVector | getRelativePosNoCentering (int index, const FVector &src) |
FVector | getRelativePosCentering (int index, const FVector &src) |
FVector | getRelativePosCenteringRaw (int index, const FVector &src) |
void | getRelativeXCenterPixels (double *v1, double *v2, double *v3, double *v4) |
const FMatrix & | getOrientation () const |
void | SetRoleAngle (double angle) |
void | setFrontClip (double dist) |
void | setBackClip (double dist) |
void | setCenterYAngle (double angleDegrees) |
void | setCenterZAngle (double angleDegrees) |
Public Attributes | |
FVector | _position |
double | _frontClip |
double | _backClip |
StarColor | _starColor |
double | _valArray [2] |
double | _isZero |
double | _pixel1OffSetX |
double | _pixel2OffSetX |
FVector | _centerVector |
Implements the viewport functionality for viewing the star field in a given position and orientation. CCamera is a big user of this class
void Titanic::CViewport::copyFrom | ( | const CViewport * | src | ) |
Copys the data from another instance
void Titanic::CViewport::load | ( | SimpleFile * | file, |
int | param | ||
) |
Load the data for the class from file
void Titanic::CViewport::save | ( | SimpleFile * | file, |
int | indent | ||
) |
Save the data for the class to file
void Titanic::CViewport::setPosition | ( | const FVector & | v | ) |
Sets the position
void Titanic::CViewport::setPosition | ( | const FPose & | pose | ) |
Sets the position
void Titanic::CViewport::setOrientation | ( | const FMatrix & | m | ) |
Sets the orientation from a passed matrix
void Titanic::CViewport::setOrientation | ( | const FVector & | v | ) |
Sets the orientation from a passed vector
void Titanic::CViewport::changeStarColorPixel | ( | StarMode | mode, |
double | pixelOffSet | ||
) |
The view has changed between starview and skyview Change the enum that tracks the color of the stars Also change the X coordinate pixel offset used for star drawing
void Titanic::CViewport::changeOrientation | ( | const FMatrix & | matrix | ) |
Applys a rotation matrix to the current orientation
void Titanic::CViewport::getRelativeXCenterPixels | ( | double * | v1, |
double * | v2, | ||
double * | v3, | ||
double * | v4 | ||
) |
All arguments are return values First is the x center coordinate relative to y Second is the x center coordinate relative to z Third is the first x center pixel offset Fourth is the second x center pixel offset
const FMatrix& Titanic::CViewport::getOrientation | ( | ) | const |
Returns the viewport's orientation
void Titanic::CViewport::SetRoleAngle | ( | double | angle | ) |
Assigns a roll angle about the view direction
void Titanic::CViewport::setFrontClip | ( | double | dist | ) |
Assign a near clip plane distance
void Titanic::CViewport::setBackClip | ( | double | dist | ) |
Assign a far clipping plane distance
void Titanic::CViewport::setCenterYAngle | ( | double | angleDegrees | ) |
Sets the center vector y angle The actual center y value doesn't change until reset is called
void Titanic::CViewport::setCenterZAngle | ( | double | angleDegrees | ) |
Sets the center vector z angle The actual center z value doesn't change until reset is called