|
C3D Toolkit
Kernel - 117982, Vision - 2.9.2.2
|
Viewport class defines viewport. More...
#include <vsn_viewport.h>
Inheritance diagram for VSN::Viewport:
Collaboration diagram for VSN::Viewport:Public Member Functions | |
| Viewport () | |
| Default constructor. | |
| virtual | ~Viewport () |
| Destructor. | |
| Camera * | GetCamera () const |
| Returns pointer to the camera associated with viewport. | |
| void | SetCamera (Camera *pCamera) |
| Set the camera associated with the Viewport. | |
| SizeI | GetViewportSize () const |
| Returns viewport size. | |
| void | GetViewportSize (int &width, int &height) const |
| Returns viewport size. | |
| void | SetSizeViewport (int width, int height, bool updateViewport=true) |
| Sets new viewport sizes. | |
| MbCartPoint | NormalizedMousePosition (int x, int y) |
| Returns normalized mouse position with given viewport size. | |
| MbCartPoint | ScreenPointToOpenGLScreen (int x, int y) |
| Transforms mouse screen coordinates to OpenGL screen coordinates. | |
| MbCartPoint | ScreenNormalizedToOpenGLScreen (double x, double y) |
| Transforms normalized mouse screen coordinates to OpenGL screen coordinates. | |
| MbVector3D | PositionMouseToVector (GLdouble posX, GLdouble posY) const |
| Returns view vector by given mouse position. | |
| MbVector3D | NormalizedPositionMouseToVector (double posX, double posY) const |
| Returns normalized view vector by given mouse position. | |
| double | GetCameraAngle () const |
| Returns the camera angle for this viewport. | |
| void | SetCameraAngle (double angle) |
| Sets the camera angle for this viewport. | |
| double | GetTangentCamera () const |
| Returns the camera tangent for this viewport. | |
| double | GetDistanceToNearClippingPlane () const |
| Returns a distance to the near (or front) clipping plane. | |
| bool | SetDistanceToNearClippingPlane (double dis) |
| Sets a distance to the near (or front) clipping plane. | |
| double | GetDistanceToFarClippingPlane () const |
| Returns a distance to the far (or back) clipping plane. | |
| bool | SetDistanceToFarClippingPlane (double dis) |
| Sets a distance to the far (or back) clipping plane. | |
| void | ComputeMinMaxPlanes (const MbCube &bBox) |
| Sets the near and far clipping by bounding box. | |
| const Color & | GetBackgroundColour () const |
| Returns port background colour. | |
| void | SetBackgroundColour (const Color &color) |
| Sets viewport background colour. | |
| void | SetGradientBackgroundColour (const Color &topColor, const Color &bottomColor) |
| Sets viewport gradient background colour. | |
| void | LoadBackgroundImage (const std::string &imageFile) |
| Loads viewport background image by file name. | |
| void | LoadBackgroundImage (const Image &image) |
| Loads viewport background image from Image. | |
| void | DeleteBackgroundImage () |
| Deletes viewport background image. | |
| int | GetSelectionAreaSize () const |
| Returns selection area size. | |
| void | SetSelectionAreaSize (int size) |
| Sets selection area size. | |
| Matrix3DF | GetProjectionMatrix () const |
| Returns projection matrix. | |
| Matrix3DF | GetMultipleMatrix () const |
| Returns composite matrix(projection matrix and view matrix). | |
| RenderContainer * | GetWidgetsContainer () |
| Returns pointer to the widget container. | |
| bool | IsOrthographicProjection () const |
| True if orthographic projection is used. | |
| void | SetOrthographicProjection (bool bOrthographic) |
| Orthographic projection use flag. | |
| int | GetPixelCullingSize () const |
| Returns minimum pixel count for the selected size. | |
| void | SetPixelCullingSize (int size) |
| Sets minimum pixel count for the selected size. | |
| float | GetStaticPixelCullingRatio () const |
| Returns minimum pixel ratio for culling. | |
| float | GetDynamicPixelCullingRatio () const |
| Returns minimum dynamic pixel ratio for culling. | |
| float | GetScale () const |
| Return scale value. | |
| void | InitOpenGl () |
| Initializes OpenGL. | |
| void | MultMatrixCamera () |
| Adds the camera matrix. | |
| void | UpdateProjectionMatrix () |
| Updates viewport and projection matrix. | |
| float | GetAspectRatio () const |
| Returns screen aspect ratio. | |
| void | SetAspectRatio (float) |
| Sets forcibly screen aspect ratio. | |
| void | UpdateAspectRatio () |
| Updates screen aspect ratio. | |
| const Frustum & | GetFrustum () const |
| Returns view frustum. | |
| Frustum | SelectionFrustum (int x, int y) const |
| Returns view frustum for selection. | |
| void | ConvertScreenPointToParallelScreenPlane (const MbCartPoint &logPos, const Point3DF &origin, Point3DF &point) |
| Transforms window coordinates to the plane parallel to the screen and passing through the scene origin. | |
| void | WorldPointToScreenPoint (const Point3DF &wp, Point3DF &lp) const |
| Transforms the world point to the window point. | |
| void | ScreenPointToWorldPoint (const Point3DF &lp, Point3DF &wp) const |
| Transforms the window point to the world point. | |
| MbCartPoint3D | UnProject (int x, int y, uint buffer=GL_FRONT) const |
| Returns MbCartPoint3D from screen coordinates. | |
| std::vector< MbCartPoint3D > | UnProject (const std::vector< int > &vectorX, uint buffer=GL_FRONT) const |
| Returns MbCartPoint3D list from screen coordinates. The size of this list must be multiple of two. | |
| void | ClearColor () |
| Renders background. | |
| void | OGLDrawBackground () |
| Renders background. | |
| void | OGLDrawWidgets () |
| Renders widget container. | |
| bool | UpdateFrustumPlanes (Matrix3DF *pMatrix=nullptr) |
| Updates view frustum for viewport. | |
| void | AddWidget (RenderObject &widget) |
| Adds widget and renders it. | |
| void | ZoomToFit (const MbCube &box, float factor=2.2f) |
| Zooms the model to viewport size by bounding box of the model. | |
| size_t | GetId () const |
| Get the identifier of the viewport. | |
Public Member Functions inherited from VSN::Object | |
| Object (Object *pParent=nullptr) | |
| Default constructor. More... | |
| virtual | ~Object () |
| Destructor. | |
| void | SetParent (Object *pParent) |
| NO TRANSLATION. | |
| Mutex * | GetMutex () |
| Object mutex. | |
| String | GetObjectName () const |
| Returns name. | |
| void | SetObjectName (const String &name) |
| Sets name. | |
| bool | IsControlType () const |
| TRANSLATION. | |
| Object * | GetParent () const |
| NO TRANSLATION. | |
| Variant | GetProperty (const String &name) const |
| NO TRANSLATION. | |
| bool | IsSignalsBlocked () const |
| NO TRANSLATION. | |
| bool | SetBlockSignals (bool bBlock) |
| NO TRANSLATION. | |
| void | AddEventListener (Object *pObject) |
| NO TRANSLATION. | |
| void | RemoveEventListener (Object *pObject) |
| NO TRANSLATION. | |
| Object * | GetSender () const |
| NO TRANSLATION. | |
| Thread * | GetThread () const |
| NO TRANSLATION. | |
| void | BindWithThread (Thread *thread) |
| NO TRANSLATION. | |
| int | StartTimer (int interval, TimerType timerType=tt_CoarseTimer) |
| NO TRANSLATION. | |
| void | KillTimer (int id) |
| NO TRANSLATION. | |
| const ObjectList< Object * > & | GetChildren () const |
| NO TRANSLATION. | |
| template<typename T > | |
| T | FindChild (const String &objName=String()) const |
| NO TRANSLATION. | |
| template<typename T > | |
| ObjectList< T > | FindChildren (const String &objName=String(), VSN::ChildFindingPolicies policies=VSN::FindAllNestedChildren) const |
| NO TRANSLATION. | |
Public Member Functions inherited from VSN::BasicObject | |
| BasicObject () | |
| Default constructor. | |
| virtual | ~BasicObject () |
| Destructor. | |
Viewport class defines viewport.
Viewport class has additional tools and functional for scene control.