1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-09 18:50:54 +03:00
occt/samples/qt/VoxelDemo/inc/VoxelClient_VisDrawer.h
kgv a521d90d5a 0026734: Visualization, TKOpenGl - drop outdated UserDraw interfaces
Update ViewerTest and VoxelDemo to not use UserDraw callbacks.

OpenGl_View::blitBuffers() - set 0 GLSL program after blit
to avoid side effects on code that does not use shaders.

Drop interfaces Aspect_GraphicCallbackProc, Graphic3d_CUserDraw,
Graphic3d_Group::UserDraw(), OpenGl_GraphicDriver::UserDrawCallback().

V3d_View::SetWindow() - remove optional arguments initializing redraw callback.
OpenGl_View, declare following methods as virtual for inheritance:
redraw(), redrawImmediate(), render(), renderScene(), drawBackground(), renderStructs().

VocelClient_VisDrawer - do not include removed header
2015-10-08 09:36:01 +03:00

75 lines
2.1 KiB
C++

/*
Copyright (c) 1999-2014 OPEN CASCADE SAS
This file is part of Open CASCADE Technology software library.
This library is free software; you can redistribute it and / or modify it
under the terms of the GNU Lesser General Public version 2.1 as published
by the Free Software Foundation, with special exception defined in the file
OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
distribution for complete text of the license and disclaimer of any warranty.
Alternatively, this file may be used under the terms of Open CASCADE
commercial license or contractual agreement.
*/
#ifndef _VOXEL_VISDRAWER_H_
#define _VOXEL_VISDRAWER_H_
#include "Voxel_VisData.h"
#include <Graphic3d_BndBox4f.hxx>
#include <Voxel_Prs.hxx>
//! Voxel presentation using UserDraw.
class VoxelClient_PrsGl : public Voxel_Prs
{
public:
//! Empty constructor.
VoxelClient_PrsGl() {}
protected:
//! Override compute to create UserDraw element.
Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager3d)& thePrsMgr,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer theMode) Standard_OVERRIDE;
public:
DEFINE_STANDARD_RTTI(VoxelClient_PrsGl, Voxel_Prs)
};
DEFINE_STANDARD_HANDLE(VoxelClient_PrsGl, Voxel_Prs)
class VoxelClient_VisDrawer
{
public:
class VisElement;
public:
Standard_EXPORT VoxelClient_VisDrawer(Voxel_VisData* theData);
Standard_EXPORT virtual ~VoxelClient_VisDrawer();
Standard_EXPORT void EvalMinMax(Graphic3d_BndBox4f& theMinMax) const;
Standard_EXPORT void Display(const Standard_Boolean theHighlight);
private:
Standard_EXPORT void DisplayVoxels(const Standard_Boolean theHighlight);
Standard_EXPORT void DisplayPoints(const Standard_Boolean nearest);
Standard_EXPORT void DisplayBoxes(const Standard_Boolean nearest);
Standard_EXPORT void HighlightVoxel();
Standard_EXPORT void DisplayTriangulation(const Standard_Boolean theHighlight);
Voxel_VisData* myData;
};
#endif // _VOXEL_VISDRAWER_H_