mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-04 18:06:22 +03:00
0021189: Clean up KAS:dev:ros and Products
VoxelDemo is modified to be compliant with OCC 6.5.4 Update of environment files and VS projects.
This commit is contained in:
parent
7ef2d866e2
commit
22cc9fe996
@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 9.00
|
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||||
# Visual Studio 2005
|
# Visual Studio 2008
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VoxelDemo", "VoxelDemo.vcproj", "{EF9DFAE9-E10E-42D4-87D1-52431728AFDF}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VoxelDemo", "VoxelDemo.vcproj", "{EF9DFAE9-E10E-42D4-87D1-52431728AFDF}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
@ -1,11 +1,12 @@
|
|||||||
<?xml version="1.0" encoding="windows-1251"?>
|
<?xml version="1.0" encoding="windows-1251"?>
|
||||||
<VisualStudioProject
|
<VisualStudioProject
|
||||||
ProjectType="Visual C++"
|
ProjectType="Visual C++"
|
||||||
Version="8,00"
|
Version="9.00"
|
||||||
Name="VoxelDemo"
|
Name="VoxelDemo"
|
||||||
ProjectGUID="{EF9DFAE9-E10E-42D4-87D1-52431728AFDF}"
|
ProjectGUID="{EF9DFAE9-E10E-42D4-87D1-52431728AFDF}"
|
||||||
RootNamespace="VoxelDemo"
|
RootNamespace="VoxelDemo"
|
||||||
Keyword="Win32Proj"
|
Keyword="Win32Proj"
|
||||||
|
TargetFrameworkVersion="131072"
|
||||||
>
|
>
|
||||||
<Platforms>
|
<Platforms>
|
||||||
<Platform
|
<Platform
|
||||||
@ -40,7 +41,7 @@
|
|||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
AdditionalIncludeDirectories="$(CSF_OPT_INC);.\inc"
|
AdditionalIncludeDirectories=".\inc;$(CSF_OPT_INC)"
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WNT"
|
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;WNT"
|
||||||
MinimalRebuild="true"
|
MinimalRebuild="true"
|
||||||
BasicRuntimeChecks="3"
|
BasicRuntimeChecks="3"
|
||||||
@ -66,6 +67,8 @@
|
|||||||
AdditionalLibraryDirectories="$(CSF_OPT_LIB32D)"
|
AdditionalLibraryDirectories="$(CSF_OPT_LIB32D)"
|
||||||
GenerateDebugInformation="true"
|
GenerateDebugInformation="true"
|
||||||
SubSystem="1"
|
SubSystem="1"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
TargetMachine="1"
|
TargetMachine="1"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
@ -86,9 +89,6 @@
|
|||||||
<Tool
|
<Tool
|
||||||
Name="VCAppVerifierTool"
|
Name="VCAppVerifierTool"
|
||||||
/>
|
/>
|
||||||
<Tool
|
|
||||||
Name="VCWebDeploymentTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"
|
Name="VCPostBuildEventTool"
|
||||||
/>
|
/>
|
||||||
@ -144,6 +144,8 @@
|
|||||||
SubSystem="1"
|
SubSystem="1"
|
||||||
OptimizeReferences="2"
|
OptimizeReferences="2"
|
||||||
EnableCOMDATFolding="2"
|
EnableCOMDATFolding="2"
|
||||||
|
RandomizedBaseAddress="1"
|
||||||
|
DataExecutionPrevention="0"
|
||||||
TargetMachine="1"
|
TargetMachine="1"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
@ -164,9 +166,6 @@
|
|||||||
<Tool
|
<Tool
|
||||||
Name="VCAppVerifierTool"
|
Name="VCAppVerifierTool"
|
||||||
/>
|
/>
|
||||||
<Tool
|
|
||||||
Name="VCWebDeploymentTool"
|
|
||||||
/>
|
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"
|
Name="VCPostBuildEventTool"
|
||||||
/>
|
/>
|
||||||
@ -218,7 +217,7 @@
|
|||||||
>
|
>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
CommandLine="moc.exe inc\$(InputFileName) -o moc\moc_$(InputName).cpp"
|
CommandLine="moc.exe inc\$(InputFileName) -o moc\moc_$(InputName).cpp
"
|
||||||
Outputs="moc\moc_$(InputName).cpp"
|
Outputs="moc\moc_$(InputName).cpp"
|
||||||
/>
|
/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
@ -227,7 +226,7 @@
|
|||||||
>
|
>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
CommandLine="moc.exe inc\$(InputFileName) -o moc\moc_$(InputName).cpp"
|
CommandLine="moc.exe inc\$(InputFileName) -o moc\moc_$(InputName).cpp
"
|
||||||
Outputs="moc\moc_$(InputName).cpp"
|
Outputs="moc\moc_$(InputName).cpp"
|
||||||
/>
|
/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
|
@ -8,7 +8,9 @@
|
|||||||
#include <QWidget.h>
|
#include <QWidget.h>
|
||||||
|
|
||||||
#include <AIS_InteractiveContext.hxx>
|
#include <AIS_InteractiveContext.hxx>
|
||||||
|
#include <OpenGl_GraphicDriver.hxx>
|
||||||
#include <V3d_View.hxx>
|
#include <V3d_View.hxx>
|
||||||
|
#include <OpenGl_View.hxx>
|
||||||
|
|
||||||
#include <Voxel_Prs.hxx>
|
#include <Voxel_Prs.hxx>
|
||||||
#include <Voxel_Selector.hxx>
|
#include <Voxel_Selector.hxx>
|
||||||
@ -25,6 +27,7 @@ public:
|
|||||||
|
|
||||||
Handle(AIS_InteractiveContext) getIC() const { return myIC; }
|
Handle(AIS_InteractiveContext) getIC() const { return myIC; }
|
||||||
Handle(V3d_View) getView() const { return myView; }
|
Handle(V3d_View) getView() const { return myView; }
|
||||||
|
Handle(OpenGl_GraphicDriver) getGraphicDriver() const { return myGraphicDriver; }
|
||||||
Voxel_Selector& getSelector() { return mySelector; }
|
Voxel_Selector& getSelector() { return mySelector; }
|
||||||
void setPrs(const Handle(Voxel_Prs)& prs) { myPrs = prs; }
|
void setPrs(const Handle(Voxel_Prs)& prs) { myPrs = prs; }
|
||||||
virtual QPaintEngine* paintEngine() const;
|
virtual QPaintEngine* paintEngine() const;
|
||||||
@ -47,6 +50,7 @@ protected:
|
|||||||
private:
|
private:
|
||||||
Handle(AIS_InteractiveContext) myIC;
|
Handle(AIS_InteractiveContext) myIC;
|
||||||
Handle(V3d_View) myView;
|
Handle(V3d_View) myView;
|
||||||
|
Handle(OpenGl_GraphicDriver) myGraphicDriver;
|
||||||
|
|
||||||
bool myRotate;
|
bool myRotate;
|
||||||
bool myZoom;
|
bool myZoom;
|
||||||
|
@ -24,6 +24,8 @@
|
|||||||
#include "Voxel_VisData.h"
|
#include "Voxel_VisData.h"
|
||||||
#include <Graphic3d_CBounds.hxx>
|
#include <Graphic3d_CBounds.hxx>
|
||||||
|
|
||||||
|
class Handle(OpenGl_GraphicDriver);
|
||||||
|
|
||||||
class VoxelClient_VisDrawer
|
class VoxelClient_VisDrawer
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -32,7 +34,7 @@ public:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
Standard_EXPORT static void Init();
|
Standard_EXPORT static void Init (Handle(OpenGl_GraphicDriver)& theDriver);
|
||||||
|
|
||||||
Standard_EXPORT VoxelClient_VisDrawer(Voxel_VisData* theData);
|
Standard_EXPORT VoxelClient_VisDrawer(Voxel_VisData* theData);
|
||||||
Standard_EXPORT virtual ~VoxelClient_VisDrawer();
|
Standard_EXPORT virtual ~VoxelClient_VisDrawer();
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
set CASROOT=D:\OCC653\ros
|
call ../../../env.bat %1 %2 %3
|
||||||
set QTDIR=D:\qt\4.8.2
|
|
||||||
set PATH=%QTDIR%\bin;%PATH%
|
|
||||||
|
|
||||||
call %CASROOT%/env.bat %1 %2 %3
|
if not ["%CASDEB%"] == [""] call ../../../msvc.bat %VCVER% win%ARCH% %CASDEB% VoxelDemo-%VCVER%.sln
|
||||||
call %CASROOT%/msvc.bat %1 %2 %3 VoxelDemo.sln
|
if ["%CASDEB%"] == [""] call ../../../msvc.bat %VCVER% win%ARCH% "" VoxelDemo-%VCVER%.sln
|
22
samples/qt/VoxelDemo/run.bat
Normal file
22
samples/qt/VoxelDemo/run.bat
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
call ../../../env.bat %1 %2 %3
|
||||||
|
|
||||||
|
IF not "%CASDEB%" EQU "" (
|
||||||
|
SET BIN_DIR=Debug
|
||||||
|
) ELSE (
|
||||||
|
SET BIN_DIR=Release
|
||||||
|
)
|
||||||
|
|
||||||
|
if not exist "%BIN_DIR%\VoxelDemo.exe" goto ERR_EXE
|
||||||
|
|
||||||
|
echo Starting VoxelDemo .....
|
||||||
|
start /D "%BIN_DIR%" VoxelDemo.exe
|
||||||
|
|
||||||
|
goto END
|
||||||
|
|
||||||
|
:ERR_EXE
|
||||||
|
echo Executable %BIN_DIR%\VoxelDemo.exe not found."
|
||||||
|
echo Probably you didn't compile the application.
|
||||||
|
pause
|
||||||
|
goto END
|
||||||
|
|
||||||
|
:END
|
@ -319,7 +319,7 @@ Application::Application()
|
|||||||
myDisplayedZMin = -DBL_MAX;
|
myDisplayedZMin = -DBL_MAX;
|
||||||
myDisplayedZMax = DBL_MAX;
|
myDisplayedZMax = DBL_MAX;
|
||||||
|
|
||||||
VoxelClient_VisDrawer::Init();
|
VoxelClient_VisDrawer::Init(myViewer->getGraphicDriver());
|
||||||
|
|
||||||
resize( 450, 600 );
|
resize( 450, 600 );
|
||||||
}
|
}
|
||||||
|
@ -19,9 +19,15 @@ static Handle(Graphic3d_WNTGraphicDevice) device;
|
|||||||
Viewer::Viewer(QWidget* parent):QWidget(parent)
|
Viewer::Viewer(QWidget* parent):QWidget(parent)
|
||||||
{
|
{
|
||||||
if(device.IsNull())
|
if(device.IsNull())
|
||||||
|
{
|
||||||
device = new Graphic3d_WNTGraphicDevice();
|
device = new Graphic3d_WNTGraphicDevice();
|
||||||
|
if (!device->GraphicDriver().IsNull())
|
||||||
|
{
|
||||||
|
myGraphicDriver = Handle(OpenGl_GraphicDriver)::DownCast(device->GraphicDriver());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Handle(V3d_Viewer) aViewer = new V3d_Viewer(device, TCollection_ExtendedString("Visu3D").ToExtString(), "",
|
Handle(V3d_Viewer) aViewer = new V3d_Viewer(device, TCollection_ExtendedString("Visu3D").ToExtString(), "",
|
||||||
1000, V3d_XposYnegZpos,
|
1000, V3d_XposYnegZpos,
|
||||||
Quantity_NOC_GRAY30, V3d_ZBUFFER, V3d_GOURAUD, V3d_WAIT,
|
Quantity_NOC_GRAY30, V3d_ZBUFFER, V3d_GOURAUD, V3d_WAIT,
|
||||||
true, true, V3d_TEX_NONE);
|
true, true, V3d_TEX_NONE);
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
#include <InterfaceGraphic_telem.hxx>
|
#include <InterfaceGraphic_telem.hxx>
|
||||||
#include <OpenGl_Element.hxx>
|
#include <OpenGl_Element.hxx>
|
||||||
#include <OpenGl_Callback.hxx>
|
#include <OpenGl_GraphicDriver.hxx>
|
||||||
#include <OpenGl_NamedStatus.hxx>
|
#include <OpenGl_NamedStatus.hxx>
|
||||||
|
|
||||||
#include <GL/gl.h>
|
#include <GL/gl.h>
|
||||||
@ -46,6 +46,11 @@ public:
|
|||||||
|
|
||||||
void Render (const Handle(OpenGl_Workspace) &theWorkspace) const;
|
void Render (const Handle(OpenGl_Workspace) &theWorkspace) const;
|
||||||
|
|
||||||
|
virtual void Release (const Handle(OpenGl_Context)& theContext)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
VoxelClient_VisDrawer* myHandler;
|
VoxelClient_VisDrawer* myHandler;
|
||||||
@ -126,16 +131,14 @@ static OpenGl_Element* VisDrawerCallBack (const Graphic3d_CUserDraw* theUserDraw
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**************************************************************************/
|
/**************************************************************************/
|
||||||
void VoxelClient_VisDrawer::Init()
|
void VoxelClient_VisDrawer::Init (Handle(OpenGl_GraphicDriver)& theDriver)
|
||||||
{
|
{
|
||||||
static Standard_Boolean isInitializeded(Standard_False);
|
static Standard_Boolean isInitializeded(Standard_False);
|
||||||
|
|
||||||
if (!isInitializeded)
|
if (!isInitializeded)
|
||||||
{
|
{
|
||||||
isInitializeded = Standard_True;
|
isInitializeded = Standard_True;
|
||||||
|
theDriver->UserDrawCallback() = VisDrawerCallBack;
|
||||||
OpenGl_UserDrawCallback& aCallback = UserDrawCallback ();
|
|
||||||
aCallback = VisDrawerCallBack;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user