0033551: Visualization - Add new transform persistence mode to force orthographic projection on object. The new transform persistence mode, with flag `Graphic3d_TMF_OrthoPers`, can be combined (bitwise OR operation) with the other persistence modes (2D, Trihedron or Zoom/Rotate Persistence) to make objects be rendered with orthographic projection when it is on a view with perspective projection. If the view already uses orthographic projection, there will be no difference. This feature was implemented to fix ViewCube being distorted when view with perspective projection changes size.
0033551: Visualization - Add new transform persistence mode to force orthographic projection on object. The new transform persistence mode, with flag `Graphic3d_TMF_OrthoPers`, can be combined (bitwise OR operation) with the other persistence modes (2D, Trihedron or Zoom/Rotate Persistence) to make objects be rendered with orthographic projection when it is on a view with perspective projection. If the view already uses orthographic projection, there will be no difference. This feature was implemented to fix ViewCube being distorted when view with perspective projection changes size.
0027919: Visualization - support multiple transformation persistence groups within single presentation Added transform persistence property to Graphic3d_Group and Select3D_SensitiveEntity. SelectMgr_ViewerSelector, Graphic3d_Layer and OpenGl_Structure have been updated to process per-group transform persistence within picking, ZFit and rendering. Added zoomable state to Prs3d_ArrowAspect supported by PrsDim_Dimension. Added gp_GTrsf::SetMat4(), opposite to gp_GTrsf::GetMat4().
0031313: Foundation Classes - Dump improvement for classes - Provide DumpJson for geometrical, ocaf and visualization classes; - Change depth parameter of DumpJson (constant is not obligate here) - Introduce a new macro for transient objects to be called as the first row in DumpJson: OCCT_DUMP_TRANSIENT_CLASS_BEGIN. We need not put the class name in the macro, using get_type_name of Standard_Transient for it. - change implementation of OCCT_DUMP_CLASS_BEGIN and OCCT_DUMP_TRANSIENT_CLASS_BEGIN. It is not an sentry more and it does not create a new hierarchy level. It appends a new row into the output stream: "className": <className> - OCCT_DUMP_* does not require semicolon - class header is included first in source files of TDataStd, TDocStd, TCAFDoc
0028789: Visualization, TKV3d - extend API for accessing and assigning BVH builders Several methods in Selection classes have been moved to header files for better inlining. BVH_Constants - added new enumeration defining common constant values used with BVH trees. BVH - replaced NCollection_Handle with Standard_Transient handle in classes BVH_Properties, BVH_Builder, BVH_Tree, BVH_Object. Defined global BVH-builders instead of allocating a new one for each object set. SelectMgr_ViewerSelector - added new method ::SetEntitySetBuilder() defining default BVH Tree builder for SelectMgr_SensitiveEntitySet. Added new method SelectMgr_SensitiveEntitySet::SetBuilder() for overriding default BVH tree builder.
0027860: Visualization - clean up Transformation Persistence API Graphic3d_Camera::TransformMatrices redundant NCollection_Handle usage has been replaced with validity flags. Graphic3d_TransModeFlags now defined as enumeration, not integer bit flags. Graphic3d_TMF_PanPers and Graphic3d_TMF_FullPers have been removed. Graphic3d_TMF_ZoomRotatePers has been introduced. Graphic3d_TransformPers is now inherits Standard_Transient. Graphic3d_TransformPers now defines dedicated constructors for 3D persistence (zoom / rotate) and 2D persistence (2d / trihedron). 2D persistence now supports dedicated values for X and Y offsets. The corner is now specified by enumeration Aspect_TypeOfTriedronPosition instead of indirect interpretation of anchor point values. Fixed handling of Graphic3d_TMF_ZoomRotatePers (combination of Graphic3d_TMF_RotatePers + Graphic3d_TMF_ZoomPers). PrsMgr_PresentableObject, Graphic3d_CStructure now hold Handle(Graphic3d_TransformPers) instead of a value. Method ::SetTransformPersistence(), ::TransformPersistence() now works with Handle(Graphic3d_TransformPers). Old methods have been marked deprecated.
0027739: Visualization, TKV3d - implement individual acceleration data structure for selection of 2D persistent objects Low-level selection algorithms has been improved to explicitly support 2D transformation persistent objects. This patch generally touches: 1) SelectMgr_SelectableObjectSet - the lists of objects has been split onto three subsets (regular, 3d-persistent, 2d-persistent). Each subset has individual BVH tree. The algorithms are now have more flexibility to update only those trees that is really required for actual camera state. 2) SelectMgr_ViewerSelector - explicitly supports Eye space selection operations on BVH tree for 2d-persistent subset. Change of camera position does not anymore affect acceleration data structure (BVH tree) of 2d-persistent selectable objects. 3) Other classes from SelectMgr have been fine-tuned to provide appropriate API. Porting notes: This patch touches very low-level selection classes. If the low-level features were used the following modifications may need to be considered for porting: 1) Iteration over objects of SelectMgr_SelectableObjectSet should now be implemented with corresponding Iterator class. 2) SelectMgr_BaseFrustum::ScaleAndTransform and derived classes return Handle(SelectMgr_BaseFrustum) instead of NCollection_Handle<> type. Small correction of test case for issue CR27739
0025076: Hidden overloaded virtual functions Implementation of virtual functions is made more consistent in places where warning was issued: - Missing implementation of virtual method Closed() added in classes inheriting Intf_Polygon2d - Empty implementation of virtual method Read() accepting stream is moved from PCDM_RetrievalDriver to StdLDrivers_DocumentRetrievalDriver - Method BRepFill::Delete() is renamed to DeleteProfile() to avoid confusion with method Delete() inherited from MMgt_TShared - Virtual method AIS_Dimenaion::ComputePlane() is removed from base class; each dimension defines and uses its own method with the same name (but different arguments) - Inherited virtual method Dump() with single argument in class XCAFDoc_ShapeTool is now defined as short-cut to own method Dump(), also calling parent's one - Inherited virtual method BoundingBox(void) is made visible in AIS_Shape - Inherited virtual method Box(void) is made visible in classes inheriting BVH_PrimitiveSet
0026195: Visualization - optimize selection algorithms - initial transformation of triangulation is now applied to selecting frustum; - switched from NCollection_Vec3 to gp collections to avoid conversions and usage of macros; - calculation of frustum was refactored to reduce its build time; - double pixel tolerances for selection were replaced by integer ones; - switched to splitting along the main axis only in SelectMgr BVH selection primitive sets.
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.
0024623: Visualization - improve selection mechanism Redesign of selection mechanism: - implemented 3-level BVH tree for selection; - selection now calculates in 3D space; - intersection tests were moved to SelectMgr_BaseFrustum descendants; - removed .cdl files in Select3D and .cdl related to selection in MeshVS; - SelectMgr_ViewerSelectors are now shared between local and global contexts; - transformations of sensitive entities are now stored in SelectMgr_SelectableObject only. Sensitive entities are independent from transformations, it is applied to SelectMgr_SelectingVolumeManager instance only; - connected and multiple connected interactive objects are now represented by their child objects only for SelectMgr_SelectionManager; - if interactive object has child objects, they will be stored as separate objects in SelectMgr_SelectionManager now. - test cases bugs/vis/bug24623_1, bug24623_2, bug24623_3, bug24623_4 to test performance and memory issues.