GLC_lib  2.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Signals | Public Member Functions | Private Member Functions | Private Attributes | List of all members
GLC_Viewport Class Reference

GLC_Viewport : OpenGL Viewport. More...

#include <glc_viewport.h>

+ Inheritance diagram for GLC_Viewport:

Signals

void updateOpenGL ()
 Set the viewport's camera in order to reframe on the current scene.
 

Public Member Functions

*name zoom Functions *void reframe (const GLC_BoundingBox &box, double coverFactor=2.2)
 Set the viewport's camera in order to reframe on the current scene.
 
Constructor / Destructor
 GLC_Viewport ()
 Default constructor.
 
virtual ~GLC_Viewport ()
 Delete Camera, Image Plane and orbit circle.
 
Get Functions
GLC_CameracameraHandle () const
 Return the camera associate to this viewport.
 
QSize size () const
 Return this viewport size.
 
int viewHSize () const
 Get this viewport Horizontal size.
 
int viewVSize () const
 Get this viewport Vertical size.
 
double aspectRatio () const
 Get this viewport ratio.
 
GLC_Point2d normalyseMousePosition (int x, int y)
 Return the normalyse mouse position from screen coordinate.
 
GLC_Point2d mapToOpenGLScreen (int x, int y)
 Map screen position to OpenGL screen position.
 
GLC_Point2d mapNormalyzeToOpenGLScreen (double x, double y)
 Map normalyze screen position to OpenGL screen position.
 
GLC_Vector3d mapPosMouse (GLdouble Posx, GLdouble Posy) const
 Map Screen position to OpenGL position (On image Plane) according to this viewport.
 
GLC_Vector3d mapNormalyzePosMouse (double Posx, double Posy) const
 Map normalyse Screen position to OpenGL position (On image Plane) according to this viewport.
 
double viewAngle () const
 Get this viewport's camera's angle of view.
 
double viewTangent () const
 Get this viewport's camera's tangent value of view.
 
double nearClippingPlaneDist (void) const
 Get this viewport near clipping plane distance.
 
double farClippingPlaneDist (void) const
 Get this viewport far clipping plane distance.
 
QColor backgroundColor (void) const
 Get this viewportbackground Color.
 
GLsizei selectionSquareSize () const
 Return the selection square size of this viewport.
 
GLC_Matrix4x4 projectionMatrix () const
 Return this viewport's the projection matrix.
 
GLC_Matrix4x4 compositionMatrix () const
 Return the composition matrix between projection matrix and view matrix.
 
GLC_3DViewCollectionwidget3dCollectionHandle ()
 Return an handle to the widget 3D collection.
 
bool useOrtho () const
 Return true if this viewport use orthographic projection.
 
int minimumPixelCullingSize () const
 Return the minimum pixel culling size.
 
double minimumStaticPixelCullingRatio () const
 Return the minimum pixel culling ratio.
 
double minimumDynamicPixelCullingRatio () const
 Return the minimum dynamic pixel culling ratio.
 
Set Functions
void setWinGLSize (int width, int height, bool updateOGLViewport=true)
 Update the OpenGL view size.
 
void setWinGLSize (const QSize &size, bool updateOGLViewport=true)
 Update the OpenGL view size.
 
GLC_uint renderAndSelect (int x, int y, GLenum buffer=GL_BACK)
 Call the attached QGLWidgetSelect updateGL function and return the picking id.
 
GLC_uint selectOnPreviousRender (int x, int y, GLenum buffer=GL_BACK)
 Return the picking id from the already render window.
 
GLC_uint selectBody (GLC_3DViewInstance *, int x, int y, GLenum buffer=GL_BACK)
 Select a body inside a 3DViewInstance and return its UID.
 
QPair< int, GLC_uintselectPrimitive (GLC_3DViewInstance *, int x, int y, GLenum buffer=GL_BACK)
 Select a primitive inside a 3DViewInstance and return its UID and its body index.
 
QSet< GLC_uintselectInsideSquare (int x1, int y1, int x2, int y2, GLenum buffer=GL_BACK)
 Select objects inside specified square and return its UID in a set.
 
void loadBackGroundImage (const QString &imageFile)
 load background image from file in this viewport
 
void loadBackGroundImage (const QImage &image)
 load background image in this viewport
 
void deleteBackGroundImage ()
 delete background image of this viewport
 
void setViewAngle (double TargetFov)
 Set Camera's angle of view of this viewport.
 
bool setDistMin (double DistMin)
 Set near clipping distance of this viewport.
 
bool setDistMax (double DistMax)
 Set far clipping distance of this viewport.
 
void setDistMinAndMax (const GLC_BoundingBox &bBox)
 Set Near and Far clipping distance of this viewport.
 
void setBackgroundColor (QColor setColor)
 Set the Background color of this viewport.
 
void setSelectionSquareSize (GLsizei size)
 Set the selection square size of this viewport.
 
bool updateFrustum (GLC_Matrix4x4 *pMat=NULL)
 Update this viewport frustum (frustum cullin purpose)
 
void addClipPlane (GLenum planeGlEnum, GLC_Plane *pPlane)
 Add a clipping plane to this viewport.
 
void removeClipPlane (GLenum planeGlEnum)
 Remove the clip plane coresponding to the given id.
 
void removeAllClipPlane ()
 Remove all clip plane.
 
void useClipPlane (bool flag)
 Set the clipping plane usage.
 
void add3DWidget (GLC_3DViewInstance &widget)
 Add 3DWidget to this viewport.
 
void clearBackground (const QColor &color) const
 Clear the background color with the specified color.
 
void setToOrtho (bool useOrtho)
 Set othographic usage to the given flag.
 
void setMinimumPixelCullingSize (int size)
 Set minimum pixel culling size.
 

Private Member Functions

GLC_uint meaningfulIdInsideSquare (GLint x, GLint y, GLsizei width, GLsizei height, GLenum buffer)
 Return the meaningful color ID inside a square in screen coordinates.
 
QSet< GLC_uintlistOfIdInsideSquare (GLint x, GLint y, GLsizei width, GLsizei height, GLenum buffer)
 Return the Set of ID inside a square in screen coordinate.
 
void updateMinimumRatioSize ()
 Update minimum ratio size for pixel culling.
 

Private Attributes

GLC_Cameram_pViewCam
 Viewport's camera.
 
double m_DistanceMax
 Camera Maximum distance (far clipping plane)
 
double m_dDistanceMini
 Camera Minimum distance (near clipping plane)
 
double m_ViewAngle
 Camera angle of view.
 
double m_ViewTangent
 Camera angle tangent.
 
GLC_ImagePlanem_pImagePlane
 Image plane (Background image)
 
int m_Width
 Horizontal OpenGL viewport size.
 
int m_Height
 Vertical OpenGL viewport size.
 
double m_AspectRatio
 View AspectRatio.
 
QColor m_BackgroundColor
 Viewport Background color.
 
GLsizei m_SelectionSquareSize
 The selection square size.
 
GLC_Matrix4x4 m_ProjectionMatrix
 The projection matrix.
 
GLC_Frustum m_Frustum
 The frustum associated to the viewport.
 
QHash< GLenum, GLC_Plane * > m_ClipPlanesHash
 The list of additionnal clipping plane.
 
bool m_UseClipPlane
 Flag to know if clipping plane must be used.
 
GLC_3DViewCollection m_3DWidgetCollection
 The collection wich contains 3D widget.
 
bool m_UseParallelProjection
 Flag to know if the viewport use orthographic projection.
 
int m_MinimumStaticPixelSize
 The minimum static pixel culling size.
 
double m_MinimumStaticRatioSize
 The minimum static size ratio.
 
double m_MinimumDynamicRatioSize
 The minimum dynamic size ratio.
 

OpenGL Functions

void initGl ()
 Initialize OpenGL with default values.
 
void glExecuteCam (void)
 Load camera's transformation Matrix and display image if necessary.
 
void updateProjectionMat (void)
 Update this viewport OpenGL projection matrix.
 
void forceAspectRatio (double)
 Force the aspect ratio of this viewport.
 
void updateAspectRatio ()
 Update the aspect ratio of this viewport.
 
const GLC_Frustumfrustum () const
 Return the frustum associated to this viewport.
 
GLC_Frustum selectionFrustum (int, int) const
 Return the frustum associated to a selection coordinate.
 
GLC_Point3d unProject (int, int, GLenum buffer=GL_FRONT) const
 Return the world 3d point from the given screen coordinate.
 
QList< GLC_Point3dunproject (const QList< int > &list, GLenum buffer=GL_FRONT) const
 Return the list af world 3d point form the givne list af screen coordinates.
 
void render3DWidget ()
 Render viewport 3D widget.
 
void renderImagePlane ()
 Render this viewport's image plane.
 

Detailed Description

GLC_Viewport : OpenGL Viewport.

An GLC_Viewport define Viewport with these specification

Definition at line 55 of file glc_viewport.h.

Constructor & Destructor Documentation

GLC_Viewport::GLC_Viewport ( )

Default constructor.

Construct Viewport with these specifications :

  • Default GLC_Camera
  • Max distance of view : 500
  • Min distance of view : 0.01
  • Angle of view : 35
  • Maximum zoom factor : 3.0

Definition at line 42 of file glc_viewport.cpp.

References updateMinimumRatioSize().

GLC_Viewport::~GLC_Viewport ( )
virtual

Delete Camera, Image Plane and orbit circle.

Definition at line 70 of file glc_viewport.cpp.

References deleteBackGroundImage(), m_ClipPlanesHash, and m_pViewCam.

Member Function Documentation

void GLC_Viewport::add3DWidget ( GLC_3DViewInstance widget)
inline

Add 3DWidget to this viewport.

Definition at line 306 of file glc_viewport.h.

void GLC_Viewport::addClipPlane ( GLenum  planeGlEnum,
GLC_Plane pPlane 
)

Add a clipping plane to this viewport.

Definition at line 708 of file glc_viewport.cpp.

References m_ClipPlanesHash.

double GLC_Viewport::aspectRatio ( ) const
inline

Get this viewport ratio.

Definition at line 100 of file glc_viewport.h.

QColor GLC_Viewport::backgroundColor ( void  ) const
inline

Get this viewportbackground Color.

Definition at line 136 of file glc_viewport.h.

GLC_Camera* GLC_Viewport::cameraHandle ( ) const
inline
void GLC_Viewport::clearBackground ( const QColor &  color) const

Clear the background color with the specified color.

Definition at line 580 of file glc_viewport.cpp.

GLC_Matrix4x4 GLC_Viewport::compositionMatrix ( ) const
inline

Return the composition matrix between projection matrix and view matrix.

Definition at line 417 of file glc_viewport.h.

References m_ProjectionMatrix, m_pViewCam, GLC_Camera::modelViewMatrix(), and projectionMatrix().

Referenced by GLC_TsrMover::move(), and updateFrustum().

void GLC_Viewport::deleteBackGroundImage ( )

delete background image of this viewport

Definition at line 574 of file glc_viewport.cpp.

References m_pImagePlane.

Referenced by ~GLC_Viewport().

double GLC_Viewport::farClippingPlaneDist ( void  ) const
inline

Get this viewport far clipping plane distance.

Definition at line 132 of file glc_viewport.h.

void GLC_Viewport::forceAspectRatio ( double  ratio)

Force the aspect ratio of this viewport.

Definition at line 207 of file glc_viewport.cpp.

References m_AspectRatio, and updateProjectionMat().

const GLC_Frustum& GLC_Viewport::frustum ( ) const
inline

Return the frustum associated to this viewport.

Definition at line 194 of file glc_viewport.h.

Referenced by GLC_3DViewCollection::updateInstanceViewableState().

void GLC_Viewport::glExecuteCam ( void  )

Load camera's transformation Matrix and display image if necessary.

Definition at line 171 of file glc_viewport.cpp.

References GLC_Camera::glExecute(), m_pViewCam, and renderImagePlane().

Referenced by selectBody(), and selectPrimitive().

void GLC_Viewport::initGl ( )

Initialize OpenGL with default values.

Glew initialisation is made here

Definition at line 158 of file glc_viewport.cpp.

References m_BackgroundColor.

QSet< GLC_uint > GLC_Viewport::listOfIdInsideSquare ( GLint  x,
GLint  y,
GLsizei  width,
GLsizei  height,
GLenum  buffer 
)
private

Return the Set of ID inside a square in screen coordinate.

Definition at line 530 of file glc_viewport.cpp.

References glc::decodeRgbId(), and m_BackgroundColor.

Referenced by selectInsideSquare().

void GLC_Viewport::loadBackGroundImage ( const QString &  imageFile)

load background image from file in this viewport

Definition at line 562 of file glc_viewport.cpp.

References m_pImagePlane.

void GLC_Viewport::loadBackGroundImage ( const QImage &  image)

load background image in this viewport

Definition at line 568 of file glc_viewport.cpp.

References m_pImagePlane.

GLC_Vector3d GLC_Viewport::mapNormalyzePosMouse ( double  Posx,
double  Posy 
) const

Map normalyse Screen position to OpenGL position (On image Plane) according to this viewport.

Definition at line 147 of file glc_viewport.cpp.

References m_Height, m_Width, and mapPosMouse().

GLC_Point2d GLC_Viewport::mapNormalyzeToOpenGLScreen ( double  x,
double  y 
)

Map normalyze screen position to OpenGL screen position.

Definition at line 118 of file glc_viewport.cpp.

References GLC_Vector2d::setY(), and GLC_Vector2d::y().

Referenced by mapToOpenGLScreen(), and GLC_TsrMover::move().

GLC_Vector3d GLC_Viewport::mapPosMouse ( GLdouble  Posx,
GLdouble  Posy 
) const

Map Screen position to OpenGL position (On image Plane) according to this viewport.

Definition at line 127 of file glc_viewport.cpp.

References GLC_Camera::distEyeTarget(), m_Height, m_pViewCam, m_ViewTangent, and m_Width.

Referenced by GLC_SetTargetMover::init(), GLC_PanMover::init(), mapNormalyzePosMouse(), and GLC_PanMover::move().

GLC_Point2d GLC_Viewport::mapToOpenGLScreen ( int  x,
int  y 
)

Map screen position to OpenGL screen position.

Definition at line 111 of file glc_viewport.cpp.

References mapNormalyzeToOpenGLScreen(), normalyseMousePosition(), GLC_Vector2d::x(), and GLC_Vector2d::y().

GLC_uint GLC_Viewport::meaningfulIdInsideSquare ( GLint  x,
GLint  y,
GLsizei  width,
GLsizei  height,
GLenum  buffer 
)
private

Return the meaningful color ID inside a square in screen coordinates.

Definition at line 482 of file glc_viewport.cpp.

References glc::decodeRgbId(), and m_BackgroundColor.

Referenced by selectBody(), selectOnPreviousRender(), and selectPrimitive().

double GLC_Viewport::minimumDynamicPixelCullingRatio ( ) const
inline

Return the minimum dynamic pixel culling ratio.

Definition at line 167 of file glc_viewport.h.

Referenced by GLC_3DViewInstance::choseLod().

int GLC_Viewport::minimumPixelCullingSize ( ) const
inline

Return the minimum pixel culling size.

Definition at line 159 of file glc_viewport.h.

double GLC_Viewport::minimumStaticPixelCullingRatio ( ) const
inline

Return the minimum pixel culling ratio.

Definition at line 163 of file glc_viewport.h.

Referenced by GLC_3DViewInstance::choseLod().

double GLC_Viewport::nearClippingPlaneDist ( void  ) const
inline

Get this viewport near clipping plane distance.

Definition at line 128 of file glc_viewport.h.

GLC_Point2d GLC_Viewport::normalyseMousePosition ( int  x,
int  y 
)

Return the normalyse mouse position from screen coordinate.

Definition at line 94 of file glc_viewport.cpp.

References m_Height, and m_Width.

Referenced by mapToOpenGLScreen().

GLC_Matrix4x4 GLC_Viewport::projectionMatrix ( ) const
inline

Return this viewport's the projection matrix.

Definition at line 144 of file glc_viewport.h.

Referenced by compositionMatrix().

void GLC_Viewport::reframe ( const GLC_BoundingBox box,
double  coverFactor = 2.2 
)

Set the viewport's camera in order to reframe on the current scene.

box shouldn't be empty

Definition at line 595 of file glc_viewport.cpp.

References GLC_BoundingBox::boundingSphereRadius(), GLC_BoundingBox::center(), GLC_BoundingBox::isEmpty(), m_pViewCam, m_ViewTangent, GLC_Camera::setDistEyeTarget(), GLC_Camera::target(), and GLC_Camera::translate().

void GLC_Viewport::removeAllClipPlane ( )

Remove all clip plane.

Definition at line 731 of file glc_viewport.cpp.

References m_ClipPlanesHash.

void GLC_Viewport::removeClipPlane ( GLenum  planeGlEnum)

Remove the clip plane coresponding to the given id.

Definition at line 718 of file glc_viewport.cpp.

References m_ClipPlanesHash.

void GLC_Viewport::render3DWidget ( )

Render viewport 3D widget.

Definition at line 321 of file glc_viewport.cpp.

References m_3DWidgetCollection, GLC_3DViewCollection::render(), glc::TransparentRenderFlag, and glc::WireRenderFlag.

GLC_uint GLC_Viewport::renderAndSelect ( int  x,
int  y,
GLenum  buffer = GL_BACK 
)

Call the attached QGLWidgetSelect updateGL function and return the picking id.

Return UID of the nearest picked object

Definition at line 356 of file glc_viewport.cpp.

References selectOnPreviousRender(), GLC_State::setSelectionMode(), and updateOpenGL().

void GLC_Viewport::renderImagePlane ( )
private

Render this viewport's image plane.

Definition at line 309 of file glc_viewport.cpp.

References GLC_State::isInSelectionMode(), m_pImagePlane, and GLC_ImagePlane::render().

Referenced by glExecuteCam().

GLC_uint GLC_Viewport::selectBody ( GLC_3DViewInstance pInstance,
int  x,
int  y,
GLenum  buffer = GL_BACK 
)

Select a body inside a 3DViewInstance and return its UID.

Return UID of the nearest picked body

Definition at line 379 of file glc_viewport.cpp.

References GLC_Context::current(), GLC_Context::glcEnableLighting(), GLC_Context::glcLoadIdentity(), glExecuteCam(), m_Height, meaningfulIdInsideSquare(), GLC_3DViewInstance::renderForBodySelection(), and GLC_State::setSelectionMode().

QSet< GLC_uint > GLC_Viewport::selectInsideSquare ( int  x1,
int  y1,
int  x2,
int  y2,
GLenum  buffer = GL_BACK 
)

Select objects inside specified square and return its UID in a set.

Definition at line 451 of file glc_viewport.cpp.

References listOfIdInsideSquare(), m_Height, GLC_State::setSelectionMode(), and updateOpenGL().

GLC_Frustum GLC_Viewport::selectionFrustum ( int  x,
int  y 
) const

Return the frustum associated to a selection coordinate.

Definition at line 218 of file glc_viewport.cpp.

References GLC_Camera::eye(), m_Frustum, m_pViewCam, m_SelectionSquareSize, and unproject().

GLsizei GLC_Viewport::selectionSquareSize ( ) const
inline

Return the selection square size of this viewport.

Definition at line 140 of file glc_viewport.h.

GLC_uint GLC_Viewport::selectOnPreviousRender ( int  x,
int  y,
GLenum  buffer = GL_BACK 
)

Return the picking id from the already render window.

Definition at line 368 of file glc_viewport.cpp.

References m_Height, m_SelectionSquareSize, and meaningfulIdInsideSquare().

Referenced by renderAndSelect(), and GLC_3DWidgetManagerHandle::select().

QPair< int, GLC_uint > GLC_Viewport::selectPrimitive ( GLC_3DViewInstance pInstance,
int  x,
int  y,
GLenum  buffer = GL_BACK 
)

Select a primitive inside a 3DViewInstance and return its UID and its body index.

Return UID of the nearest picked primitive

Definition at line 407 of file glc_viewport.cpp.

References GLC_Context::current(), GLC_Context::glcEnableLighting(), GLC_Context::glcLoadIdentity(), glExecuteCam(), m_Height, meaningfulIdInsideSquare(), GLC_3DViewInstance::renderForBodySelection(), GLC_3DViewInstance::renderForPrimitiveSelection(), and GLC_State::setSelectionMode().

void GLC_Viewport::setBackgroundColor ( QColor  setColor)

Set the Background color of this viewport.

Definition at line 702 of file glc_viewport.cpp.

References m_BackgroundColor.

bool GLC_Viewport::setDistMax ( double  DistMax)

Set far clipping distance of this viewport.

Definition at line 633 of file glc_viewport.cpp.

References m_dDistanceMini, m_DistanceMax, and updateProjectionMat().

bool GLC_Viewport::setDistMin ( double  DistMin)

Set near clipping distance of this viewport.

Definition at line 614 of file glc_viewport.cpp.

References m_dDistanceMini, m_DistanceMax, and updateProjectionMat().

void GLC_Viewport::setDistMinAndMax ( const GLC_BoundingBox bBox)

Set Near and Far clipping distance of this viewport.

box shouldn't be empty

Definition at line 652 of file glc_viewport.cpp.

References GLC_Camera::distEyeTarget(), GLC_Camera::eye(), GLC_BoundingBox::isEmpty(), m_dDistanceMini, m_DistanceMax, m_pViewCam, m_UseParallelProjection, GLC_Camera::modelViewMatrix(), and updateProjectionMat().

Referenced by GLC_TsrMover::move().

void GLC_Viewport::setMinimumPixelCullingSize ( int  size)
inline

Set minimum pixel culling size.

Definition at line 316 of file glc_viewport.h.

void GLC_Viewport::setSelectionSquareSize ( GLsizei  size)
inline

Set the selection square size of this viewport.

Definition at line 286 of file glc_viewport.h.

void GLC_Viewport::setToOrtho ( bool  useOrtho)

Set othographic usage to the given flag.

Definition at line 585 of file glc_viewport.cpp.

References m_UseParallelProjection, updateProjectionMat(), and useOrtho().

void GLC_Viewport::setViewAngle ( double  TargetFov)
inline

Set Camera's angle of view of this viewport.

Definition at line 265 of file glc_viewport.h.

References glc::toRadian().

void GLC_Viewport::setWinGLSize ( int  width,
int  height,
bool  updateOGLViewport = true 
)

Update the OpenGL view size.

Definition at line 330 of file glc_viewport.cpp.

References m_Height, m_Width, updateAspectRatio(), updateMinimumRatioSize(), and updateProjectionMat().

Referenced by setWinGLSize().

void GLC_Viewport::setWinGLSize ( const QSize &  size,
bool  updateOGLViewport = true 
)

Update the OpenGL view size.

Definition at line 351 of file glc_viewport.cpp.

References setWinGLSize().

QSize GLC_Viewport::size ( void  ) const

Return this viewport size.

Definition at line 86 of file glc_viewport.cpp.

References m_Height, and m_Width.

Referenced by unproject(), and updateMinimumRatioSize().

GLC_Point3d GLC_Viewport::unProject ( int  x,
int  y,
GLenum  buffer = GL_FRONT 
) const
QList< GLC_Point3d > GLC_Viewport::unproject ( const QList< int > &  list,
GLenum  buffer = GL_FRONT 
) const

Return the list af world 3d point form the givne list af screen coordinates.

The size of the given list must be a multiple of 2

Definition at line 275 of file glc_viewport.cpp.

References GLC_Matrix4x4::getData(), glc::gluUnProject(), m_Height, m_ProjectionMatrix, m_pViewCam, GLC_Camera::modelViewMatrix(), and size().

Referenced by selectionFrustum().

void GLC_Viewport::updateAspectRatio ( )

Update the aspect ratio of this viewport.

Definition at line 213 of file glc_viewport.cpp.

References m_AspectRatio, m_Height, and m_Width.

Referenced by setWinGLSize().

bool GLC_Viewport::updateFrustum ( GLC_Matrix4x4 pMat = NULL)
inline

Update this viewport frustum (frustum cullin purpose)

Return true if the frustum has changed

Definition at line 429 of file glc_viewport.h.

References compositionMatrix(), m_Frustum, and GLC_Frustum::update().

Referenced by GLC_3DViewCollection::updateInstanceViewableState().

void GLC_Viewport::updateMinimumRatioSize ( )
private

Update minimum ratio size for pixel culling.

Definition at line 555 of file glc_viewport.cpp.

References m_Height, m_MinimumDynamicRatioSize, m_MinimumStaticPixelSize, m_MinimumStaticRatioSize, m_Width, and size().

Referenced by GLC_Viewport(), and setWinGLSize().

void GLC_Viewport::updateOpenGL ( )
signal

Set the viewport's camera in order to reframe on the current scene.

Referenced by renderAndSelect(), and selectInsideSquare().

void GLC_Viewport::updateProjectionMat ( void  )
void GLC_Viewport::useClipPlane ( bool  flag)

Set the clipping plane usage.

Definition at line 742 of file glc_viewport.cpp.

References GLC_Plane::data(), m_ClipPlanesHash, and m_UseClipPlane.

bool GLC_Viewport::useOrtho ( ) const
inline

Return true if this viewport use orthographic projection.

Definition at line 155 of file glc_viewport.h.

Referenced by GLC_AbstractManipulator::manipulate(), and setToOrtho().

double GLC_Viewport::viewAngle ( ) const
inline

Get this viewport's camera's angle of view.

Definition at line 119 of file glc_viewport.h.

Referenced by GLC_RepCrossMover::createCrossInstance().

int GLC_Viewport::viewHSize ( ) const
inline
double GLC_Viewport::viewTangent ( ) const
inline

Get this viewport's camera's tangent value of view.

Definition at line 123 of file glc_viewport.h.

Referenced by GLC_3DViewInstance::choseLod(), and GLC_TsrMover::move().

int GLC_Viewport::viewVSize ( ) const
inline
GLC_3DViewCollection* GLC_Viewport::widget3dCollectionHandle ( )
inline

Return an handle to the widget 3D collection.

Definition at line 151 of file glc_viewport.h.

Member Data Documentation

GLC_3DViewCollection GLC_Viewport::m_3DWidgetCollection
private

The collection wich contains 3D widget.

Definition at line 402 of file glc_viewport.h.

Referenced by render3DWidget().

double GLC_Viewport::m_AspectRatio
private

View AspectRatio.

Definition at line 381 of file glc_viewport.h.

Referenced by forceAspectRatio(), updateAspectRatio(), and updateProjectionMat().

QColor GLC_Viewport::m_BackgroundColor
private

Viewport Background color.

Definition at line 384 of file glc_viewport.h.

Referenced by initGl(), listOfIdInsideSquare(), meaningfulIdInsideSquare(), and setBackgroundColor().

QHash<GLenum, GLC_Plane*> GLC_Viewport::m_ClipPlanesHash
private

The list of additionnal clipping plane.

Definition at line 396 of file glc_viewport.h.

Referenced by addClipPlane(), removeAllClipPlane(), removeClipPlane(), useClipPlane(), and ~GLC_Viewport().

double GLC_Viewport::m_dDistanceMini
private

Camera Minimum distance (near clipping plane)

Definition at line 368 of file glc_viewport.h.

Referenced by setDistMax(), setDistMin(), setDistMinAndMax(), and updateProjectionMat().

double GLC_Viewport::m_DistanceMax
private

Camera Maximum distance (far clipping plane)

Definition at line 367 of file glc_viewport.h.

Referenced by setDistMax(), setDistMin(), setDistMinAndMax(), and updateProjectionMat().

GLC_Frustum GLC_Viewport::m_Frustum
private

The frustum associated to the viewport.

Definition at line 393 of file glc_viewport.h.

Referenced by selectionFrustum(), and updateFrustum().

int GLC_Viewport::m_Height
private
double GLC_Viewport::m_MinimumDynamicRatioSize
private

The minimum dynamic size ratio.

Definition at line 414 of file glc_viewport.h.

Referenced by updateMinimumRatioSize().

int GLC_Viewport::m_MinimumStaticPixelSize
private

The minimum static pixel culling size.

Definition at line 408 of file glc_viewport.h.

Referenced by updateMinimumRatioSize().

double GLC_Viewport::m_MinimumStaticRatioSize
private

The minimum static size ratio.

Definition at line 411 of file glc_viewport.h.

Referenced by updateMinimumRatioSize().

GLC_ImagePlane* GLC_Viewport::m_pImagePlane
private

Image plane (Background image)

Definition at line 374 of file glc_viewport.h.

Referenced by deleteBackGroundImage(), loadBackGroundImage(), and renderImagePlane().

GLC_Matrix4x4 GLC_Viewport::m_ProjectionMatrix
private

The projection matrix.

Definition at line 390 of file glc_viewport.h.

Referenced by compositionMatrix(), unProject(), unproject(), and updateProjectionMat().

GLC_Camera* GLC_Viewport::m_pViewCam
private
GLsizei GLC_Viewport::m_SelectionSquareSize
private

The selection square size.

Definition at line 387 of file glc_viewport.h.

Referenced by selectionFrustum(), and selectOnPreviousRender().

bool GLC_Viewport::m_UseClipPlane
private

Flag to know if clipping plane must be used.

Definition at line 399 of file glc_viewport.h.

Referenced by useClipPlane().

bool GLC_Viewport::m_UseParallelProjection
private

Flag to know if the viewport use orthographic projection.

Definition at line 405 of file glc_viewport.h.

Referenced by setDistMinAndMax(), setToOrtho(), and updateProjectionMat().

double GLC_Viewport::m_ViewAngle
private

Camera angle of view.

Definition at line 369 of file glc_viewport.h.

Referenced by updateProjectionMat().

double GLC_Viewport::m_ViewTangent
private

Camera angle tangent.

Definition at line 370 of file glc_viewport.h.

Referenced by mapPosMouse(), reframe(), and updateProjectionMat().

int GLC_Viewport::m_Width
private

Horizontal OpenGL viewport size.

Definition at line 377 of file glc_viewport.h.

Referenced by mapNormalyzePosMouse(), mapPosMouse(), normalyseMousePosition(), setWinGLSize(), size(), updateAspectRatio(), and updateMinimumRatioSize().


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

©2005-2013 Laurent Ribon