ScummVM API documentation
Titanic::CCamera Class Reference

#include <camera.h>

Public Member Functions

 CCamera (const CNavigationInfo *data)
 
 CCamera (CViewport *src)
 
virtual void setViewport (const CViewport *src)
 
virtual void setMotion (const CNavigationInfo *src)
 
bool isNotInLockingProcess ()
 
virtual void setPosition (const FVector &v)
 
virtual void setOrientation (const FVector &v)
 
virtual void setRoleAngle (double angle)
 
virtual void setFrontClip (double n)
 
virtual void SetBackClip (double f)
 
virtual void setCenterYAngle (int v)
 
virtual void setCenterZAngle (int v)
 
virtual void randomizeOrientation ()
 
virtual void setFields (StarMode mode, double val)
 
virtual void setDestination (const FVector &v)
 
virtual void updatePosition (CErrorCode *errorCode)
 
virtual void accelerate ()
 
virtual void deccelerate ()
 
virtual void fullSpeed ()
 
virtual void stop ()
 
virtual void reposition (double factor)
 
virtual void setPosition (const FPose &pose)
 
virtual void changeOrientation (FMatrix &m)
 
virtual FPose getPose ()
 
virtual FPose getRawPose ()
 
virtual double getFrontClip () const
 
virtual double getBackClip () const
 
virtual StarColor getStarColor () const
 
virtual FVector getRelativePos (int index, const FVector &src)
 
virtual FVector getRelativePosNoCentering (int index, const FVector &src)
 
virtual FVector getRelativePosCentering (int index, const FVector &v)
 
virtual FVector getRelativePosCenteringRaw (int index, const FVector &v)
 
virtual void setViewportAngle (const FPoint &angles)
 
virtual StarLockLevel getLockLevel () const
 
virtual bool addLockedStar (const FVector v)
 
virtual bool removeLockedStar ()
 
virtual void getRelativeXCenterPixels (double *v1, double *v2, double *v3, double *v4)
 
virtual void load (SimpleFile *file, int param)
 
virtual void save (SimpleFile *file, int indent)
 
float calcAngleForMinDist (FVector &x, FVector &y, float &minDistance)
 
bool isMoved () const
 
void setIsMoved ()
 
void clearIsMoved ()
 
bool lockMarker1 (FVector v1, FVector v2, FVector v3)
 
bool lockMarker2 (CViewport *viewport, const FVector &v)
 
bool lockMarker3 (CViewport *viewport, const FVector &v)
 

Static Public Member Functions

static void init ()
 
static void deinit ()
 

Detailed Description

Implements a reference point from which the starmap can be viewed

Member Function Documentation

◆ setViewport()

virtual void Titanic::CCamera::setViewport ( const CViewport src)
virtual

Copy the state from a specified viewport

◆ setMotion()

virtual void Titanic::CCamera::setMotion ( const CNavigationInfo src)
virtual

Set motion from the passed navigation info

◆ isNotInLockingProcess()

bool Titanic::CCamera::isNotInLockingProcess ( )

The mover/view is not currently homing in on a new star This can mean it is unmarked, or that it is fully locked onto one star or more (but not in the process of doing so)

◆ setPosition() [1/2]

virtual void Titanic::CCamera::setPosition ( const FVector v)
virtual

Set the camera position

◆ setOrientation()

virtual void Titanic::CCamera::setOrientation ( const FVector v)
virtual

Sets the camera orientation

◆ setRoleAngle()

virtual void Titanic::CCamera::setRoleAngle ( double  angle)
virtual

Assigns a roll angle about the view direction

◆ setFrontClip()

virtual void Titanic::CCamera::setFrontClip ( double  n)
virtual

Assign a near clip plane distance

◆ SetBackClip()

virtual void Titanic::CCamera::SetBackClip ( double  f)
virtual

Assign a far clipping plane distance

◆ setDestination()

virtual void Titanic::CCamera::setDestination ( const FVector v)
virtual

Sets the destination to move the camera to

◆ updatePosition()

virtual void Titanic::CCamera::updatePosition ( CErrorCode errorCode)
virtual

Updates the camera position

◆ accelerate()

virtual void Titanic::CCamera::accelerate ( )
virtual

Increases movement speed in forward direction

◆ deccelerate()

virtual void Titanic::CCamera::deccelerate ( )
virtual

Increases movement speed in backward direction

◆ fullSpeed()

virtual void Titanic::CCamera::fullSpeed ( )
virtual

Increase to full speed

◆ stop()

virtual void Titanic::CCamera::stop ( )
virtual

Completely stop

◆ setPosition() [2/2]

virtual void Titanic::CCamera::setPosition ( const FPose pose)
virtual

Set the camera position

◆ getPose()

virtual FPose Titanic::CCamera::getPose ( )
virtual

Get the position and direction of the camera

◆ getFrontClip()

virtual double Titanic::CCamera::getFrontClip ( ) const
virtual

Get the front clipping distance

◆ getBackClip()

virtual double Titanic::CCamera::getBackClip ( ) const
virtual

Get the back clipping distance

◆ getRelativePos()

virtual FVector Titanic::CCamera::getRelativePos ( int  index,
const FVector src 
)
virtual

Return the passed vector relative to the center of the viewpoint

◆ setViewportAngle()

virtual void Titanic::CCamera::setViewportAngle ( const FPoint angles)
virtual

Sets the viewport position within the starfield

◆ getLockLevel()

virtual StarLockLevel Titanic::CCamera::getLockLevel ( ) const
inlinevirtual

How many stars are currently locked onto

◆ addLockedStar()

virtual bool Titanic::CCamera::addLockedStar ( const FVector  v)
virtual

Adds the row for a locked in marker/star

Remarks
This can't be a pass-by-reference, since adding the vector for the star destroys the calling star vector

◆ removeLockedStar()

virtual bool Titanic::CCamera::removeLockedStar ( )
virtual

Removes the most recent locked in marker/star

Remarks
This can't be a pass-by-reference, since adding the vector for the star destroys the calling star vector

◆ getRelativeXCenterPixels()

virtual void Titanic::CCamera::getRelativeXCenterPixels ( double *  v1,
double *  v2,
double *  v3,
double *  v4 
)
virtual

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

◆ load()

virtual void Titanic::CCamera::load ( SimpleFile file,
int  param 
)
virtual

Load the data for the class from file

◆ save()

virtual void Titanic::CCamera::save ( SimpleFile file,
int  indent 
)
virtual

Save the data for the class to file

◆ calcAngleForMinDist()

float Titanic::CCamera::calcAngleForMinDist ( FVector x,
FVector y,
float &  minDistance 
)

Calculates the angle of rotation of y that achieves the minimum distance to x. The angle is in degrees. Also returns the minimum distance calculated

◆ isMoved()

bool Titanic::CCamera::isMoved ( ) const
inline

Returns true for whether the camera has been moved

◆ setIsMoved()

void Titanic::CCamera::setIsMoved ( )
inline

Sets the camera as having been moved

◆ clearIsMoved()

void Titanic::CCamera::clearIsMoved ( )
inline

Resets the flag for whether the camera has moved

◆ lockMarker1()

bool Titanic::CCamera::lockMarker1 ( FVector  v1,
FVector  v2,
FVector  v3 
)

Lock in the first matched star marker

◆ lockMarker2()

bool Titanic::CCamera::lockMarker2 ( CViewport viewport,
const FVector v 
)

Lock in the second matched star marker

◆ lockMarker3()

bool Titanic::CCamera::lockMarker3 ( CViewport viewport,
const FVector v 
)

Lock in the third and final matched star marker


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