#include <Graphic3d_CView.hxx>
#include <Graphic3d_CGraduatedTrihedron.hxx>
#include <Graphic3d_SequenceOfHClipPlane.hxx>
+#include <Graphic3d_ZLayerSettings.hxx>
#include <Visual3d_TypeOfSurfaceDetail.hxx>
+#include <Visual3d_TypeOfModel.hxx>
+#include <OpenGl_BVHTreeSelector.hxx>
#include <OpenGl_LayerList.hxx>
#include <OpenGl_Light.hxx>
+#include <OpenGl_LineAttributes.hxx>
#include <Handle_OpenGl_Context.hxx>
#include <Handle_OpenGl_GraphicDriver.hxx>
-#include <Handle_OpenGl_Display.hxx>
#include <Handle_OpenGl_Workspace.hxx>
#include <Handle_OpenGl_View.hxx>
#include <Handle_OpenGl_Texture.hxx>
void SetClipPlanes (const Graphic3d_SequenceOfHClipPlane &thePlanes) { myClipPlanes = thePlanes; }
void SetVisualisation (const CALL_DEF_VIEWCONTEXT &AContext);
+ const Handle(Graphic3d_Camera)& Camera() { return myCamera; }
void SetCamera (const Handle(Graphic3d_Camera)& theCamera) { myCamera = theCamera; }
void SetClipLimit (const Graphic3d_CView& theCView);
void ChangeZLayer (const OpenGl_Structure *theStructure,
const Standard_Integer theNewLayerId);
+ //! Sets the settings for a single Z layer of specified view.
+ void SetZLayerSettings (const Standard_Integer theLayerId,
+ const Graphic3d_ZLayerSettings theSettings);
+
+ //! Changes the priority of a structure within its ZLayer
+ void ChangePriority (const OpenGl_Structure *theStructure,
+ const Standard_Integer theNewPriority);
+
void CreateBackgroundTexture (const Standard_CString AFileName, const Aspect_FillMethod AFillStyle);
void SetBackgroundTextureStyle (const Aspect_FillMethod FillStyle);
void SetBackgroundGradient (const Quantity_Color& AColor1, const Quantity_Color& AColor2, const Aspect_GradientFillMethod AType);
//! Returns visualization mode for objects in the view.
Visual3d_TypeOfSurfaceDetail SurfaceDetail() const { return mySurfaceDetail; }
- void GetMatrices (TColStd_Array2OfReal& theMatOrient,
- TColStd_Array2OfReal& theMatMapping) const;
+ //! Returns selector for BVH tree, providing a possibility to store information
+ //! about current view volume and to detect which objects are overlapping it.
+ OpenGl_BVHTreeSelector& BVHTreeSelector() { return myBVHSelector; }
+
+ //! Marks BVH tree for given priority list as dirty and
+ //! marks primitive set for rebuild.
+ void InvalidateBVHData (const Standard_Integer theLayerId);
+
+ //! Returns view-mapping and orientation matrices.
+ void GetMatrices (OpenGl_Mat4& theOrientation,
+ OpenGl_Mat4& theViewMapping) const;
//! Returns list of immediate structures rendered on top of main presentation
const OpenGl_SequenceOfStructure& ImmediateStructures() const
void RenderStructs (const Handle(OpenGl_Workspace) &AWorkspace);
void RedrawLayer2d (const Handle(OpenGl_PrinterContext)& thePrintContext,
+ const Handle(OpenGl_Workspace) &theWorkspace,
const Graphic3d_CView& theCView,
const Aspect_CLayer2d& theCLayer);
+ void RedrawTrihedron (const Handle(OpenGl_Workspace) &theWorkspace);
//! Redraw contents of model scene: clipping planes,
//! lights, structures. The peculiar properties of "scene" is that
//! @param theProjection [in] view projection matrix.
//! @param theOrientation [in] view orientation matrix.
void RedrawScene (const Handle(OpenGl_PrinterContext)& thePrintContext,
- const Handle(OpenGl_Workspace)& theWorkspace,
- const OpenGl_Matrix* theProjection,
- const OpenGl_Matrix* theOrientation);
+ const Handle(OpenGl_Workspace)& theWorkspace);
- Handle(OpenGl_Texture) myTextureEnv;
- Visual3d_TypeOfSurfaceDetail mySurfaceDetail; //WSSurfaceDetail
- Standard_Integer myBackfacing; //WSBackfacing
+ Handle(OpenGl_LineAttributes) myLineAttribs;
+ Handle(OpenGl_Texture) myTextureEnv;
+ Visual3d_TypeOfSurfaceDetail mySurfaceDetail;
+ Standard_Integer myBackfacing;
- OPENGL_BG_TEXTURE myBgTexture; //WSBgTexture
- OPENGL_BG_GRADIENT myBgGradient; //WSBgGradient
+ OPENGL_BG_TEXTURE myBgTexture;
+ OPENGL_BG_GRADIENT myBgGradient;
OPENGL_ZCLIP myZClip;
//View_LABViewContext
int myVisualization;
- int myIntShadingMethod;
+ Visual3d_TypeOfModel myShadingModel; //!< lighting shading model
//View_LABLight
OpenGl_ListOfLight myLights;
StateInfo myLastViewMappingState;
StateInfo myLastLightSourceState;
+ //! Is needed for selection of overlapping objects and storage of the current view volume
+ OpenGl_BVHTreeSelector myBVHSelector;
+
Standard_Size myModificationState;
public:
DEFINE_STANDARD_ALLOC
DEFINE_STANDARD_RTTI(OpenGl_View) // Type definition
+ friend class OpenGl_Workspace;
+
};
#endif // _OpenGl_View_Header