WSM API v25.0.0 (2025.0.0)
Loading...
Searching...
No Matches
WSM::Utils::CameraData Class Reference

Description

#include <interfaces.h>

Public Member Functions

 CameraData ()
 Constructor.
 
 CameraData (const WSM::Point3d &pos, const WSM::Quaternion3d &rot, WSM::Utils::CameraProjectionType projectionType=WSM::Utils::CameraProjectionType::PERSPECTIVE, double fov=0.502, double distToTarget=0.0)
 
bool operator== (const CameraData &aOther) const
 
bool operator!= (const CameraData &aOther) const
 
CameraDataoperator= (const CameraData &aOther)
 
double ComputeHorizontalFOV (int nScreenWidth, int nScreenHeight) const
 mFOV is a half angle field of view in radians that could be either horizontal or vertical depending on the screen height and width.
 

Public Attributes

double mPosX
 
double mPosY
 
double mPosZ
 
double mRotX
 
double mRotY
 
double mRotZ
 
double mRotW
 
CameraProjectionType mProjectionType
 
double mDistanceToTarget
 
double mFOV
 
double mFOVTan
 
float mScreenHeight = 480
 TODO(hauswij): Are all these really needed?
 
float mScreenWidth = 640
 
double mLogicalDisplayDensity = 1.7
 
double mScreenPPI = 96.0
 
double mOrthoWidth = 0.0
 The width and height of the view when orthogonal.
 
double mOrthoHeight = 0.0
 
double mScreenPickApertureScaleFactor = 1.0
 Screen pickAperture scale factor.
 
float mNear = 1.0
 Near/Far clipping planes.
 
float mFar = 100.0
 

Constructor & Destructor Documentation

◆ CameraData() [1/2]

WSM::Utils::CameraData::CameraData ( )
inline

Constructor.

◆ CameraData() [2/2]

WSM::Utils::CameraData::CameraData ( const WSM::Point3d pos,
const WSM::Quaternion3d rot,
WSM::Utils::CameraProjectionType  projectionType = WSM::Utils::CameraProjectionType::PERSPECTIVE,
double  fov = 0.502,
double  distToTarget = 0.0 
)
inline

Member Function Documentation

◆ ComputeHorizontalFOV()

double WSM::Utils::CameraData::ComputeHorizontalFOV ( int  nScreenWidth,
int  nScreenHeight 
) const
inline

mFOV is a half angle field of view in radians that could be either horizontal or vertical depending on the screen height and width.

This method converts to a standard full horizontal field of view in radians.

Parameters
[in]nScreenWidth
[in]nScreenHeight

◆ operator!=()

bool WSM::Utils::CameraData::operator!= ( const CameraData aOther) const
inline

◆ operator=()

CameraData & WSM::Utils::CameraData::operator= ( const CameraData aOther)
inline

◆ operator==()

bool WSM::Utils::CameraData::operator== ( const CameraData aOther) const
inline

Member Data Documentation

◆ mDistanceToTarget

double WSM::Utils::CameraData::mDistanceToTarget

◆ mFar

float WSM::Utils::CameraData::mFar = 100.0

◆ mFOV

double WSM::Utils::CameraData::mFOV

◆ mFOVTan

double WSM::Utils::CameraData::mFOVTan

◆ mLogicalDisplayDensity

double WSM::Utils::CameraData::mLogicalDisplayDensity = 1.7

◆ mNear

float WSM::Utils::CameraData::mNear = 1.0

Near/Far clipping planes.

◆ mOrthoHeight

double WSM::Utils::CameraData::mOrthoHeight = 0.0

◆ mOrthoWidth

double WSM::Utils::CameraData::mOrthoWidth = 0.0

The width and height of the view when orthogonal.

Note these are only used to return data for the camera during export. These will likely need to be fully implemented when we fix orthographic views.

◆ mPosX

double WSM::Utils::CameraData::mPosX

◆ mPosY

double WSM::Utils::CameraData::mPosY

◆ mPosZ

double WSM::Utils::CameraData::mPosZ

◆ mProjectionType

CameraProjectionType WSM::Utils::CameraData::mProjectionType

◆ mRotW

double WSM::Utils::CameraData::mRotW

◆ mRotX

double WSM::Utils::CameraData::mRotX

◆ mRotY

double WSM::Utils::CameraData::mRotY

◆ mRotZ

double WSM::Utils::CameraData::mRotZ

◆ mScreenHeight

float WSM::Utils::CameraData::mScreenHeight = 480

TODO(hauswij): Are all these really needed?

◆ mScreenPickApertureScaleFactor

double WSM::Utils::CameraData::mScreenPickApertureScaleFactor = 1.0

Screen pickAperture scale factor.

◆ mScreenPPI

double WSM::Utils::CameraData::mScreenPPI = 96.0

◆ mScreenWidth

float WSM::Utils::CameraData::mScreenWidth = 640

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