1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-29 14:00:49 +03:00

0026344: Visualization - provide a support of zoom persistent selection

1) New Graphic3d_TransformPers structure for defining parameters and algorithm methods, featuring:
    a) application of transformation to projection and world view matrices;
    b) computation of model-world transformation of persistent object;
    c) computation of transformed bounding box of persistent object.

2) Transform persistence algorithm does not make any changes to model-world transformation of object (deals with projection and world view matrices only), thus making possible to employ local transformation in a usual way.

3) Support of BVH selection for transform persistent objects (pan, rotate, zoom, trihedron persistence only).

4) Support efficient frustum culling for transform persistent objects (pan, rotate, zoom, trihedron persistence only).

5) Support of z-fitting algorithm for world-view space transform persistent objects (rotate, zoom persistence only).

6) Rewrite usage of transform persistence structures and utilities classes:
    a) Replaced Graphic3d_CTransPers, TEL_TRANSFORM_PERSISTENCE by Graphic3d_TransformPers;
    b) Move functions from OpenGl_Utils.hxx to Graphic3d_TransformUtils.hxx;
    c) Extract matrix stack class from OpenGl_Utils.hxx to OpenGl_MatrixStack.hxx;

7) New class Graphic3d_WorldViewProjState to keep track of projection, world view matrices changes for a camera.

8) New test case bugs/vis/bug26344.

9) Renamed method Graphic3d_Camera::ModelViewState of  to ::WorldViewState for consistency.
This commit is contained in:
apl
2015-07-20 11:41:38 +03:00
committed by bugmaster
parent 317d68c924
commit 825aa485a3
59 changed files with 2324 additions and 1156 deletions

View File

@@ -24,6 +24,7 @@
#include <Graphic3d_Camera.hxx>
#include <Graphic3d_ClipPlane.hxx>
#include <Graphic3d_SequenceOfHClipPlane.hxx>
#include <Graphic3d_WorldViewProjState.hxx>
#include <TColgp_HArray1OfPnt.hxx>
#include <TColgp_Array1OfPnt2d.hxx>
@@ -53,8 +54,18 @@ public:
//! Passes camera projection and orientation matrices to builder
void SetCamera (const Graphic3d_Mat4d& theProjection,
const Graphic3d_Mat4d& theOrientation,
const Standard_Integer theIsOrthographic);
const Graphic3d_Mat4d& theWorldView,
const Standard_Integer theIsOrthographic,
const Graphic3d_WorldViewProjState& theWVPState = Graphic3d_WorldViewProjState());
//! @return current camera projection transformation common for all selecting volumes
const Graphic3d_Mat4d& ProjectionMatrix() const;
//! @return current camera world view transformation common for all selecting volumes
const Graphic3d_Mat4d& WorldViewMatrix() const;
//! @return current camera world view projection transformation state
const Graphic3d_WorldViewProjState& WorldViewProjState() const;
void SetPixelTolerance (const Standard_Real theTol);