Code_TYMPAN  4.4.0
Industrial site acoustic simulation
Public Member Functions | Private Member Functions | Private Attributes | List of all members
OGLCamera Class Reference

#include <OGLCamera.h>

Public Member Functions

 OGLCamera (const QVector3D &_from, const QVector3D &_to, const QVector3D &_up, int w, int h, CameraType eCameraType)
 
CameraType cameraType () const
 
void setCameraType (CameraType eCameraType)
 
void moveFront ()
 
void moveBack ()
 
void moveUp ()
 
void moveDown ()
 
void moveLeft ()
 
void moveRight ()
 
void move (const QVector3D &_direction)
 
void moveFront (NxReal _distance)
 
void moveBack (NxReal _distance)
 
void moveUp (NxReal _distance)
 
void moveDown (NxReal _distance)
 
void moveLeft (NxReal _distance)
 
void moveRight (NxReal _distance)
 
void setDistanceStep (NxReal _magnitudeStepUp, NxReal _magnitudeStepFront, NxReal _magnitudeStepLeft)
 
void setAllAngleStep (NxReal _angle)
 
void setAngleStep (NxReal _stepAngleUpDown, NxReal _stepAngleLeftRight, NxReal _stepAngleSide)
 
const QVector3D & from () const
 
void setFrom (const QVector3D &_from)
 
const QVector3D & to () const
 
void setTo (const QVector3D &_to)
 
void setUp (const QVector3D &_up)
 
void setFromToUp (const QVector3D &_from, const QVector3D &_to, const QVector3D &_up)
 
const QVector3D & front () const
 
void setDistanceFromToLockFrom (NxReal _distanceFromTo)
 
void setDistanceFromToLockTo (NxReal _distanceFromTo)
 
void setModeLock (bool _modeLockUpDown, bool _modeLockLeftRight, bool _modeLockSide)
 
void setSize (int w, int h)
 
void calculateStepVectors ()
 
void zoom (double zoomFactor)
 
void azimuth (NxReal _angle)
 
void elevation (NxReal _angle)
 
void roll (NxReal _angle)
 
void resetZoom (int w=-1, int h=-1)
 
void resetTranslation ()
 
void setTranslation (double x, double y, double z)
 
void getTranslation (double &x, double &y, double &z)
 
void resetRotations ()
 
void setDefaultZoomFactor (double defaultZoomFactor)
 
void getPosition (double &x, double &y, double &z) const
 
const QMatrix4x4 & viewMatrix () const
 
const QMatrix4x4 & projectionMatrix () const
 

Private Member Functions

void invalidateProjectionMatrix () const
 
void invalidateViewMatrix () const
 
void updateProjectionMatrix () const
 
void updateViewMatrix () const
 

Private Attributes

QVector3D _from
 
QVector3D _to
 
QVector3D _up
 
QVector3D _left
 
QVector3D _front
 
QVector3D stepUp
 
QVector3D stepLeft
 
QVector3D stepFront
 
QVector3D flyTo
 
QVector3D flyFrom
 
QVector3D flyFromTo
 
QVector3D flyUp
 
QVector3D flyLeft
 
QVector3D flyFront
 
NxReal stepAngleUpDown
 
NxReal stepAngleLeftRight
 
NxReal stepAngleSide
 
NxReal distanceFromTo
 
QVector3D fromTo
 
bool modeLockUpDown
 
bool modeLockLeftRight
 
bool modeLockSide
 
NxReal magnitudeStepUp
 
NxReal magnitudeStepFront
 
NxReal magnitudeStepLeft
 
int m_w
 
int m_h
 
double m_zoomFactor
 
double m_defaultZoomFactor
 
double m_angleAz
 
double m_angleEl
 
double m_angleRo
 
CameraType m_eCameraType
 
QVector3D m_translate
 
bool _viewMatrixDirty
 
bool _projectionMatrixDirty
 
QMatrix4x4 _viewMatrix
 
QMatrix4x4 _projectionMatrix
 

Detailed Description

Definition at line 46 of file OGLCamera.h.

Constructor & Destructor Documentation

◆ OGLCamera()

OGLCamera::OGLCamera ( const QVector3D &  _from,
const QVector3D &  _to,
const QVector3D &  _up,
int  w,
int  h,
CameraType  eCameraType 
)

Definition at line 37 of file OGLCamera.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ azimuth()

void OGLCamera::azimuth ( NxReal  _angle)

Definition at line 396 of file OGLCamera.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ calculateStepVectors()

void OGLCamera::calculateStepVectors ( )

Definition at line 341 of file OGLCamera.cpp.

Here is the caller graph for this function:

◆ cameraType()

CameraType OGLCamera::cameraType ( ) const

Definition at line 92 of file OGLCamera.cpp.

Here is the caller graph for this function:

◆ elevation()

void OGLCamera::elevation ( NxReal  _angle)

Definition at line 403 of file OGLCamera.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ from()

const QVector3D & OGLCamera::from ( ) const

Definition at line 263 of file OGLCamera.cpp.

Here is the caller graph for this function:

◆ front()

const QVector3D & OGLCamera::front ( ) const

Definition at line 313 of file OGLCamera.cpp.

Here is the caller graph for this function:

◆ getPosition()

void OGLCamera::getPosition ( double &  x,
double &  y,
double &  z 
) const

Definition at line 481 of file OGLCamera.cpp.

Here is the caller graph for this function:

◆ getTranslation()

void OGLCamera::getTranslation ( double &  x,
double &  y,
double &  z 
)

Definition at line 474 of file OGLCamera.cpp.

Here is the caller graph for this function:

◆ invalidateProjectionMatrix()

void OGLCamera::invalidateProjectionMatrix ( ) const
inlineprivate

Definition at line 126 of file OGLCamera.h.

Here is the caller graph for this function:

◆ invalidateViewMatrix()

void OGLCamera::invalidateViewMatrix ( ) const
inlineprivate

Definition at line 130 of file OGLCamera.h.

Here is the caller graph for this function:

◆ move()

void OGLCamera::move ( const QVector3D &  _direction)

Definition at line 97 of file OGLCamera.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ moveBack() [1/2]

void OGLCamera::moveBack ( )

Definition at line 120 of file OGLCamera.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ moveBack() [2/2]

void OGLCamera::moveBack ( NxReal  _distance)

Definition at line 216 of file OGLCamera.cpp.

Here is the call graph for this function:

◆ moveDown() [1/2]

void OGLCamera::moveDown ( )

Definition at line 150 of file OGLCamera.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ moveDown() [2/2]

void OGLCamera::moveDown ( NxReal  _distance)

Definition at line 202 of file OGLCamera.cpp.

Here is the call graph for this function:

◆ moveFront() [1/2]

void OGLCamera::moveFront ( )

Definition at line 105 of file OGLCamera.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ moveFront() [2/2]

void OGLCamera::moveFront ( NxReal  _distance)

Definition at line 209 of file OGLCamera.cpp.

Here is the call graph for this function:

◆ moveLeft() [1/2]

void OGLCamera::moveLeft ( )

Definition at line 165 of file OGLCamera.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ moveLeft() [2/2]

void OGLCamera::moveLeft ( NxReal  _distance)

Definition at line 223 of file OGLCamera.cpp.

Here is the call graph for this function:

◆ moveRight() [1/2]

void OGLCamera::moveRight ( )

Definition at line 180 of file OGLCamera.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ moveRight() [2/2]

void OGLCamera::moveRight ( NxReal  _distance)

Definition at line 230 of file OGLCamera.cpp.

Here is the call graph for this function:

◆ moveUp() [1/2]

void OGLCamera::moveUp ( )

Definition at line 135 of file OGLCamera.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ moveUp() [2/2]

void OGLCamera::moveUp ( NxReal  _distance)

Definition at line 195 of file OGLCamera.cpp.

Here is the call graph for this function:

◆ projectionMatrix()

const QMatrix4x4 & OGLCamera::projectionMatrix ( ) const

Definition at line 567 of file OGLCamera.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ resetRotations()

void OGLCamera::resetRotations ( )

Definition at line 458 of file OGLCamera.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ resetTranslation()

void OGLCamera::resetTranslation ( )

Definition at line 446 of file OGLCamera.cpp.

Here is the call graph for this function:

◆ resetZoom()

void OGLCamera::resetZoom ( int  w = -1,
int  h = -1 
)

Definition at line 417 of file OGLCamera.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ roll()

void OGLCamera::roll ( NxReal  _angle)

Definition at line 410 of file OGLCamera.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setAllAngleStep()

void OGLCamera::setAllAngleStep ( NxReal  _angle)

Definition at line 251 of file OGLCamera.cpp.

Here is the caller graph for this function:

◆ setAngleStep()

void OGLCamera::setAngleStep ( NxReal  _stepAngleUpDown,
NxReal  _stepAngleLeftRight,
NxReal  _stepAngleSide 
)

Definition at line 256 of file OGLCamera.cpp.

◆ setCameraType()

void OGLCamera::setCameraType ( CameraType  eCameraType)

Definition at line 85 of file OGLCamera.cpp.

Here is the call graph for this function:

◆ setDefaultZoomFactor()

void OGLCamera::setDefaultZoomFactor ( double  defaultZoomFactor)

Definition at line 453 of file OGLCamera.cpp.

Here is the caller graph for this function:

◆ setDistanceFromToLockFrom()

void OGLCamera::setDistanceFromToLockFrom ( NxReal  _distanceFromTo)

Definition at line 318 of file OGLCamera.cpp.

Here is the call graph for this function:

◆ setDistanceFromToLockTo()

void OGLCamera::setDistanceFromToLockTo ( NxReal  _distanceFromTo)

Definition at line 326 of file OGLCamera.cpp.

Here is the call graph for this function:

◆ setDistanceStep()

void OGLCamera::setDistanceStep ( NxReal  _magnitudeStepUp,
NxReal  _magnitudeStepFront,
NxReal  _magnitudeStepLeft 
)

Definition at line 237 of file OGLCamera.cpp.

Here is the caller graph for this function:

◆ setFrom()

void OGLCamera::setFrom ( const QVector3D &  _from)

Definition at line 268 of file OGLCamera.cpp.

Here is the call graph for this function:

◆ setFromToUp()

void OGLCamera::setFromToUp ( const QVector3D &  _from,
const QVector3D &  _to,
const QVector3D &  _up 
)

Definition at line 296 of file OGLCamera.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setModeLock()

void OGLCamera::setModeLock ( bool  _modeLockUpDown,
bool  _modeLockLeftRight,
bool  _modeLockSide 
)

Definition at line 334 of file OGLCamera.cpp.

Here is the caller graph for this function:

◆ setSize()

void OGLCamera::setSize ( int  w,
int  h 
)

Definition at line 78 of file OGLCamera.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setTo()

void OGLCamera::setTo ( const QVector3D &  _to)

Definition at line 281 of file OGLCamera.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setTranslation()

void OGLCamera::setTranslation ( double  x,
double  y,
double  z 
)

Definition at line 467 of file OGLCamera.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setUp()

void OGLCamera::setUp ( const QVector3D &  _up)

Definition at line 289 of file OGLCamera.cpp.

Here is the call graph for this function:

◆ to()

const QVector3D & OGLCamera::to ( ) const

Definition at line 276 of file OGLCamera.cpp.

Here is the caller graph for this function:

◆ updateProjectionMatrix()

void OGLCamera::updateProjectionMatrix ( ) const
private

Definition at line 537 of file OGLCamera.cpp.

Here is the caller graph for this function:

◆ updateViewMatrix()

void OGLCamera::updateViewMatrix ( ) const
private

Definition at line 498 of file OGLCamera.cpp.

Here is the caller graph for this function:

◆ viewMatrix()

const QMatrix4x4 & OGLCamera::viewMatrix ( ) const

Definition at line 558 of file OGLCamera.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ zoom()

void OGLCamera::zoom ( double  zoomFactor)

Definition at line 373 of file OGLCamera.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ _from

QVector3D OGLCamera::_from
private

Definition at line 99 of file OGLCamera.h.

◆ _front

QVector3D OGLCamera::_front
private

Definition at line 103 of file OGLCamera.h.

◆ _left

QVector3D OGLCamera::_left
private

Definition at line 103 of file OGLCamera.h.

◆ _projectionMatrix

QMatrix4x4 OGLCamera::_projectionMatrix
mutableprivate

Definition at line 124 of file OGLCamera.h.

◆ _projectionMatrixDirty

bool OGLCamera::_projectionMatrixDirty
mutableprivate

Definition at line 122 of file OGLCamera.h.

◆ _to

QVector3D OGLCamera::_to
private

Definition at line 100 of file OGLCamera.h.

◆ _up

QVector3D OGLCamera::_up
private

Definition at line 103 of file OGLCamera.h.

◆ _viewMatrix

QMatrix4x4 OGLCamera::_viewMatrix
mutableprivate

Definition at line 123 of file OGLCamera.h.

◆ _viewMatrixDirty

bool OGLCamera::_viewMatrixDirty
mutableprivate

Definition at line 121 of file OGLCamera.h.

◆ distanceFromTo

NxReal OGLCamera::distanceFromTo
private

Definition at line 108 of file OGLCamera.h.

◆ flyFrom

QVector3D OGLCamera::flyFrom
private

Definition at line 105 of file OGLCamera.h.

◆ flyFromTo

QVector3D OGLCamera::flyFromTo
private

Definition at line 105 of file OGLCamera.h.

◆ flyFront

QVector3D OGLCamera::flyFront
private

Definition at line 105 of file OGLCamera.h.

◆ flyLeft

QVector3D OGLCamera::flyLeft
private

Definition at line 105 of file OGLCamera.h.

◆ flyTo

QVector3D OGLCamera::flyTo
private

Definition at line 105 of file OGLCamera.h.

◆ flyUp

QVector3D OGLCamera::flyUp
private

Definition at line 105 of file OGLCamera.h.

◆ fromTo

QVector3D OGLCamera::fromTo
private

Definition at line 109 of file OGLCamera.h.

◆ m_angleAz

double OGLCamera::m_angleAz
private

Definition at line 116 of file OGLCamera.h.

◆ m_angleEl

double OGLCamera::m_angleEl
private

Definition at line 116 of file OGLCamera.h.

◆ m_angleRo

double OGLCamera::m_angleRo
private

Definition at line 116 of file OGLCamera.h.

◆ m_defaultZoomFactor

double OGLCamera::m_defaultZoomFactor
private

Definition at line 116 of file OGLCamera.h.

◆ m_eCameraType

CameraType OGLCamera::m_eCameraType
private

Definition at line 117 of file OGLCamera.h.

◆ m_h

int OGLCamera::m_h
private

Definition at line 115 of file OGLCamera.h.

◆ m_translate

QVector3D OGLCamera::m_translate
private

Definition at line 118 of file OGLCamera.h.

◆ m_w

int OGLCamera::m_w
private

Definition at line 115 of file OGLCamera.h.

◆ m_zoomFactor

double OGLCamera::m_zoomFactor
private

Definition at line 116 of file OGLCamera.h.

◆ magnitudeStepFront

NxReal OGLCamera::magnitudeStepFront
private

Definition at line 113 of file OGLCamera.h.

◆ magnitudeStepLeft

NxReal OGLCamera::magnitudeStepLeft
private

Definition at line 113 of file OGLCamera.h.

◆ magnitudeStepUp

NxReal OGLCamera::magnitudeStepUp
private

Definition at line 113 of file OGLCamera.h.

◆ modeLockLeftRight

bool OGLCamera::modeLockLeftRight
private

Definition at line 111 of file OGLCamera.h.

◆ modeLockSide

bool OGLCamera::modeLockSide
private

Definition at line 111 of file OGLCamera.h.

◆ modeLockUpDown

bool OGLCamera::modeLockUpDown
private

Definition at line 111 of file OGLCamera.h.

◆ stepAngleLeftRight

NxReal OGLCamera::stepAngleLeftRight
private

Definition at line 106 of file OGLCamera.h.

◆ stepAngleSide

NxReal OGLCamera::stepAngleSide
private

Definition at line 106 of file OGLCamera.h.

◆ stepAngleUpDown

NxReal OGLCamera::stepAngleUpDown
private

Definition at line 106 of file OGLCamera.h.

◆ stepFront

QVector3D OGLCamera::stepFront
private

Definition at line 105 of file OGLCamera.h.

◆ stepLeft

QVector3D OGLCamera::stepLeft
private

Definition at line 105 of file OGLCamera.h.

◆ stepUp

QVector3D OGLCamera::stepUp
private

Definition at line 105 of file OGLCamera.h.


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