mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
Compare commits
117 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
8415a280ed | ||
|
85c81d703f | ||
|
7aad5710fb | ||
|
f7e8fe1d88 | ||
|
472c48335d | ||
|
a8301722d0 | ||
|
1abff7396b | ||
|
a5806fd49e | ||
|
65b387bd75 | ||
|
3e9d304d46 | ||
|
916851661a | ||
|
5ed5c561b0 | ||
|
36228fd825 | ||
|
168b9ec45a | ||
|
7ed3f1cf33 | ||
|
c3cf76dfbd | ||
|
3d9cefa6a7 | ||
|
dca967d0b8 | ||
|
064a93b073 | ||
|
b015a803fc | ||
|
43809f7eec | ||
|
eeb913ae52 | ||
|
5788f5438f | ||
|
aa2f78c2de | ||
|
87f59163e1 | ||
|
0ed6989cfa | ||
|
7cfb39680f | ||
|
c209782cf4 | ||
|
7faaccfd34 | ||
|
2758330973 | ||
|
6598416b22 | ||
|
4709515e0f | ||
|
446e9c14e5 | ||
|
6060dd1fed | ||
|
723754e2a3 | ||
|
cf5195b88c | ||
|
dc3fe572ec | ||
|
8db070a59d | ||
|
ee535a6c7c | ||
|
fa6cd9152f | ||
|
a1bd71b4a8 | ||
|
a20400b3a2 | ||
|
16e65a0347 | ||
|
5f05c0a3d8 | ||
|
3389667b4c | ||
|
b7a3c4704b | ||
|
1c88cbaf14 | ||
|
4e57c75ee1 | ||
|
a8676008f7 | ||
|
a174a3c54f | ||
|
163ef25006 | ||
|
77088633a2 | ||
|
ab4a555430 | ||
|
92f122144f | ||
|
91322f44fd | ||
|
3bea4c165c | ||
|
aadab519fd | ||
|
19d6e40d3f | ||
|
2426168486 | ||
|
024855ee13 | ||
|
9e3758ca29 | ||
|
9786a9af2b | ||
|
aec37c1569 | ||
|
3616fc066e | ||
|
1d0a9d4d46 | ||
|
9254e07c59 | ||
|
16347bb877 | ||
|
22f47da6ef | ||
|
094942236a | ||
|
b989480555 | ||
|
d9bea41f2f | ||
|
b3fb2d64c7 | ||
|
4bd102b84c | ||
|
3f257c62d2 | ||
|
128cc8df34 | ||
|
474be6cde1 | ||
|
809eca9db6 | ||
|
6c3e4c2965 | ||
|
5edb1ac35b | ||
|
cfd5fa01e8 | ||
|
dac04bfa38 | ||
|
1981cb228a | ||
|
f34eec8f91 | ||
|
5f9575b332 | ||
|
6aac585ac8 | ||
|
228148b373 | ||
|
67d97f0eec | ||
|
94a57f1fb2 | ||
|
4754e16481 | ||
|
5ae15e0ef7 | ||
|
d97f89db4f | ||
|
ea9632bc14 | ||
|
cfb6776ec0 | ||
|
b8ddfc2f5d | ||
|
44cf55e600 | ||
|
7566ccf330 | ||
|
a940de4195 | ||
|
ddd95bbf9a | ||
|
e1db25a9f0 | ||
|
f8814ccf52 | ||
|
746bb46a41 | ||
|
61c421bffa | ||
|
b4c5c58ed4 | ||
|
08c28f5b83 | ||
|
355c155147 | ||
|
a6cfe9b29c | ||
|
6c8856a08f | ||
|
d9b81fa5f5 | ||
|
a8fcd8d07e | ||
|
1a7dfdb719 | ||
|
c34dba32d4 | ||
|
53e7fedeb2 | ||
|
c888decadb | ||
|
7fe83417f1 | ||
|
e6aad0ee24 | ||
|
a9da59ffb6 | ||
|
bfff00a894 |
21
adm/UDLIST
21
adm/UDLIST
@@ -92,8 +92,6 @@ t TKG3d
|
||||
t TKGeomBase
|
||||
p AppBlend
|
||||
p ApproxInt
|
||||
p BOP
|
||||
p BOPTColStd
|
||||
p BOPTools
|
||||
p BRepAlgo
|
||||
p BRepAlgoAPI
|
||||
@@ -124,7 +122,6 @@ p BiTgte
|
||||
p Bisector
|
||||
p Blend
|
||||
p BlendFunc
|
||||
p BooleanOperations
|
||||
p ChFi2d
|
||||
p ChFi3d
|
||||
p ChFiDS
|
||||
@@ -208,33 +205,23 @@ t TKTopAlgo
|
||||
t TKXMesh
|
||||
n InterfaceGraphic
|
||||
p AIS
|
||||
p AIS2D
|
||||
p AlienImage
|
||||
p Aspect
|
||||
p CGM
|
||||
p DsgPrs
|
||||
p GGraphic2d
|
||||
p Graphic2d
|
||||
p Graphic3d
|
||||
p Image
|
||||
p ImageUtility
|
||||
p MFT
|
||||
p MeshVS
|
||||
p NIS
|
||||
p OpenGl
|
||||
p PS
|
||||
p PlotMgt
|
||||
p Prs2d
|
||||
p Prs3d
|
||||
p PrsMgr
|
||||
p Select2D
|
||||
p Select3D
|
||||
p SelectBasics
|
||||
p SelectMgr
|
||||
p StdPrs
|
||||
p StdSelect
|
||||
p TColQuantity
|
||||
p V2d
|
||||
p V3d
|
||||
p Viewer
|
||||
p Visual3d
|
||||
@@ -242,13 +229,11 @@ p Voxel
|
||||
p WNT
|
||||
p Xw
|
||||
p Cocoa
|
||||
r FontMFT
|
||||
r Textures
|
||||
t TKMeshVS
|
||||
t TKNIS
|
||||
t TKOpenGl
|
||||
t TKService
|
||||
t TKV2d
|
||||
t TKV3d
|
||||
t TKVoxel
|
||||
n BinTObjDrivers
|
||||
@@ -475,7 +460,6 @@ p TObjDRAW
|
||||
p TestTopOpe
|
||||
p TestTopOpeDraw
|
||||
p TestTopOpeTools
|
||||
p Viewer2dTest
|
||||
p ViewerTest
|
||||
p XDEDRAW
|
||||
p XSDRAW
|
||||
@@ -497,9 +481,12 @@ p QANCollection
|
||||
p QANewBRepNaming
|
||||
p QANewDBRepNaming
|
||||
p QANewModTopOpe
|
||||
p QAViewer2dTest
|
||||
r QAResources
|
||||
t TKQADraw
|
||||
p QADNaming
|
||||
p QABugs
|
||||
p Font
|
||||
p BOPAlgo
|
||||
p BOPDS
|
||||
p BOPCol
|
||||
p BOPInt
|
||||
|
@@ -4,7 +4,7 @@
|
||||
#pragma warning( disable : 4800 )
|
||||
OCCViewer::OCCViewer(void)
|
||||
{
|
||||
myGraphicDevice=NULL;
|
||||
myGraphicDriver=NULL;
|
||||
myViewer=NULL;
|
||||
myView=NULL;
|
||||
myAISContext=NULL;
|
||||
@@ -17,22 +17,27 @@ OCCViewer::~OCCViewer(void)
|
||||
|
||||
bool OCCViewer::InitViewer(void* wnd)
|
||||
{
|
||||
try {
|
||||
myGraphicDevice = new Graphic3d_WNTGraphicDevice();
|
||||
} catch (Standard_Failure) {
|
||||
return false;
|
||||
}
|
||||
TCollection_ExtendedString a3DName("Visu3D");
|
||||
myViewer = new V3d_Viewer( myGraphicDevice, a3DName.ToExtString(),"", 1000.0,
|
||||
V3d_XposYnegZpos, Quantity_NOC_GRAY30,
|
||||
V3d_ZBUFFER,V3d_GOURAUD,V3d_WAIT,
|
||||
Standard_True, Standard_False);
|
||||
try
|
||||
{
|
||||
Handle(Aspect_DisplayConnection) aDisplayConnection;
|
||||
myGraphicDriver = Graphic3d::InitGraphicDriver (aDisplayConnection);
|
||||
}
|
||||
catch (Standard_Failure)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
TCollection_ExtendedString a3DName("Visu3D");
|
||||
myViewer = new V3d_Viewer (myGraphicDriver, a3DName.ToExtString(),"", 1000.0,
|
||||
V3d_XposYnegZpos, Quantity_NOC_GRAY30,
|
||||
V3d_ZBUFFER,V3d_GOURAUD,V3d_WAIT,
|
||||
Standard_True, Standard_False);
|
||||
|
||||
myViewer->Init();
|
||||
myViewer->SetDefaultLights();
|
||||
myViewer->SetLightOn();
|
||||
myView = myViewer->CreateView();
|
||||
Handle(WNT_Window) aWNTWindow = new WNT_Window(myGraphicDevice, reinterpret_cast<HWND> (wnd));
|
||||
Handle(WNT_Window) aWNTWindow = new WNT_Window (reinterpret_cast<HWND> (wnd));
|
||||
myView->SetWindow(aWNTWindow);
|
||||
if (!aWNTWindow->IsMapped())
|
||||
aWNTWindow->Map();
|
||||
@@ -543,9 +548,12 @@ void OCCViewer::CreateNewView(void* wnd)
|
||||
if (myAISContext.IsNull())
|
||||
return;
|
||||
myView = myAISContext->CurrentViewer()->CreateView();
|
||||
if (myGraphicDevice.IsNull())
|
||||
myGraphicDevice = new Graphic3d_WNTGraphicDevice();
|
||||
Handle(WNT_Window) aWNTWindow = new WNT_Window(myGraphicDevice, reinterpret_cast<HWND> (wnd));
|
||||
if (myGraphicDriver.IsNull())
|
||||
{
|
||||
Handle(Aspect_DisplayConnection) aDisplayConnection;
|
||||
myGraphicDriver = Graphic3d::InitGraphicDriver (aDisplayConnection);
|
||||
}
|
||||
Handle(WNT_Window) aWNTWindow = new WNT_Window (reinterpret_cast<HWND> (wnd));
|
||||
myView->SetWindow(aWNTWindow);
|
||||
Standard_Integer w=100, h=100;
|
||||
aWNTWindow->Size(w,h);
|
||||
|
@@ -11,7 +11,7 @@ private:
|
||||
Handle_V3d_Viewer myViewer;
|
||||
Handle_V3d_View myView;
|
||||
Handle_AIS_InteractiveContext myAISContext;
|
||||
Handle_Graphic3d_WNTGraphicDevice myGraphicDevice;
|
||||
Handle_Graphic3d_GraphicDriver myGraphicDriver;
|
||||
public:
|
||||
__declspec(dllexport) bool InitViewer(void* wnd);
|
||||
__declspec(dllexport) bool ImportBRep(char* filename);
|
||||
|
@@ -23,9 +23,11 @@
|
||||
#include <PTColStd_PersistentTransientMap.hxx>
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
//for OCC graphic
|
||||
#include <Aspect_DisplayConnection.hxx>
|
||||
#include <WNT_Window.hxx>
|
||||
#include <Graphic3d_WNTGraphicDevice.hxx>
|
||||
#include <Quantity_NameOfColor.hxx>
|
||||
#include <Graphic3d.hxx>
|
||||
#include <Graphic3d_GraphicDriver.hxx>
|
||||
#include <Graphic3d_NameOfMaterial.hxx>
|
||||
//for object display
|
||||
#include <V3d_Viewer.hxx>
|
||||
|
@@ -28,7 +28,6 @@
|
||||
|
||||
#include <AIS_InteractiveContext.hxx>
|
||||
#include <AIS_Shape.hxx>
|
||||
#include <Graphic3d_WNTGraphicDevice.hxx>
|
||||
#include <V3d_Viewer.hxx>
|
||||
#include <V3d_View.hxx>
|
||||
#include <WNT_Window.hxx>
|
||||
|
@@ -27,7 +27,6 @@
|
||||
#include <Standard.hxx>
|
||||
#include <AIS_InteractiveContext.hxx>
|
||||
#include <AIS_Shape.hxx>
|
||||
#include <Graphic3d_WNTGraphicDevice.hxx>
|
||||
#include <V3d_Viewer.hxx>
|
||||
#include <V3d_View.hxx>
|
||||
#include <WNT_Window.hxx>
|
||||
|
@@ -126,8 +126,7 @@ CViewer3dView::CViewer3dView()
|
||||
myDegenerateModeIsOn=Standard_True;
|
||||
m_Pen = NULL;
|
||||
NbActiveLights=2; // There are 2 default active lights
|
||||
myGraphicDriver = Handle(Graphic3d_GraphicDriver)::DownCast(
|
||||
((CViewer3dApp*)AfxGetApp())->GetGraphicDevice()->GraphicDriver() );
|
||||
myGraphicDriver = ((CViewer3dApp*)AfxGetApp())->GetGraphicDriver();
|
||||
}
|
||||
|
||||
CViewer3dView::~CViewer3dView()
|
||||
@@ -158,11 +157,7 @@ void CViewer3dView::OnInitialUpdate()
|
||||
// store for restore state after rotation (witch is in Degenerated mode)
|
||||
myDegenerateModeIsOn = Standard_True;
|
||||
|
||||
|
||||
Handle(Graphic3d_WNTGraphicDevice) theGraphicDevice =
|
||||
((CViewer3dApp*)AfxGetApp())->GetGraphicDevice();
|
||||
|
||||
Handle(WNT_Window) aWNTWindow = new WNT_Window(theGraphicDevice,GetSafeHwnd ());
|
||||
Handle(WNT_Window) aWNTWindow = new WNT_Window(GetSafeHwnd ());
|
||||
myView->SetWindow(aWNTWindow);
|
||||
if (!aWNTWindow->IsMapped()) aWNTWindow->Map();
|
||||
|
||||
|
@@ -88,14 +88,12 @@
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <gp_Vec.hxx>
|
||||
#include <gp_Vec2d.hxx>
|
||||
#include <Graphic3d_WNTGraphicDevice.hxx>
|
||||
#include <MMgt_TShared.hxx>
|
||||
#include <OSD_Environment.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <Prs3d_IsoAspect.hxx>
|
||||
#include <Prs3d_LineAspect.hxx>
|
||||
#include <Prs3d_Text.hxx>
|
||||
#include <PrsMgr_PresentationManager2d.hxx>
|
||||
#include <Quantity_Factor.hxx>
|
||||
#include <Quantity_Length.hxx>
|
||||
#include <Quantity_NameOfColor.hxx>
|
||||
@@ -121,9 +119,6 @@
|
||||
#include <StdPrs_Curve.hxx>
|
||||
#include <StdPrs_Point.hxx>
|
||||
#include <StdPrs_PoleCurve.hxx>
|
||||
#include <StdSelect_SensitiveText2d.hxx>
|
||||
#include <StdSelect_TextProjector2d.hxx>
|
||||
#include <StdSelect_ViewerSelector2d.hxx>
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
#include <TColgp_Array1OfPnt2d.hxx>
|
||||
#include <TColgp_HArray1OfPnt2d.hxx>
|
||||
@@ -145,7 +140,6 @@
|
||||
#include <UnitsAPI.hxx>
|
||||
#include <V3d_View.hxx>
|
||||
#include <V3d_Viewer.hxx>
|
||||
#include <WNT_WDriver.hxx>
|
||||
#include <WNT_Window.hxx>
|
||||
|
||||
// specific STEP
|
||||
|
@@ -92,7 +92,6 @@
|
||||
#include <gp_Vec.hxx>
|
||||
#include <gp_Vec2d.hxx>
|
||||
#include <Graphic3d_NameOfMaterial.hxx>
|
||||
#include <Graphic3d_WNTGraphicDevice.hxx>
|
||||
#include <MMgt_TShared.hxx>
|
||||
#include <OSD_Environment.hxx>
|
||||
#include <Precision.hxx>
|
||||
@@ -100,7 +99,6 @@
|
||||
#include <Prs3d_LineAspect.hxx>
|
||||
#include <Prs3d_Projector.hxx>
|
||||
#include <Prs3d_Text.hxx>
|
||||
#include <PrsMgr_PresentationManager2d.hxx>
|
||||
#include <Quantity_Factor.hxx>
|
||||
#include <Quantity_Length.hxx>
|
||||
#include <Quantity_NameOfColor.hxx>
|
||||
@@ -126,9 +124,6 @@
|
||||
#include <StdPrs_Curve.hxx>
|
||||
#include <StdPrs_Point.hxx>
|
||||
#include <StdPrs_PoleCurve.hxx>
|
||||
#include <StdSelect_SensitiveText2d.hxx>
|
||||
#include <StdSelect_TextProjector2d.hxx>
|
||||
#include <StdSelect_ViewerSelector2d.hxx>
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
#include <TColgp_Array1OfPnt2d.hxx>
|
||||
#include <TColgp_HArray1OfPnt2d.hxx>
|
||||
@@ -149,7 +144,6 @@
|
||||
#include <UnitsAPI.hxx>
|
||||
#include <V3d_View.hxx>
|
||||
#include <V3d_Viewer.hxx>
|
||||
#include <WNT_WDriver.hxx>
|
||||
#include <WNT_Window.hxx>
|
||||
#include <BRepPrimAPI_MakeBox.hxx>
|
||||
#include <BRepPrimAPI_MakeCylinder.hxx>
|
||||
|
@@ -78,7 +78,6 @@
|
||||
|
||||
#include <AIS_InteractiveContext.hxx>
|
||||
#include <AIS_Shape.hxx>
|
||||
#include <Graphic3d_WNTGraphicDevice.hxx>
|
||||
#include <V3d_Viewer.hxx>
|
||||
#include <V3d_View.hxx>
|
||||
#include <WNT_Window.hxx>
|
||||
|
@@ -49,11 +49,11 @@ CAnimationDoc::CAnimationDoc()
|
||||
StaticCount++;
|
||||
myCount = StaticCount;
|
||||
|
||||
Handle(Graphic3d_WNTGraphicDevice) theGraphicDevice =
|
||||
((CAnimationApp*)AfxGetApp())->GetGraphicDevice();
|
||||
Handle(Graphic3d_GraphicDriver) aGraphicDriver =
|
||||
((CAnimationApp*)AfxGetApp())->GetGraphicDriver();
|
||||
|
||||
TCollection_ExtendedString a3DName("Visu3D");
|
||||
myViewer = new V3d_Viewer(theGraphicDevice,a3DName.ToExtString(),"", 1000.0,
|
||||
myViewer = new V3d_Viewer(aGraphicDriver,a3DName.ToExtString(),"", 1000.0,
|
||||
V3d_XposYnegZpos, Quantity_NOC_GRAY30,
|
||||
V3d_ZBUFFER,V3d_GOURAUD,V3d_WAIT,
|
||||
Standard_True, Standard_False);
|
||||
@@ -86,7 +86,7 @@ CAnimationDoc::CAnimationDoc()
|
||||
TCHAR tchBuf[80];
|
||||
|
||||
CString CASROOTValue = ((GetEnvironmentVariable("CASROOT", tchBuf, 80) > 0) ? tchBuf : NULL);
|
||||
aString = (CASROOTValue + "\\..\\data\\occ");
|
||||
aString = (CASROOTValue + "\\data\\occ");
|
||||
|
||||
char DataDirPath[200];
|
||||
strcpy_s(DataDirPath, aString);
|
||||
|
@@ -152,10 +152,7 @@ void CAnimationView3D::OnInitialUpdate()
|
||||
// store for restore state after rotation (witch is in Degenerated mode)
|
||||
myDegenerateModeIsOn = myView->DegenerateModeIsOn();
|
||||
|
||||
Handle(Graphic3d_WNTGraphicDevice) theGraphicDevice =
|
||||
((CAnimationApp*)AfxGetApp())->GetGraphicDevice();
|
||||
|
||||
Handle(WNT_Window) aWNTWindow = new WNT_Window(theGraphicDevice,GetSafeHwnd ());
|
||||
Handle(WNT_Window) aWNTWindow = new WNT_Window(GetSafeHwnd ());
|
||||
myView->SetWindow(aWNTWindow);
|
||||
if (!aWNTWindow->IsMapped()) aWNTWindow->Map();
|
||||
|
||||
|
@@ -154,36 +154,18 @@ enum CurrentAction3d {
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <gp_Vec.hxx>
|
||||
#include <gp_Vec2d.hxx>
|
||||
#include <Graphic2d_Array1OfVertex.hxx>
|
||||
#include <Graphic2d_Buffer.hxx>
|
||||
#include <Graphic2d_CircleMarker.hxx>
|
||||
#include <Graphic2d_DisplayList.hxx>
|
||||
#include <Graphic2d_Drawer.hxx>
|
||||
#include <Graphic2d_PolyLine.hxx>
|
||||
#include <Graphic2d_Segment.hxx>
|
||||
#include <Graphic2d_SetOfCurves.hxx>
|
||||
#include <Graphic2d_SetOfSegments.hxx>
|
||||
#include <Graphic2d_Text.hxx>
|
||||
#include <Graphic2d_Vertex.hxx>
|
||||
#include <Graphic2d_View.hxx>
|
||||
#include <Graphic3d_WNTGraphicDevice.hxx>
|
||||
#include <MMgt_TShared.hxx>
|
||||
#include <OSD_Environment.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <Prs3d_IsoAspect.hxx>
|
||||
#include <Prs3d_LineAspect.hxx>
|
||||
#include <Prs3d_Text.hxx>
|
||||
#include <PrsMgr_PresentationManager2d.hxx>
|
||||
#include <Quantity_Factor.hxx>
|
||||
#include <Quantity_Length.hxx>
|
||||
#include <Quantity_NameOfColor.hxx>
|
||||
#include <Quantity_PhysicalQuantity.hxx>
|
||||
#include <Quantity_PlaneAngle.hxx>
|
||||
#include <Quantity_TypeOfColor.hxx>
|
||||
#include <Select2D_SensitiveArc.hxx>
|
||||
#include <Select2D_SensitiveBox.hxx>
|
||||
#include <Select2D_SensitiveEntity.hxx>
|
||||
#include <Select2D_SensitiveSegment.hxx>
|
||||
#include <SelectBasics_BasicTool.hxx>
|
||||
#include <SelectBasics_ListOfBox2d.hxx>
|
||||
#include <SelectMgr_EntityOwner.hxx>
|
||||
@@ -207,9 +189,6 @@ enum CurrentAction3d {
|
||||
#include <StdPrs_Curve.hxx>
|
||||
#include <StdPrs_Point.hxx>
|
||||
#include <StdPrs_PoleCurve.hxx>
|
||||
#include <StdSelect_SensitiveText2d.hxx>
|
||||
#include <StdSelect_TextProjector2d.hxx>
|
||||
#include <StdSelect_ViewerSelector2d.hxx>
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
#include <TColgp_Array1OfPnt2d.hxx>
|
||||
#include <TColgp_HArray1OfPnt2d.hxx>
|
||||
@@ -225,11 +204,8 @@ enum CurrentAction3d {
|
||||
#include <TopoDS_Solid.hxx>
|
||||
#include <TopTools_HSequenceOfShape.hxx>
|
||||
#include <UnitsAPI.hxx>
|
||||
#include <V2d_View.hxx>
|
||||
#include <V2d_Viewer.hxx>
|
||||
#include <V3d_View.hxx>
|
||||
#include <V3d_Viewer.hxx>
|
||||
#include <WNT_WDriver.hxx>
|
||||
#include <WNT_Window.hxx>
|
||||
#include "HLRAlgo_Projector.hxx"
|
||||
#include "Aspect_MarkMap.hxx"
|
||||
|
@@ -33,7 +33,8 @@ COCCDemoApp::COCCDemoApp()
|
||||
SampleName = "";
|
||||
try
|
||||
{
|
||||
myGraphicDevice = new Graphic3d_WNTGraphicDevice;
|
||||
Handle(Aspect_DisplayConnection) aDisplayConnection;
|
||||
myGraphicDriver = Graphic3d::InitGraphicDriver (aDisplayConnection);
|
||||
}
|
||||
catch(Standard_Failure)
|
||||
{
|
||||
|
@@ -25,8 +25,8 @@ class COCCDemoApp : public OCC_BaseApp
|
||||
{
|
||||
public:
|
||||
COCCDemoApp();
|
||||
Handle(Graphic3d_WNTGraphicDevice) GetGraphicDevice() const
|
||||
{ return myGraphicDevice; } ;
|
||||
Handle(Graphic3d_GraphicDriver) GetGraphicDriver() const
|
||||
{ return myGraphicDriver; } ;
|
||||
|
||||
// Overrides
|
||||
// ClassWizard generated virtual function overrides
|
||||
@@ -44,7 +44,7 @@ public:
|
||||
DECLARE_MESSAGE_MAP()
|
||||
|
||||
private:
|
||||
Handle(Graphic3d_WNTGraphicDevice) myGraphicDevice;
|
||||
Handle(Graphic3d_GraphicDriver) myGraphicDriver;
|
||||
|
||||
};
|
||||
|
||||
|
@@ -43,10 +43,10 @@ END_MESSAGE_MAP()
|
||||
COCCDemoDoc::COCCDemoDoc()
|
||||
{
|
||||
// TODO: add one-time construction code here
|
||||
Handle(Graphic3d_WNTGraphicDevice) theGraphicDevice =
|
||||
((COCCDemoApp*)AfxGetApp())->GetGraphicDevice();
|
||||
Handle(Graphic3d_GraphicDriver) aGraphicDriver =
|
||||
((COCCDemoApp*)AfxGetApp())->GetGraphicDriver();
|
||||
|
||||
myViewer = new V3d_Viewer(theGraphicDevice,(short *) "Visu3D");
|
||||
myViewer = new V3d_Viewer(aGraphicDriver,(short *) "Visu3D");
|
||||
myViewer->SetDefaultLights();
|
||||
myViewer->SetLightOn();
|
||||
myViewer->SetDefaultBackgroundColor(Quantity_TOC_RGB, 0.,0.,0.);
|
||||
|
@@ -70,8 +70,7 @@ COCCDemoView::COCCDemoView()
|
||||
myCurrentMode = CurAction3d_Nothing;
|
||||
myVisMode = VIS_SHADE;
|
||||
m_Pen = NULL;
|
||||
myGraphicDriver = Handle(Graphic3d_GraphicDriver)::DownCast(
|
||||
((COCCDemoApp*)AfxGetApp())->GetGraphicDevice()->GraphicDriver() );
|
||||
myGraphicDriver = ((COCCDemoApp*)AfxGetApp())->GetGraphicDriver();
|
||||
}
|
||||
|
||||
COCCDemoView::~COCCDemoView()
|
||||
@@ -99,10 +98,7 @@ void COCCDemoView::OnInitialUpdate()
|
||||
|
||||
myView = GetDocument()->GetViewer()->CreateView();
|
||||
|
||||
Handle(Graphic3d_WNTGraphicDevice) theGraphicDevice =
|
||||
((COCCDemoApp*)AfxGetApp())->GetGraphicDevice();
|
||||
|
||||
Handle(WNT_Window) aWNTWindow = new WNT_Window(theGraphicDevice,GetSafeHwnd ());
|
||||
Handle(WNT_Window) aWNTWindow = new WNT_Window(GetSafeHwnd ());
|
||||
myView->SetWindow(aWNTWindow);
|
||||
if (!aWNTWindow->IsMapped()) aWNTWindow->Map();
|
||||
|
||||
|
@@ -29,10 +29,11 @@
|
||||
|
||||
#include <Standard.hxx>
|
||||
|
||||
#include <Aspect_DisplayConnection.hxx>
|
||||
#include <AIS_InteractiveContext.hxx>
|
||||
#include <AIS_Shape.hxx>
|
||||
#include <AIS_Point.hxx>
|
||||
#include <Graphic3d_WNTGraphicDevice.hxx>
|
||||
#include <Graphic3d.hxx>
|
||||
#include <V3d_Viewer.hxx>
|
||||
#include <V3d_View.hxx>
|
||||
#include <WNT_Window.hxx>
|
||||
|
@@ -11,7 +11,7 @@
|
||||
|
||||
#include "OCC_BaseApp.h"
|
||||
#include <Standard_Macro.hxx>
|
||||
#include <Handle_Graphic3d_WNTGraphicDevice.hxx>
|
||||
#include <Handle_Graphic3d_GraphicDriver.hxx>
|
||||
|
||||
class Standard_EXPORT OCC_3dApp : public OCC_BaseApp
|
||||
{
|
||||
@@ -19,10 +19,10 @@ public:
|
||||
OCC_3dApp();
|
||||
virtual ~OCC_3dApp();
|
||||
|
||||
Handle_Graphic3d_WNTGraphicDevice GetGraphicDevice() const { return myGraphicDevice; } ;
|
||||
Handle_Graphic3d_GraphicDriver GetGraphicDriver() const { return myGraphicDriver; } ;
|
||||
|
||||
protected :
|
||||
Handle_Graphic3d_WNTGraphicDevice myGraphicDevice;
|
||||
Handle_Graphic3d_GraphicDriver myGraphicDriver;
|
||||
};
|
||||
|
||||
#endif // !defined(AFX_OCC_3DAPP_H__FC7278BF_390D_11D7_8611_0060B0EE281E__INCLUDED_)
|
||||
|
@@ -9,13 +9,10 @@
|
||||
#include <Quantity_Factor.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_CString.hxx>
|
||||
#include <Handle_PrsMgr_PresentationManager2d.hxx>
|
||||
#include <Handle_Graphic2d_GraphicObject.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Handle_SelectMgr_Selection.hxx>
|
||||
#include <Standard_OStream.hxx>
|
||||
#include <Standard_IStream.hxx>
|
||||
#include <AIS2D_InteractiveObject.hxx>
|
||||
|
||||
DEFINE_STANDARD_HANDLE(Sample2D_Image,AIS2D_InteractiveObject)
|
||||
class Sample2D_Image : public AIS2D_InteractiveObject {
|
||||
|
@@ -24,27 +24,13 @@
|
||||
#include "Standard_ShortReal.hxx"
|
||||
#pragma warning( default : 4244 ) // Issue warning 4244
|
||||
|
||||
#include <V2d_Viewer.hxx>
|
||||
#include <V2d_View.hxx>
|
||||
#include <AIS2D_InteractiveContext.hxx>
|
||||
#include <WNT_WDriver.hxx>
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <AIS_InteractiveContext.hxx>
|
||||
#include <AIS_Shape.hxx>
|
||||
#include <Graphic3d_WNTGraphicDevice.hxx>
|
||||
#include <V3d_Viewer.hxx>
|
||||
#include <V3d_View.hxx>
|
||||
#include <WNT_Window.hxx>
|
||||
|
||||
#include <AIS2D_InteractiveObject.hxx>
|
||||
#include <Graphic2d_SetOfCurves.hxx>
|
||||
#include <Geom2d_TrimmedCurve.hxx>
|
||||
#include <Prs2d_AspectLine.hxx>
|
||||
#include <Graphic2d_Array1OfVertex.hxx>
|
||||
#include <Graphic2d_Polyline.hxx>
|
||||
#include <Graphic2d_Text.hxx>
|
||||
|
||||
#include <Prs3d_Drawer.hxx>
|
||||
#include <Prs3d_IsoAspect.hxx>
|
||||
#include <Prs3d_ShadingAspect.hxx>
|
||||
|
@@ -9,14 +9,12 @@
|
||||
#include <QColor>
|
||||
#include <QColorDialog>
|
||||
|
||||
#ifndef WNT
|
||||
#include <Graphic3d_GraphicDevice.hxx>
|
||||
#else
|
||||
#include <Graphic3d_WNTGraphicDevice.hxx>
|
||||
#endif
|
||||
|
||||
#include <Aspect_DisplayConnection.hxx>
|
||||
#include <AIS_InteractiveObject.hxx>
|
||||
#include <Graphic3d.hxx>
|
||||
#include <Graphic3d_NameOfMaterial.hxx>
|
||||
#include <Graphic3d_GraphicDriver.hxx>
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
|
||||
Handle(V3d_Viewer) DocumentCommon::Viewer( const Standard_CString aDisplay,
|
||||
const Standard_ExtString aName,
|
||||
@@ -26,21 +24,20 @@ Handle(V3d_Viewer) DocumentCommon::Viewer( const Standard_CString aDisplay,
|
||||
const Standard_Boolean ComputedMode,
|
||||
const Standard_Boolean aDefaultComputedMode )
|
||||
{
|
||||
#ifndef WNT
|
||||
static Handle(Graphic3d_GraphicDevice) defaultdevice;
|
||||
if( defaultdevice.IsNull() )
|
||||
defaultdevice = new Graphic3d_GraphicDevice( aDisplay );
|
||||
return new V3d_Viewer(defaultdevice,aName,aDomain,ViewSize,ViewProj,
|
||||
Quantity_NOC_GRAY30,V3d_ZBUFFER,V3d_GOURAUD,V3d_WAIT,
|
||||
ComputedMode,aDefaultComputedMode,V3d_TEX_NONE);
|
||||
#else
|
||||
static Handle(Graphic3d_WNTGraphicDevice) defaultdevice;
|
||||
if( defaultdevice.IsNull() )
|
||||
defaultdevice = new Graphic3d_WNTGraphicDevice();
|
||||
return new V3d_Viewer(defaultdevice,aName,aDomain,ViewSize,ViewProj,
|
||||
Quantity_NOC_GRAY30,V3d_ZBUFFER,V3d_GOURAUD,V3d_WAIT,
|
||||
ComputedMode,aDefaultComputedMode,V3d_TEX_NONE);
|
||||
static Handle(Graphic3d_GraphicDriver) aGraphicDriver;
|
||||
|
||||
if (aGraphicDriver.IsNull())
|
||||
{
|
||||
Handle(Aspect_DisplayConnection) aDisplayConnection;
|
||||
#if !defined(_WIN32) && !defined(__WIN32__) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX))
|
||||
aDisplayConnection = new Aspect_DisplayConnection (aDisplay);
|
||||
#endif
|
||||
aGraphicDriver = Graphic3d::InitGraphicDriver (aDisplayConnection);
|
||||
}
|
||||
|
||||
return new V3d_Viewer(aGraphicDriver,aName,aDomain,ViewSize,ViewProj,
|
||||
Quantity_NOC_GRAY30,V3d_ZBUFFER,V3d_GOURAUD,V3d_WAIT,
|
||||
ComputedMode,aDefaultComputedMode,V3d_TEX_NONE);
|
||||
}
|
||||
|
||||
DocumentCommon::DocumentCommon( const int theIndex, ApplicationCommonWindow* app )
|
||||
|
@@ -16,11 +16,13 @@
|
||||
|
||||
#include <Visual3d_View.hxx>
|
||||
#include <Graphic3d_ExportFormat.hxx>
|
||||
#include <Graphic3d_GraphicDriver.hxx>
|
||||
#include <QWindowsStyle>
|
||||
|
||||
#ifdef WNT
|
||||
#if defined(_WIN32) || defined(__WIN32__)
|
||||
#include <WNT_Window.hxx>
|
||||
#include <Graphic3d_WNTGraphicDevice.hxx>
|
||||
#elif defined(__APPLE__) && !defined(MACOSX_USE_GLX)
|
||||
#include <Cocoa_Window.hxx>
|
||||
#else
|
||||
#include <QX11Info>
|
||||
#include <GL/glx.h>
|
||||
@@ -29,10 +31,11 @@
|
||||
#include <X11/Xmu/StdCmap.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <Xw_Window.hxx>
|
||||
#include <Graphic3d_GraphicDevice.hxx>
|
||||
#include <QColormap>
|
||||
#endif
|
||||
|
||||
#include <Aspect_DisplayConnection.hxx>
|
||||
|
||||
// the key for multi selection :
|
||||
#define MULTISELECTIONKEY Qt::ShiftModifier
|
||||
|
||||
@@ -53,7 +56,7 @@ View::View( Handle(AIS_InteractiveContext) theContext, QWidget* parent )
|
||||
: QWidget( parent ),
|
||||
myViewActions( 0 )
|
||||
{
|
||||
#ifndef WNT
|
||||
#if !defined(_WIN32) && !defined(__WIN32__) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX))
|
||||
//XSynchronize( x11Display(),true ); // it is possible to use QApplication::syncX();
|
||||
XSynchronize( x11Info().display(),true ); // it is possible to use QApplication::syncX();
|
||||
#endif
|
||||
@@ -70,7 +73,7 @@ myViewActions( 0 )
|
||||
setAttribute(Qt::WA_PaintOnScreen);
|
||||
setAttribute(Qt::WA_NoSystemBackground);
|
||||
|
||||
#if !defined WNT
|
||||
#if !defined(_WIN32) && !defined(__WIN32__) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX))
|
||||
XVisualInfo* pVisualInfo;
|
||||
if ( x11Info().display() )
|
||||
{
|
||||
@@ -161,22 +164,26 @@ View::~View()
|
||||
|
||||
void View::init()
|
||||
{
|
||||
if(myView.IsNull())
|
||||
myView = myContext->CurrentViewer()->CreateView();
|
||||
int windowHandle = (int) winId();
|
||||
short hi, lo;
|
||||
lo = (short) windowHandle;
|
||||
hi = (short) (windowHandle >> 16);
|
||||
#ifdef WNT
|
||||
Handle(WNT_Window) hWnd = new WNT_Window(Handle(Graphic3d_WNTGraphicDevice)::DownCast(myContext->CurrentViewer()->Device()),(int) hi,(int) lo);
|
||||
if (myView.IsNull())
|
||||
myView = myContext->CurrentViewer()->CreateView();
|
||||
#if defined(_WIN32) || defined(__WIN32__)
|
||||
Aspect_Handle aWindowHandle = (Aspect_Handle )winId();
|
||||
Handle(WNT_Window) hWnd = new WNT_Window (aWindowHandle);
|
||||
#elif defined(__APPLE__) && !defined(MACOSX_USE_GLX)
|
||||
NSView* aViewHandle = (NSView* )winId();
|
||||
Handle(Cocoa_Window) hWnd = new Cocoa_Window (aViewHandle);
|
||||
#else
|
||||
Handle(Xw_Window) hWnd = new Xw_Window(Handle(Graphic3d_GraphicDevice)::DownCast(myContext->CurrentViewer()->Device()),(int) hi,(int) lo,Xw_WQ_SAMEQUALITY);
|
||||
Aspect_Handle aWindowHandle = (Aspect_Handle )winId();
|
||||
Handle(Aspect_DisplayConnection) aDispConnection = myContext->CurrentViewer()->Driver()->GetDisplayConnection();
|
||||
Handle(Xw_Window) hWnd = new Xw_Window (aDispConnection, aWindowHandle);
|
||||
#endif // WNT
|
||||
myView->SetWindow( hWnd );
|
||||
if ( !hWnd->IsMapped() )
|
||||
hWnd->Map();
|
||||
myView->SetBackgroundColor(Quantity_NOC_BLACK);
|
||||
myView->MustBeResized();
|
||||
myView->SetWindow (hWnd);
|
||||
if (!hWnd->IsMapped())
|
||||
{
|
||||
hWnd->Map();
|
||||
}
|
||||
myView->SetBackgroundColor (Quantity_NOC_BLACK);
|
||||
myView->MustBeResized();
|
||||
}
|
||||
|
||||
void View::paintEvent( QPaintEvent * e )
|
||||
|
@@ -1,5 +1,7 @@
|
||||
@ECHO OFF
|
||||
|
||||
call ../../../env.bat %1 %2 %3
|
||||
|
||||
IF NOT DEFINED CASROOT GOTO ERR_CASROOT
|
||||
|
||||
IF NOT EXIST "%CASROOT%\win32\bin\TKernel.dll" GOTO ERR_CASCADE
|
||||
|
@@ -30,9 +30,14 @@ unix {
|
||||
OBJECTS_DIR = ./$$UNAME/obj
|
||||
MOC_DIR = ./$$UNAME/src
|
||||
}
|
||||
INCLUDEPATH += $$QMAKE_INCDIR_X11 $$QMAKE_INCDIR_OPENGL $$QMAKE_INCDIR_THREAD
|
||||
DEFINES += LIN LININTEL OCC_CONVERT_SIGNALS HAVE_CONFIG_H HAVE_WOK_CONFIG_H QT_NO_STL
|
||||
LIBS += -L$$QMAKE_LIBDIR_X11 $$QMAKE_LIBS_X11 -L$$QMAKE_LIBDIR_OPENGL $$QMAKE_LIBS_OPENGL $$QMAKE_LIBS_THREAD
|
||||
|
||||
MACOSX_USE_GLX = $$(MACOSX_USE_GLX)
|
||||
|
||||
!macx | equals(MACOSX_USE_GLX, true): INCLUDEPATH += $$QMAKE_INCDIR_X11 $$QMAKE_INCDIR_OPENGL $$QMAKE_INCDIR_THREAD
|
||||
!macx | equals(MACOSX_USE_GLX, true): DEFINES += LIN LININTEL
|
||||
equals(MACOSX_USE_GLX, true): DEFINES += MACOSX_USE_GLX
|
||||
DEFINES += OCC_CONVERT_SIGNALS HAVE_CONFIG_H HAVE_WOK_CONFIG_H QT_NO_STL
|
||||
!macx | equals(MACOSX_USE_GLX, true): LIBS += -L$$QMAKE_LIBDIR_X11 $$QMAKE_LIBS_X11 -L$$QMAKE_LIBDIR_OPENGL $$QMAKE_LIBS_OPENGL $$QMAKE_LIBS_THREAD
|
||||
LIBS += -lfreeimageplus
|
||||
LIBS += -ltbb -ltbbmalloc
|
||||
}
|
||||
|
8
samples/qt/IESample/make.sh
Normal file → Executable file
8
samples/qt/IESample/make.sh
Normal file → Executable file
@@ -4,4 +4,10 @@ export aSamplePath="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
if [ -e "${aSamplePath}/env.sh" ]; then source "${aSamplePath}/env.sh"; fi
|
||||
cd $aSamplePath
|
||||
qmake IESample.pro
|
||||
make
|
||||
if [ "$(uname -s)" != "Darwin" ] || [ "$MACOSX_USE_GLX" == "true" ]; then
|
||||
if [ "${CASDEB}" == "d" ]; then
|
||||
make debug
|
||||
else
|
||||
make release
|
||||
fi
|
||||
fi
|
||||
|
@@ -8,7 +8,17 @@ host=`uname -s`
|
||||
STATION=$host
|
||||
|
||||
RES_DIR="${aSamplePath}/res"
|
||||
BIN_DIR="${aSamplePath}/${STATION}/bin"
|
||||
|
||||
aSystem=`uname -s`
|
||||
if [ "$aSystem" == "Darwin" ] && [ "$MACOSX_USE_GLX" != "true" ]; then
|
||||
if [ "${CASDEB}" == "d" ]; then
|
||||
BIN_DIR="${aSamplePath}/build/Debug/IESample.app/Contents/MacOS"
|
||||
else
|
||||
BIN_DIR="${aSamplePath}/build/Release/IESample.app/Contents/MacOS"
|
||||
fi
|
||||
else
|
||||
BIN_DIR="${aSamplePath}/${STATION}/bin${CASDEB}"
|
||||
fi
|
||||
|
||||
CSF_ResourcesDefaults="${RES_DIR}"
|
||||
CSF_IEResourcesDefaults="${RES_DIR}"
|
||||
@@ -19,9 +29,13 @@ export CSF_IEResourcesDefaults CSF_ResourcesDefaults
|
||||
export PATH
|
||||
|
||||
if test ! -r "${BIN_DIR}/IESample"; then
|
||||
echo "Executable \"${BIN_DIR}/IESample\" not found."
|
||||
echo "Probably you don't compile the application. Execute \"make\"."
|
||||
exit 1
|
||||
echo "Executable \"${BIN_DIR}/IESample\" not found."
|
||||
if [ "$aSystem" == "Darwin" ] && [ "$MACOSX_USE_GLX" != "true" ]; then
|
||||
echo "Probably you don't compile the application. Build it with Xcode."
|
||||
else
|
||||
echo "Probably you don't compile the application. Execute \"make\"."
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
|
||||
${BIN_DIR}/IESample
|
||||
|
@@ -32,11 +32,16 @@ unix {
|
||||
OBJECTS_DIR = ./$$UNAME/obj
|
||||
MOC_DIR = ./$$UNAME/src
|
||||
}
|
||||
INCLUDEPATH += $$QMAKE_INCDIR_X11 $$QMAKE_INCDIR_OPENGL $$QMAKE_INCDIR_THREAD
|
||||
DEFINES += LIN LININTEL OCC_CONVERT_SIGNALS HAVE_CONFIG_H HAVE_WOK_CONFIG_H
|
||||
LIBS += -L$$QMAKE_LIBDIR_X11 $$QMAKE_LIBS_X11 -L$$QMAKE_LIBDIR_OPENGL $$QMAKE_LIBS_OPENGL $$QMAKE_LIBS_THREAD
|
||||
LIBS += -lfreeimageplus
|
||||
LIBS += -ltbb -ltbbmalloc
|
||||
|
||||
MACOSX_USE_GLX = $$(MACOSX_USE_GLX)
|
||||
|
||||
!macx | equals(MACOSX_USE_GLX, true): INCLUDEPATH += $$QMAKE_INCDIR_X11 $$QMAKE_INCDIR_OPENGL $$QMAKE_INCDIR_THREAD
|
||||
!macx | equals(MACOSX_USE_GLX, true): DEFINES += LIN LININTEL
|
||||
equals(MACOSX_USE_GLX, true): DEFINES += MACOSX_USE_GLX
|
||||
DEFINES += OCC_CONVERT_SIGNALS HAVE_CONFIG_H HAVE_WOK_CONFIG_H QT_NO_STL
|
||||
!macx | equals(MACOSX_USE_GLX, true): LIBS += -L$$QMAKE_LIBDIR_X11 $$QMAKE_LIBS_X11 -L$$QMAKE_LIBDIR_OPENGL $$QMAKE_LIBS_OPENGL $$QMAKE_LIBS_THREAD
|
||||
LIBS += -lfreeimageplus
|
||||
LIBS += -ltbb -ltbbmalloc
|
||||
}
|
||||
|
||||
win32 {
|
||||
|
@@ -4,4 +4,10 @@ export aSamplePath="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
if [ -e "${aSamplePath}/env.sh" ]; then source "${aSamplePath}/env.sh"; fi
|
||||
cd $aSamplePath
|
||||
qmake Tutorial.pro
|
||||
make
|
||||
if [ "$(uname -s)" != "Darwin" ] || [ "$MACOSX_USE_GLX" == "true" ]; then
|
||||
if [ "${CASDEB}" == "d" ]; then
|
||||
make debug
|
||||
else
|
||||
make release
|
||||
fi
|
||||
fi
|
||||
|
@@ -8,7 +8,17 @@ host=`uname -s`
|
||||
STATION=$host
|
||||
|
||||
RES_DIR="${aSamplePath}/res"
|
||||
BIN_DIR="${aSamplePath}/${STATION}/bin"
|
||||
|
||||
aSystem=`uname -s`
|
||||
if [ "$aSystem" == "Darwin" ] && [ "$MACOSX_USE_GLX" != "true" ]; then
|
||||
if [ "${CASDEB}" == "d" ]; then
|
||||
BIN_DIR="${aSamplePath}/build/Debug/Tutorial.app/Contents/MacOS"
|
||||
else
|
||||
BIN_DIR="${aSamplePath}/build/Release/Tutorial.app/Contents/MacOS"
|
||||
fi
|
||||
else
|
||||
BIN_DIR="${aSamplePath}/${STATION}/bin${CASDEB}"
|
||||
fi
|
||||
|
||||
CSF_ResourcesDefaults="${RES_DIR}"
|
||||
CSF_TutorialResourcesDefaults="${RES_DIR}"
|
||||
@@ -19,9 +29,13 @@ export CSF_TutorialResourcesDefaults CSF_ResourcesDefaults
|
||||
export PATH
|
||||
|
||||
if test ! -r "${BIN_DIR}/Tutorial"; then
|
||||
echo "Executable \"${BIN_DIR}/Tutorial\" not found."
|
||||
echo "Probably you don't compile the application. Execute \"make\"."
|
||||
exit 1
|
||||
echo "Executable \"${BIN_DIR}/Tutorial\" not found."
|
||||
if [ "$aSystem" == "Darwin" ] && [ "$MACOSX_USE_GLX" != "true" ]; then
|
||||
echo "Probably you don't compile the application. Build it with Xcode."
|
||||
else
|
||||
echo "Probably you don't compile the application. Execute \"make\"."
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
|
||||
${BIN_DIR}/Tutorial
|
||||
|
@@ -8,26 +8,29 @@
|
||||
#include <QMouseEvent>
|
||||
|
||||
#include <WNT_Window.hxx>
|
||||
#include <Graphic3d_WNTGraphicDevice.hxx>
|
||||
|
||||
#include <Voxel_Prs.hxx>
|
||||
#include <AIS_ListOfInteractive.hxx>
|
||||
#include <AIS_ListIteratorOfListOfInteractive.hxx>
|
||||
#include <Aspect_DisplayConnection.hxx>
|
||||
#include <Graphic3d.hxx>
|
||||
#include <Graphic3d_GraphicDriver.hxx>
|
||||
|
||||
static Handle(Graphic3d_WNTGraphicDevice) device;
|
||||
static Handle(Graphic3d_GraphicDriver) Viewer_aGraphicDriver;
|
||||
|
||||
Viewer::Viewer(QWidget* parent):QWidget(parent)
|
||||
{
|
||||
if(device.IsNull())
|
||||
if (myGraphicDriver.IsNull())
|
||||
{
|
||||
device = new Graphic3d_WNTGraphicDevice();
|
||||
if (!device->GraphicDriver().IsNull())
|
||||
{
|
||||
myGraphicDriver = Handle(OpenGl_GraphicDriver)::DownCast(device->GraphicDriver());
|
||||
}
|
||||
if (Viewer_aGraphicDriver.IsNull())
|
||||
{
|
||||
Handle(Aspect_DisplayConnection) aDisplayConnection;
|
||||
Viewer_aGraphicDriver = Graphic3d::InitGraphicDriver (aDisplayConnection);
|
||||
}
|
||||
myGraphicDriver = Handle(OpenGl_GraphicDriver)::DownCast(Viewer_aGraphicDriver);
|
||||
}
|
||||
|
||||
Handle(V3d_Viewer) aViewer = new V3d_Viewer(device, TCollection_ExtendedString("Visu3D").ToExtString(), "",
|
||||
|
||||
Handle(V3d_Viewer) aViewer = new V3d_Viewer(myGraphicDriver, TCollection_ExtendedString("Visu3D").ToExtString(), "",
|
||||
1000, V3d_XposYnegZpos,
|
||||
Quantity_NOC_GRAY30, V3d_ZBUFFER, V3d_GOURAUD, V3d_WAIT,
|
||||
true, true, V3d_TEX_NONE);
|
||||
@@ -39,13 +42,8 @@ Viewer::Viewer(QWidget* parent):QWidget(parent)
|
||||
myIC = new AIS_InteractiveContext(aViewer);
|
||||
myIC->SetDeviationCoefficient(1.e-3);
|
||||
|
||||
int windowHandle = (int) winId();
|
||||
short hi, lo;
|
||||
|
||||
lo = (short) windowHandle;
|
||||
hi = (short) (windowHandle >> 16);
|
||||
Handle(WNT_Window) hWnd =
|
||||
new WNT_Window(Handle(Graphic3d_WNTGraphicDevice)::DownCast(aViewer->Device()), (int) hi, (int) lo);
|
||||
Aspect_Handle aWindowHandle = (Aspect_Handle )winId();
|
||||
Handle(WNT_Window) hWnd = new WNT_Window (aWindowHandle);
|
||||
|
||||
myView->SetWindow(hWnd);
|
||||
if(!hWnd->IsMapped())
|
||||
|
@@ -17,6 +17,8 @@
|
||||
|
||||
#include "VoxelClient_VisDrawer.h"
|
||||
|
||||
#include <OpenGl_GlCore11.hxx>
|
||||
|
||||
#include <ElSLib.hxx>
|
||||
#include <gp_Dir.hxx>
|
||||
#include <Geom_Plane.hxx>
|
||||
@@ -29,9 +31,7 @@
|
||||
#include <OpenGl_Element.hxx>
|
||||
#include <OpenGl_GraphicDriver.hxx>
|
||||
#include <OpenGl_NamedStatus.hxx>
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glu.h>
|
||||
#include <OpenGl_Workspace.hxx>
|
||||
|
||||
/**************************************************************************/
|
||||
|
||||
|
@@ -141,7 +141,6 @@ uses
|
||||
Geom,
|
||||
Bnd,
|
||||
Aspect,
|
||||
Graphic2d,
|
||||
Graphic3d,
|
||||
V3d,
|
||||
TopAbs,
|
||||
|
@@ -39,9 +39,7 @@ uses Shape from TopoDS,
|
||||
Line from Geom,
|
||||
Ax1 from gp,
|
||||
Projector from Prs3d,
|
||||
Transformation from Geom,
|
||||
PresentationManager2d from PrsMgr,
|
||||
GraphicObject from Graphic2d,
|
||||
Transformation from Geom,
|
||||
Plane from Geom,
|
||||
Surface from Geom,
|
||||
ExtendedString from TCollection,
|
||||
@@ -191,12 +189,6 @@ is
|
||||
aPresentation: mutable Presentation from Prs3d)
|
||||
is redefined static private;
|
||||
|
||||
Compute(me:mutable;
|
||||
aPresentationManager: PresentationManager2d from PrsMgr;
|
||||
aPresentation: mutable GraphicObject from Graphic2d;
|
||||
aMode: Integer from Standard = 0)
|
||||
is redefined static private;
|
||||
|
||||
Compute(me : mutable;
|
||||
aProjector : Projector from Prs3d;
|
||||
aTrsf : Transformation from Geom;
|
||||
|
@@ -101,7 +101,7 @@
|
||||
#include <GC_MakeConicalSurface.hxx>
|
||||
#include <gce_MakePln.hxx>
|
||||
#include <gce_MakeCone.hxx>
|
||||
#include <Graphic3d_Array1OfVertex.hxx>
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : Constructor
|
||||
@@ -472,19 +472,6 @@ void AIS_AngleDimension::Compute(const Handle(Prs3d_Projector)& aProjector,
|
||||
PrsMgr_PresentableObject::Compute( aProjector , aPresentation ) ;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Compute
|
||||
//purpose : : to avoid warning
|
||||
//=======================================================================
|
||||
|
||||
void AIS_AngleDimension::Compute(const Handle(PrsMgr_PresentationManager2d)& aPresentationManager2d,
|
||||
const Handle(Graphic2d_GraphicObject)& aGraphicObject,
|
||||
const Standard_Integer anInteger)
|
||||
{
|
||||
// Standard_NotImplemented::Raise("AIS_AngleDimension::Compute(const Handle(PrsMgr_PresentationManager2d)&,const Handle(Graphic2d_GraphicObject)&,const Standard_Integer)");
|
||||
PrsMgr_PresentableObject::Compute( aPresentationManager2d ,aGraphicObject,anInteger) ;
|
||||
}
|
||||
|
||||
void AIS_AngleDimension::Compute(const Handle_Prs3d_Projector& aProjector, const Handle_Geom_Transformation& aTransformation, const Handle_Prs3d_Presentation& aPresentation)
|
||||
{
|
||||
// Standard_NotImplemented::Raise("AIS_AngleDimension::Compute(const Handle_Prs3d_Projector&, const Handle_Geom_Transformation&, const Handle_Prs3d_Presentation&)");
|
||||
@@ -1975,19 +1962,17 @@ void AIS_AngleDimension::ComputeConeAngleSelection(const Handle(SelectMgr_Select
|
||||
|
||||
gp_Pnt AttachmentPnt;
|
||||
gp_Pnt OppositePnt;
|
||||
gp_Pnt aPnt, tmpPnt;
|
||||
Quantity_Length X,Y,Z;
|
||||
|
||||
Standard_Real param = ElCLib::Parameter(myCircle, myPosition);
|
||||
|
||||
aPnt = Apex;
|
||||
gp_Pnt aPnt = Apex;
|
||||
gp_Pnt P1 = ElCLib::Value(0., myCircle);
|
||||
gp_Pnt P2 = ElCLib::Value(M_PI, myCircle);
|
||||
|
||||
gce_MakePln mkPln(P1, P2, aPnt); // create a plane whitch defines plane for projection aPosition on it
|
||||
gce_MakePln mkPln(P1, P2, aPnt); // create a plane whitch defines plane for projection aPosition on it
|
||||
|
||||
aPnt = AIS::ProjectPointOnPlane(myPosition, mkPln.Value());
|
||||
tmpPnt = aPnt;
|
||||
aPnt = AIS::ProjectPointOnPlane(myPosition, mkPln.Value());
|
||||
gp_Pnt tmpPnt = aPnt;
|
||||
|
||||
if( aPnt.Distance(P1) < aPnt.Distance(P2) ){
|
||||
AttachmentPnt = P1;
|
||||
@@ -2015,49 +2000,30 @@ void AIS_AngleDimension::ComputeConeAngleSelection(const Handle(SelectMgr_Select
|
||||
|
||||
if( myPosition.Distance( myCircle.Location() ) <= myCircle.Radius() )
|
||||
if( 2 * myCircle.Radius() > aCircle2.Radius() * 0.4 ) IsArrowOut = Standard_False; //four times more than an arrow size
|
||||
|
||||
Graphic3d_Array1OfVertex V(1, 12);
|
||||
|
||||
Standard_Real angle;
|
||||
param = ElCLib::Parameter(aCircle2, tmpPnt);
|
||||
|
||||
if(IsArrowOut) {
|
||||
angle = OppParam - AttParam + M_PI / 6; //An angle between AttParam and OppParam + 30 degrees
|
||||
param = AttParam - M_PI / 12; //out parts of dimension line are 15 degrees
|
||||
|
||||
while ( angle > 2 * M_PI ) angle -= 2 * M_PI;
|
||||
for( i = 0; i <= 11; i++ ) { //calculating of arc
|
||||
aPnt = ElCLib::Value(param + angle/11 * i, aCircle2);
|
||||
aPnt.Coord(X, Y, Z);
|
||||
V(i+1).SetCoord(X, Y, Z);
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
angle = OppParam - AttParam;
|
||||
param = AttParam;
|
||||
while ( angle > 2 * M_PI ) angle -= 2 * M_PI;
|
||||
for( i = 0; i <= 11; i++ ) { //calculating of arc
|
||||
aPnt = ElCLib::Value(param + angle/11 * i, aCircle2);
|
||||
aPnt.Coord(X, Y, Z);
|
||||
V(i+1).SetCoord(X, Y, Z);
|
||||
}
|
||||
}
|
||||
|
||||
for(i = 1; i<=11; i++) {
|
||||
param = AttParam;
|
||||
Standard_Real angle = OppParam - AttParam;
|
||||
|
||||
V(i).Coord(X, Y, Z);
|
||||
P1.SetCoord(X, Y, Z);
|
||||
V(i+1).Coord(X, Y, Z);
|
||||
P1.SetCoord(X, Y, Z);
|
||||
|
||||
seg = new Select3D_SensitiveSegment(owner, P1, P2);
|
||||
aSelection->Add(seg);
|
||||
if(IsArrowOut)
|
||||
{
|
||||
angle += M_PI / 6; //An angle between AttParam and OppParam + 30 degrees
|
||||
param -= M_PI / 12; //out parts of dimension line are 15 degrees
|
||||
}
|
||||
|
||||
tmpPnt = tmpPnt.Translated(gp_Vec(0, 0, -1)*2);
|
||||
while ( angle > 2. * M_PI ) angle -= 2. * M_PI;
|
||||
|
||||
Standard_Real size(Min(myVal/100.+1.e-6,myArrowSize+1.e-6));
|
||||
gp_Pnt Vprev = ElCLib::Value(param, aCircle2);
|
||||
for( i = 1; i <= 11; i++ ) //calculating of arc
|
||||
{
|
||||
gp_Pnt Vcur = ElCLib::Value(param + angle/11 * i, aCircle2);
|
||||
seg = new Select3D_SensitiveSegment(owner, Vprev, Vcur);
|
||||
aSelection->Add(seg);
|
||||
Vprev = Vcur;
|
||||
}
|
||||
|
||||
tmpPnt = tmpPnt.Translated(gp_Vec(0, 0, -2));
|
||||
|
||||
const Standard_Real size(Min(myVal/100.+1.e-6,myArrowSize+1.e-6));
|
||||
Handle( Select3D_SensitiveBox ) box = new Select3D_SensitiveBox( owner,
|
||||
tmpPnt.X(),
|
||||
tmpPnt.Y(),
|
||||
@@ -2067,6 +2033,3 @@ void AIS_AngleDimension::ComputeConeAngleSelection(const Handle(SelectMgr_Select
|
||||
tmpPnt.Z() + size);
|
||||
aSelection->Add(box);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@@ -39,8 +39,6 @@ uses
|
||||
Selection from SelectMgr,
|
||||
Projector from Prs3d,
|
||||
Transformation from Geom,
|
||||
PresentationManager2d from PrsMgr,
|
||||
GraphicObject from Graphic2d,
|
||||
Pnt from gp,
|
||||
Dir from gp,
|
||||
LineAspect from Prs3d,
|
||||
@@ -134,13 +132,7 @@ is
|
||||
Compute(me:mutable;
|
||||
aProjector: Projector from Prs3d;
|
||||
aPresentation: mutable Presentation from Prs3d)
|
||||
is redefined static private;
|
||||
|
||||
Compute(me:mutable;
|
||||
aPresentationManager: PresentationManager2d from PrsMgr;
|
||||
aPresentation: mutable GraphicObject from Graphic2d;
|
||||
aMode: Integer from Standard = 0)
|
||||
is redefined static private;
|
||||
is redefined static private;
|
||||
|
||||
Compute(me : mutable;
|
||||
aProjector : Projector from Prs3d;
|
||||
|
@@ -19,15 +19,13 @@
|
||||
// and conditions governing the rights and limitations under the License.
|
||||
|
||||
|
||||
#define GER61351 //GG_171199 Enable to set an object RGB color
|
||||
// instead a restricted object NameOfColor.
|
||||
//GER61351 //GG_171199 Enable to set an object RGB color instead a restricted object NameOfColor.
|
||||
|
||||
#include <AIS_Axis.ixx>
|
||||
#include <Aspect_TypeOfLine.hxx>
|
||||
#include <Prs3d_Drawer.hxx>
|
||||
#include <Prs3d_LineAspect.hxx>
|
||||
#include <Prs3d_DatumAspect.hxx>
|
||||
#include <Graphic3d_ArrayOfPrimitives.hxx>
|
||||
#include <Graphic3d_AspectLine3d.hxx>
|
||||
#include <Graphic3d_Structure.hxx>
|
||||
#include <TColgp_Array1OfPnt.hxx>
|
||||
@@ -177,10 +175,7 @@ void AIS_Axis::Compute(const Handle(PrsMgr_PresentationManager3d)&,
|
||||
aPresentation->SetDisplayPriority(5);
|
||||
if (!myIsXYZAxis ){
|
||||
GeomAdaptor_Curve curv(myComponent);
|
||||
Standard_Boolean isPrimitiveArraysEnabled = Graphic3d_ArrayOfPrimitives::IsEnable();
|
||||
if(isPrimitiveArraysEnabled) Graphic3d_ArrayOfPrimitives::Disable();
|
||||
StdPrs_Curve::Add(aPresentation,curv,myDrawer);
|
||||
if(isPrimitiveArraysEnabled) Graphic3d_ArrayOfPrimitives::Enable();
|
||||
}
|
||||
else {
|
||||
DsgPrs_XYZAxisPresentation::Add(aPresentation,myLineAspect,myDir,myVal,myText,myPfirst,myPlast);
|
||||
@@ -217,13 +212,11 @@ void AIS_Axis::ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,
|
||||
|
||||
|
||||
void AIS_Axis::SetColor(const Quantity_NameOfColor aCol)
|
||||
#ifdef GER61351
|
||||
{
|
||||
SetColor(Quantity_Color(aCol));
|
||||
}
|
||||
|
||||
void AIS_Axis::SetColor(const Quantity_Color &aCol)
|
||||
#endif
|
||||
{
|
||||
hasOwnColor=Standard_True;
|
||||
myOwnColor=aCol;
|
||||
@@ -255,16 +248,6 @@ void AIS_Axis::SetWidth(const Standard_Real aValue)
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : Compute
|
||||
//purpose : to avoid warning
|
||||
//=======================================================================
|
||||
void AIS_Axis::Compute(const Handle(PrsMgr_PresentationManager2d)&,
|
||||
const Handle(Graphic2d_GraphicObject)&,
|
||||
const Standard_Integer)
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Compute
|
||||
//purpose : to avoid warning
|
||||
|
@@ -39,8 +39,6 @@ uses
|
||||
Dir from gp,
|
||||
Projector from Prs3d,
|
||||
Transformation from Geom,
|
||||
PresentationManager2d from PrsMgr,
|
||||
GraphicObject from Graphic2d,
|
||||
ExtendedString from TCollection,
|
||||
ArrowSide from DsgPrs,
|
||||
KindOfDimension from AIS
|
||||
@@ -94,12 +92,6 @@ is
|
||||
aPresentation: mutable Presentation from Prs3d)
|
||||
is redefined static private;
|
||||
|
||||
Compute(me:mutable;
|
||||
aPresentationManager: PresentationManager2d from PrsMgr;
|
||||
aPresentation: mutable GraphicObject from Graphic2d;
|
||||
aMode: Integer from Standard = 0)
|
||||
is redefined static private;
|
||||
|
||||
Compute(me : mutable;
|
||||
aProjector : Projector from Prs3d;
|
||||
aTrsf : Transformation from Geom;
|
||||
|
@@ -242,19 +242,6 @@ void AIS_Chamf2dDimension::Compute(const Handle(Prs3d_Projector)& aProjector,
|
||||
PrsMgr_PresentableObject::Compute( aProjector , aPresentation ) ;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Compute
|
||||
//purpose : to avoid warning
|
||||
//=======================================================================
|
||||
|
||||
void AIS_Chamf2dDimension::Compute(const Handle(PrsMgr_PresentationManager2d)& aPresentationManager2d,
|
||||
const Handle(Graphic2d_GraphicObject)& aGraphicObject,
|
||||
const Standard_Integer anInteger)
|
||||
{
|
||||
// Standard_NotImplemented::Raise("AIS_Chamf2dDimension::Compute(const Handle(PrsMgr_PresentationManager2d)&,const Handle(Graphic2d_GraphicObject)&,const Standard_Integer)");
|
||||
PrsMgr_PresentableObject::Compute( aPresentationManager2d ,aGraphicObject,anInteger) ;
|
||||
}
|
||||
|
||||
void AIS_Chamf2dDimension::Compute(const Handle_Prs3d_Projector& aProjector, const Handle_Geom_Transformation& aTransformation, const Handle_Prs3d_Presentation& aPresentation)
|
||||
{
|
||||
// Standard_NotImplemented::Raise("AIS_Chamf2dDimension::Compute(const Handle_Prs3d_Projector&, const Handle_Geom_Transformation&, const Handle_Prs3d_Presentation&)");
|
||||
|
@@ -38,8 +38,6 @@ uses
|
||||
Dir from gp,
|
||||
Projector from Prs3d,
|
||||
Transformation from Geom,
|
||||
PresentationManager2d from PrsMgr,
|
||||
GraphicObject from Graphic2d,
|
||||
ExtendedString from TCollection,
|
||||
ArrowSide from DsgPrs,
|
||||
KindOfDimension from AIS
|
||||
@@ -90,11 +88,6 @@ is
|
||||
aPresentation: mutable Presentation from Prs3d)
|
||||
is redefined static private;
|
||||
|
||||
Compute(me:mutable;
|
||||
aPresentationManager: PresentationManager2d from PrsMgr;
|
||||
aPresentation: mutable GraphicObject from Graphic2d;
|
||||
aMode: Integer from Standard = 0)
|
||||
is redefined static private;
|
||||
Compute(me : mutable;
|
||||
aProjector : Projector from Prs3d;
|
||||
aTrsf : Transformation from Geom;
|
||||
|
@@ -217,19 +217,6 @@ void AIS_Chamf3dDimension::Compute(const Handle(Prs3d_Projector)& aProjector,
|
||||
PrsMgr_PresentableObject::Compute( aProjector , aPresentation ) ;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Compute
|
||||
//purpose : to avoid warning
|
||||
//=======================================================================
|
||||
|
||||
void AIS_Chamf3dDimension::Compute(const Handle(PrsMgr_PresentationManager2d)& aPresentationManager2d,
|
||||
const Handle(Graphic2d_GraphicObject)& aGraphicObject,
|
||||
const Standard_Integer anInteger)
|
||||
{
|
||||
// Standard_NotImplemented::Raise("AIS_Chamf3dDimension::Compute(const Handle(PrsMgr_PresentationManager2d)&,const Handle(Graphic2d_GraphicObject)&,const Standard_Integer)");
|
||||
PrsMgr_PresentableObject::Compute( aPresentationManager2d ,aGraphicObject,anInteger) ;
|
||||
}
|
||||
|
||||
void AIS_Chamf3dDimension::Compute(const Handle_Prs3d_Projector& aProjector, const Handle_Geom_Transformation& aTransformation, const Handle_Prs3d_Presentation& aPresentation)
|
||||
{
|
||||
// Standard_NotImplemented::Raise("AIS_Chamf3dDimension::Compute(const Handle_Prs3d_Projector&, const Handle_Geom_Transformation&, const Handle_Prs3d_Presentation&)");
|
||||
|
@@ -36,8 +36,6 @@ uses
|
||||
Selection from SelectMgr,
|
||||
Projector from Prs3d,
|
||||
Transformation from Geom,
|
||||
PresentationManager2d from PrsMgr,
|
||||
GraphicObject from Graphic2d,
|
||||
Line from AIS,
|
||||
KindOfInteractive from AIS
|
||||
|
||||
@@ -68,12 +66,6 @@ is
|
||||
aPresentation: mutable Presentation from Prs3d)
|
||||
is redefined static private;
|
||||
|
||||
Compute(me:mutable;
|
||||
aPresentationManager: PresentationManager2d from PrsMgr;
|
||||
aPresentation: mutable GraphicObject from Graphic2d;
|
||||
aMode: Integer from Standard = 0)
|
||||
is redefined static private;
|
||||
|
||||
Compute(me : mutable;
|
||||
aProjector : Projector from Prs3d;
|
||||
aTrsf : Transformation from Geom;
|
||||
|
@@ -19,14 +19,12 @@
|
||||
// and conditions governing the rights and limitations under the License.
|
||||
|
||||
|
||||
#define GER61351 //GG_171199 Enable to set an object RGB color
|
||||
// instead a restricted object NameOfColor.
|
||||
//GER61351 //GG_171199 Enable to set an object RGB color instead a restricted object NameOfColor.
|
||||
|
||||
#include <AIS_Circle.ixx>
|
||||
#include <Aspect_TypeOfLine.hxx>
|
||||
#include <Prs3d_Drawer.hxx>
|
||||
#include <Prs3d_LineAspect.hxx>
|
||||
#include <Graphic3d_ArrayOfPrimitives.hxx>
|
||||
#include <Graphic3d_AspectLine3d.hxx>
|
||||
#include <Graphic3d_Structure.hxx>
|
||||
#include <TColgp_Array1OfPnt.hxx>
|
||||
@@ -122,7 +120,6 @@ void AIS_Circle::ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,
|
||||
//=======================================================================
|
||||
|
||||
void AIS_Circle::SetColor(const Quantity_NameOfColor aCol)
|
||||
#ifdef GER61351
|
||||
{
|
||||
SetColor(Quantity_Color(aCol));
|
||||
}
|
||||
@@ -133,7 +130,6 @@ void AIS_Circle::SetColor(const Quantity_NameOfColor aCol)
|
||||
//=======================================================================
|
||||
|
||||
void AIS_Circle::SetColor(const Quantity_Color &aCol)
|
||||
#endif
|
||||
{
|
||||
hasOwnColor=Standard_True;
|
||||
myOwnColor=aCol;
|
||||
@@ -157,17 +153,10 @@ void AIS_Circle::SetWidth(const Standard_Real aValue)
|
||||
{
|
||||
myOwnWidth=aValue;
|
||||
|
||||
#ifndef GER61351
|
||||
Quantity_NameOfColor CC =
|
||||
HasColor() ? myOwnColor : AIS_GraphicTool::GetLineColor(myDrawer->Link(),AIS_TOA_Line);
|
||||
#endif
|
||||
|
||||
if (!myDrawer->HasLineAspect ()) {
|
||||
#ifdef GER61351
|
||||
Quantity_Color CC;
|
||||
if( HasColor() ) CC = myOwnColor;
|
||||
else AIS_GraphicTool::GetLineColor(myDrawer->Link(),AIS_TOA_Line,CC);
|
||||
#endif
|
||||
myDrawer->SetLineAspect (new Prs3d_LineAspect(CC,Aspect_TOL_SOLID,aValue));
|
||||
} else
|
||||
myDrawer->LineAspect()->SetWidth(aValue);
|
||||
@@ -186,17 +175,12 @@ void AIS_Circle::UnsetColor()
|
||||
|
||||
if (!HasWidth()) myDrawer->SetLineAspect(NullAsp);
|
||||
else{
|
||||
#ifdef GER61351
|
||||
Quantity_Color CC;
|
||||
if( HasColor() ) CC = myOwnColor;
|
||||
else AIS_GraphicTool::GetLineColor(myDrawer->Link(),AIS_TOA_Line,CC);
|
||||
#else
|
||||
Quantity_NameOfColor CC =
|
||||
#endif
|
||||
AIS_GraphicTool::GetLineColor(myDrawer->Link(),AIS_TOA_Line);
|
||||
Quantity_Color CC;
|
||||
if( HasColor() ) CC = myOwnColor;
|
||||
else AIS_GraphicTool::GetLineColor(myDrawer->Link(),AIS_TOA_Line,CC);
|
||||
myDrawer->LineAspect()->SetColor(CC);
|
||||
myOwnColor = CC;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@@ -225,10 +209,7 @@ void AIS_Circle::ComputeCircle( const Handle(Prs3d_Presentation)& aPresentation)
|
||||
GeomAdaptor_Curve curv(myComponent);
|
||||
Standard_Real prevdev = myDrawer->DeviationCoefficient();
|
||||
myDrawer->SetDeviationCoefficient(1.e-5);
|
||||
Standard_Boolean isPrimitiveArraysEnabled = Graphic3d_ArrayOfPrimitives::IsEnable();
|
||||
if(isPrimitiveArraysEnabled) Graphic3d_ArrayOfPrimitives::Disable();
|
||||
StdPrs_DeflectionCurve::Add(aPresentation,curv,myDrawer);
|
||||
if(isPrimitiveArraysEnabled) Graphic3d_ArrayOfPrimitives::Enable();
|
||||
myDrawer->SetDeviationCoefficient(prevdev);
|
||||
|
||||
}
|
||||
@@ -240,16 +221,11 @@ void AIS_Circle::ComputeCircle( const Handle(Prs3d_Presentation)& aPresentation)
|
||||
//=======================================================================
|
||||
void AIS_Circle::ComputeArc( const Handle(Prs3d_Presentation)& aPresentation)
|
||||
{
|
||||
|
||||
GeomAdaptor_Curve curv(myComponent,myUStart,myUEnd);
|
||||
Standard_Real prevdev = myDrawer->DeviationCoefficient();
|
||||
myDrawer->SetDeviationCoefficient(1.e-5);
|
||||
Standard_Boolean isPrimitiveArraysEnabled = Graphic3d_ArrayOfPrimitives::IsEnable();
|
||||
if(isPrimitiveArraysEnabled) Graphic3d_ArrayOfPrimitives::Disable();
|
||||
StdPrs_DeflectionCurve::Add(aPresentation,curv,myDrawer);
|
||||
if(isPrimitiveArraysEnabled) Graphic3d_ArrayOfPrimitives::Enable();
|
||||
myDrawer->SetDeviationCoefficient(prevdev);
|
||||
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@@ -278,15 +254,6 @@ void AIS_Circle::ComputeArcSelection(const Handle(SelectMgr_Selection)& aSelecti
|
||||
myComponent,myUStart,myUEnd);
|
||||
aSelection->Add(seg);
|
||||
}
|
||||
//=======================================================================
|
||||
//function : Compute
|
||||
//purpose : to avoid warning
|
||||
//=======================================================================
|
||||
void AIS_Circle::Compute(const Handle(PrsMgr_PresentationManager2d)&,
|
||||
const Handle(Graphic2d_GraphicObject)&,
|
||||
const Standard_Integer)
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Compute
|
||||
|
@@ -40,8 +40,6 @@ uses
|
||||
Dir from gp,
|
||||
Projector from Prs3d,
|
||||
Transformation from Geom,
|
||||
PresentationManager2d from PrsMgr,
|
||||
GraphicObject from Graphic2d ,
|
||||
Plane from Geom
|
||||
|
||||
is
|
||||
@@ -68,12 +66,6 @@ is
|
||||
aProjector: Projector from Prs3d;
|
||||
aPresentation: mutable Presentation from Prs3d)
|
||||
is redefined static private;
|
||||
|
||||
Compute(me:mutable;
|
||||
aPresentationManager: PresentationManager2d from PrsMgr;
|
||||
aPresentation: mutable GraphicObject from Graphic2d;
|
||||
aMode: Integer from Standard = 0)
|
||||
is redefined static private;
|
||||
|
||||
Compute(me : mutable;
|
||||
aProjector : Projector from Prs3d;
|
||||
|
@@ -238,17 +238,6 @@ void AIS_ConcentricRelation::Compute(const Handle(Prs3d_Projector)&,
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Compute
|
||||
//purpose : to avoid warning
|
||||
//=======================================================================
|
||||
|
||||
void AIS_ConcentricRelation::Compute(const Handle(PrsMgr_PresentationManager2d)&,
|
||||
const Handle(Graphic2d_GraphicObject)&,
|
||||
const Standard_Integer)
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : ComputeSelection
|
||||
//purpose :
|
||||
|
@@ -49,8 +49,6 @@ uses
|
||||
Location from TopLoc,
|
||||
Transformation from Geom,
|
||||
PresentationManager3d from PrsMgr,
|
||||
GraphicObject from Graphic2d,
|
||||
PresentationManager2d from PrsMgr,
|
||||
Presentation from Prs3d,
|
||||
TypeOfPresentation3d from PrsMgr,
|
||||
Selection from SelectMgr,
|
||||
@@ -145,18 +143,6 @@ is
|
||||
aProjector: Projector from Prs3d;
|
||||
aPresentation: mutable Presentation from Prs3d)
|
||||
is redefined;
|
||||
|
||||
Compute(me:mutable;
|
||||
aPresentationManager: PresentationManager2d from PrsMgr;
|
||||
aPresentation: mutable GraphicObject from Graphic2d;
|
||||
aMode: Integer from Standard = 0)
|
||||
---Level: Internal
|
||||
---Purpose: this method should fill the presentation according to the
|
||||
-- enumerated mode of the application and to the display parameter
|
||||
-- of the application.
|
||||
|
||||
raises NotImplemented from Standard
|
||||
is redefined;
|
||||
|
||||
ComputeSelection(me:mutable; aSelection :mutable Selection from SelectMgr;
|
||||
aMode : Integer) is redefined virtual private;
|
||||
|
@@ -152,12 +152,6 @@ void AIS_ConnectedInteractive::Compute(const Handle_Prs3d_Projector& aProjector,
|
||||
PrsMgr_PresentableObject::Compute( aProjector , aPresentation ) ;
|
||||
}
|
||||
|
||||
void AIS_ConnectedInteractive::Compute(const Handle_PrsMgr_PresentationManager2d& aPresentationManager2d, const Handle_Graphic2d_GraphicObject& aGraphicObject, const int anInteger)
|
||||
{
|
||||
// Standard_NotImplemented::Raise("AIS_ConnectedInteractive::Compute(const Handle_PrsMgr_PresentationManager2d&, const Handle_Graphic2d_GraphicObject&, const int)");
|
||||
PrsMgr_PresentableObject::Compute( aPresentationManager2d ,aGraphicObject,anInteger) ;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : ComputeSelection
|
||||
//purpose :
|
||||
|
@@ -42,9 +42,7 @@ uses
|
||||
Integer from Standard,
|
||||
Shape from AIS,
|
||||
TypeOfPresentation3d from PrsMgr,
|
||||
GraphicObject from Graphic2d,
|
||||
PresentationManager3d from PrsMgr,
|
||||
PresentationManager2d from PrsMgr,
|
||||
InteractiveObject from AIS,
|
||||
KindOfInteractive from AIS,
|
||||
Location from TopLoc,
|
||||
@@ -113,17 +111,6 @@ is
|
||||
aPresentation : mutable Presentation from Prs3d)
|
||||
is redefined virtual private;
|
||||
|
||||
Compute(me:mutable;
|
||||
aPresentationManager: PresentationManager2d from PrsMgr;
|
||||
aPresentation: mutable GraphicObject from Graphic2d;
|
||||
aMode: Integer from Standard = 0)
|
||||
raises NotImplemented from Standard
|
||||
is redefined;
|
||||
---Level: Internal
|
||||
---Purpose: this method should fill the presentation according to the
|
||||
-- enumerated mode of the application and to the display parameter
|
||||
-- of the application.
|
||||
|
||||
ComputeSelection(me:mutable; aSelection :mutable Selection from SelectMgr;
|
||||
aMode : Integer from Standard)
|
||||
is redefined virtual private;
|
||||
|
@@ -166,19 +166,6 @@ void AIS_ConnectedShape::Compute(const Handle(Prs3d_Projector)& aProjector,
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Compute
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void AIS_ConnectedShape::Compute(const Handle_PrsMgr_PresentationManager2d& aPresentationManager2d,
|
||||
const Handle_Graphic2d_GraphicObject& aGraphicObject,
|
||||
const int anInteger)
|
||||
{
|
||||
// Standard_NotImplemented::Raise("AIS_ConnectedShape::Compute(const Handle_PrsMgr_PresentationManager2d&, const Handle_Graphic2d_GraphicObject&, const int)");
|
||||
AIS_ConnectedInteractive::Compute( aPresentationManager2d ,aGraphicObject,anInteger) ;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : ComputeSelection
|
||||
//purpose : Attention fragile...
|
||||
|
@@ -46,9 +46,7 @@ uses
|
||||
PresentationManager3d from PrsMgr,
|
||||
Selection from SelectMgr,
|
||||
Projector from Prs3d,
|
||||
Transformation from Geom,
|
||||
PresentationManager2d from PrsMgr,
|
||||
GraphicObject from Graphic2d,
|
||||
Transformation from Geom,
|
||||
ExtendedString from TCollection,
|
||||
ArrowSide from DsgPrs,
|
||||
KindOfSurface from AIS,
|
||||
@@ -126,12 +124,6 @@ is
|
||||
aProjector: Projector from Prs3d;
|
||||
aPresentation: mutable Presentation from Prs3d)
|
||||
is redefined static private;
|
||||
|
||||
Compute(me:mutable;
|
||||
aPresentationManager: PresentationManager2d from PrsMgr;
|
||||
aPresentation: mutable GraphicObject from Graphic2d;
|
||||
aMode: Integer from Standard = 0)
|
||||
is redefined static private;
|
||||
|
||||
Compute(me : mutable;
|
||||
aProjector : Projector from Prs3d;
|
||||
|
@@ -168,19 +168,6 @@ void AIS_DiameterDimension::Compute(const Handle(Prs3d_Projector)& aProjector,
|
||||
PrsMgr_PresentableObject::Compute( aProjector , aPresentation ) ;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Compute
|
||||
//purpose : to avoid warning
|
||||
//=======================================================================
|
||||
|
||||
void AIS_DiameterDimension::Compute(const Handle(PrsMgr_PresentationManager2d)& aPresentationManager,
|
||||
const Handle(Graphic2d_GraphicObject)& aPresentation,
|
||||
const Standard_Integer aMode)
|
||||
{
|
||||
// Standard_NotImplemented::Raise("AIS_DiameterDimension::Compute(const Handle(PrsMgr_PresentationManager2d)& aPresentationManager, const Handle(Graphic2d_GraphicObject)& aPresentation, const Standard_Integer aMode)");
|
||||
PrsMgr_PresentableObject::Compute( aPresentationManager ,aPresentation,aMode) ;
|
||||
}
|
||||
|
||||
void AIS_DiameterDimension::Compute(const Handle_Prs3d_Projector& aProjector, const Handle_Geom_Transformation& aTransformation, const Handle_Prs3d_Presentation& aPresentation)
|
||||
{
|
||||
// Standard_NotImplemented::Raise("AIS_DiameterDimension::Compute(const Handle_Prs3d_Projector&, const Handle_Geom_Transformation&, const Handle_Prs3d_Presentation&)");
|
||||
|
@@ -35,8 +35,6 @@ uses
|
||||
Presentation from Prs3d,
|
||||
Projector from Prs3d,
|
||||
Transformation from Geom,
|
||||
PresentationManager2d from PrsMgr,
|
||||
GraphicObject from Graphic2d,
|
||||
Selection from SelectMgr,
|
||||
Pnt from gp,
|
||||
Drawer from AIS,
|
||||
@@ -102,13 +100,7 @@ is
|
||||
Compute( me : mutable;
|
||||
aProjector : Projector from Prs3d;
|
||||
aPresentation : mutable Presentation from Prs3d )
|
||||
is redefined static private;
|
||||
|
||||
Compute( me : mutable;
|
||||
aPresentationManager : PresentationManager2d from PrsMgr;
|
||||
aPresentation : mutable GraphicObject from Graphic2d;
|
||||
aMode : Integer from Standard = 0 )
|
||||
is redefined static private;
|
||||
is redefined static private;
|
||||
|
||||
Compute(me : mutable;
|
||||
aProjector : Projector from Prs3d;
|
||||
|
@@ -221,21 +221,6 @@ void AIS_EqualDistanceRelation::Compute( const Handle( Prs3d_Projector )& aProje
|
||||
// PrsMgr_PresentableObject::Compute( aProjector , aPresentation ) ;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : Compute
|
||||
//purpose : to avoid warning at compilation (SUN)
|
||||
//=======================================================================
|
||||
|
||||
void AIS_EqualDistanceRelation::Compute( const Handle( PrsMgr_PresentationManager2d )& aPresentationManager2d,
|
||||
const Handle( Graphic2d_GraphicObject )& aGraphicObject,
|
||||
const Standard_Integer anInteger)
|
||||
{
|
||||
// Standard_NotImplemented::Raise("AIS_EqualDistanceRelation::Compute( const Handle( PrsMgr_PresentationManager2d )&,
|
||||
// const Handle( Graphic2d_GraphicObject )&,const Standard_Integer )");
|
||||
// PrsMgr_PresentableObject::Compute( aPresentationManager2d ,aGraphicObject,anInteger) ;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Compute
|
||||
//purpose : to avoid warning at compilation (SUN)
|
||||
|
@@ -31,8 +31,6 @@ uses
|
||||
Presentation from Prs3d,
|
||||
Projector from Prs3d,
|
||||
Transformation from Geom,
|
||||
PresentationManager2d from PrsMgr,
|
||||
GraphicObject from Graphic2d,
|
||||
Selection from SelectMgr,
|
||||
Pnt from gp
|
||||
|
||||
@@ -56,13 +54,7 @@ is
|
||||
Compute( me : mutable;
|
||||
aProjector : Projector from Prs3d;
|
||||
aPresentation : mutable Presentation from Prs3d )
|
||||
is redefined static private;
|
||||
|
||||
Compute( me : mutable;
|
||||
aPresentationManager : PresentationManager2d from PrsMgr;
|
||||
aPresentation : mutable GraphicObject from Graphic2d;
|
||||
aMode : Integer from Standard = 0 )
|
||||
is redefined static private;
|
||||
is redefined static private;
|
||||
|
||||
Compute(me : mutable;
|
||||
aProjector : Projector from Prs3d;
|
||||
|
@@ -164,19 +164,6 @@ void AIS_EqualRadiusRelation::Compute( const Handle( Prs3d_Projector )& /*aProje
|
||||
// PrsMgr_PresentableObject::Compute( aProjector , aPresentation ) ;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Compute
|
||||
//purpose : to avoid warning at compilation (SUN)
|
||||
//=======================================================================
|
||||
|
||||
void AIS_EqualRadiusRelation::Compute( const Handle( PrsMgr_PresentationManager2d )& /*aPresentationManager2d*/,
|
||||
const Handle( Graphic2d_GraphicObject )& /*aGraphicObject*/,
|
||||
const Standard_Integer /*anInteger*/)
|
||||
{
|
||||
// Standard_NotImplemented::Raise("AIS_EqualRadiusRelation::Compute( const Handle( PrsMgr_PresentationManager2d )&,const Handle( Graphic2d_GraphicObject )&,const Standard_Integer )");
|
||||
// PrsMgr_PresentableObject::Compute( aPresentationManager2d ,aGraphicObject,anInteger) ;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Compute
|
||||
//purpose :
|
||||
|
@@ -45,8 +45,6 @@ uses
|
||||
Pnt from gp,
|
||||
Projector from Prs3d,
|
||||
Transformation from Geom,
|
||||
PresentationManager2d from PrsMgr,
|
||||
GraphicObject from Graphic2d,
|
||||
Plane from Geom
|
||||
|
||||
is
|
||||
@@ -109,14 +107,8 @@ is
|
||||
Compute(me:mutable;
|
||||
aProjector: Projector from Prs3d;
|
||||
aPresentation: mutable Presentation from Prs3d)
|
||||
is redefined static private;
|
||||
|
||||
Compute(me:mutable;
|
||||
aPresentationManager: PresentationManager2d from PrsMgr;
|
||||
aPresentation: mutable GraphicObject from Graphic2d;
|
||||
aMode: Integer from Standard = 0)
|
||||
is redefined static private;
|
||||
|
||||
|
||||
Compute(me : mutable;
|
||||
aProjector : Projector from Prs3d;
|
||||
aTrsf : Transformation from Geom;
|
||||
|
@@ -235,19 +235,6 @@ void AIS_FixRelation::Compute(const Handle(Prs3d_Projector)& aProjector,
|
||||
PrsMgr_PresentableObject::Compute( aProjector , aPresentation ) ;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Compute
|
||||
//purpose : to avoid warning
|
||||
//=======================================================================
|
||||
|
||||
void AIS_FixRelation::Compute(const Handle(PrsMgr_PresentationManager2d)& aPresentationManager2d,
|
||||
const Handle(Graphic2d_GraphicObject)& aGraphicObject,
|
||||
const Standard_Integer anInteger)
|
||||
{
|
||||
// Standard_NotImplemented::Raise("AIS_FixRelation::Compute(const Handle(PrsMgr_PresentationManager2d)&,const Handle(Graphic2d_GraphicObject)&,const Standard_Integer)");
|
||||
PrsMgr_PresentableObject::Compute( aPresentationManager2d ,aGraphicObject,anInteger) ;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Compute
|
||||
//purpose :
|
||||
|
@@ -19,8 +19,7 @@
|
||||
// and conditions governing the rights and limitations under the License.
|
||||
|
||||
|
||||
#define GER61351 //GG_171199 Enable to get an object RGB color
|
||||
// instead a restricted object NameOfColor.
|
||||
//GER61351 //GG_171199 Enable to get an object RGB color instead a restricted object NameOfColor.
|
||||
|
||||
|
||||
|
||||
@@ -92,7 +91,6 @@ static Handle(Prs3d_LineAspect) GetLineAspect(const Handle(Prs3d_Drawer)& Dr,
|
||||
}
|
||||
|
||||
Quantity_NameOfColor AIS_GraphicTool::GetLineColor (const Handle(Prs3d_Drawer)& Dr, const AIS_TypeOfAttribute Att)
|
||||
#ifdef GER61351
|
||||
{
|
||||
Quantity_Color color;
|
||||
GetLineColor(Dr,Att,color);
|
||||
@@ -100,20 +98,10 @@ Quantity_NameOfColor AIS_GraphicTool::GetLineColor (const Handle(Prs3d_Drawer)&
|
||||
}
|
||||
|
||||
void AIS_GraphicTool::GetLineColor (const Handle(Prs3d_Drawer)& Dr, const AIS_TypeOfAttribute Att, Quantity_Color &aColor)
|
||||
#endif
|
||||
{
|
||||
Standard_Real W;
|
||||
Aspect_TypeOfLine TYP;
|
||||
|
||||
Handle(Prs3d_LineAspect) LA = GetLineAspect(Dr,Att);
|
||||
|
||||
#ifdef GER61351
|
||||
LA->Aspect()->Values(aColor,TYP,W);
|
||||
#else
|
||||
Quantity_Color QCol;
|
||||
LA->Aspect()->Values(QCol,TYP,W);
|
||||
return QCol.Name();
|
||||
#endif
|
||||
GetLineAspect(Dr,Att)->Aspect()->Values(aColor,TYP,W);
|
||||
}
|
||||
|
||||
Standard_Real AIS_GraphicTool::GetLineWidth (const Handle(Prs3d_Drawer)& Dr,
|
||||
@@ -159,7 +147,6 @@ void AIS_GraphicTool::GetLineAtt(const Handle(Prs3d_Drawer)& Dr,
|
||||
}
|
||||
|
||||
Quantity_NameOfColor AIS_GraphicTool::GetInteriorColor(const Handle(Prs3d_Drawer)& Dr)
|
||||
#ifdef GER61351
|
||||
{
|
||||
Quantity_Color color;
|
||||
GetInteriorColor(Dr,color);
|
||||
@@ -167,24 +154,16 @@ Quantity_NameOfColor AIS_GraphicTool::GetInteriorColor(const Handle(Prs3d_Drawer
|
||||
}
|
||||
|
||||
void AIS_GraphicTool::GetInteriorColor(const Handle(Prs3d_Drawer)& Dr, Quantity_Color &aColor)
|
||||
#endif
|
||||
{
|
||||
Handle(Graphic3d_AspectFillArea3d) AFA = Dr->ShadingAspect()->Aspect();
|
||||
Aspect_InteriorStyle IS;
|
||||
Aspect_TypeOfLine T;
|
||||
Standard_Real W;
|
||||
#ifdef GER61351
|
||||
Quantity_Color EC;
|
||||
AFA->Values(IS,aColor,EC,T,W);
|
||||
#else
|
||||
Quantity_Color IC,EC;
|
||||
AFA->Values(IS,IC,EC,T,W);
|
||||
return IC.Name();
|
||||
#endif
|
||||
}
|
||||
|
||||
Graphic3d_MaterialAspect AIS_GraphicTool::GetMaterial(const Handle(Prs3d_Drawer)& Dr)
|
||||
{
|
||||
return Dr->ShadingAspect()->Aspect()->BackMaterial();
|
||||
|
||||
}
|
||||
|
@@ -34,9 +34,7 @@ uses
|
||||
PresentationManager3d from PrsMgr,
|
||||
Selection from SelectMgr,
|
||||
Projector from Prs3d,
|
||||
Transformation from Geom,
|
||||
PresentationManager2d from PrsMgr,
|
||||
GraphicObject from Graphic2d,
|
||||
Transformation from Geom,
|
||||
Plane from Geom,
|
||||
Curve from Geom,
|
||||
Line from Geom,
|
||||
@@ -75,12 +73,6 @@ is
|
||||
aPresentation: mutable Presentation from Prs3d)
|
||||
is redefined static private;
|
||||
|
||||
Compute(me:mutable;
|
||||
aPresentationManager: PresentationManager2d from PrsMgr;
|
||||
aPresentation: mutable GraphicObject from Graphic2d;
|
||||
aMode: Integer from Standard = 0)
|
||||
is redefined static private;
|
||||
|
||||
Compute(me : mutable;
|
||||
aProjector : Projector from Prs3d;
|
||||
aTrsf : Transformation from Geom;
|
||||
|
@@ -379,18 +379,6 @@ void AIS_IdenticRelation::Compute(const Handle(Prs3d_Projector)& aProjector,
|
||||
PrsMgr_PresentableObject::Compute( aProjector , aPresentation ) ;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Compute
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void AIS_IdenticRelation::Compute(const Handle(PrsMgr_PresentationManager2d)& aPresentationManager2d,
|
||||
const Handle(Graphic2d_GraphicObject)& aGraphicObject,
|
||||
const Standard_Integer anInteger)
|
||||
{
|
||||
// Standard_NotImplemented::Raise("AIS_IdenticRelation::Compute(const Handle(PrsMgr_PresentationManager2d)&,const Handle(Graphic2d_GraphicObject)&,const Standard_Integer)");
|
||||
PrsMgr_PresentableObject::Compute( aPresentationManager2d ,aGraphicObject,anInteger) ;
|
||||
}
|
||||
|
||||
void AIS_IdenticRelation::Compute(const Handle_Prs3d_Projector& aProjector, const Handle_Geom_Transformation& aTransformation, const Handle_Prs3d_Presentation& aPresentation)
|
||||
{
|
||||
// Standard_NotImplemented::Raise("AIS_IdenticRelation::Compute(const Handle_Prs3d_Projector&, const Handle_Geom_Transformation&, const Handle_Prs3d_Presentation&)");
|
||||
|
@@ -23,12 +23,11 @@
|
||||
#define BUC60577 //GG_101099 Enable to compute correctly
|
||||
// transparency with more than one object in the view.
|
||||
|
||||
#define GER61351 //GG_171199 Enable to set an object RGB color
|
||||
// instead a restricted object NameOfColor.
|
||||
//GER61351 //GG_171199 Enable to set an object RGB color instead a restricted object NameOfColor.
|
||||
|
||||
#define G003 //EUG_26/01/00 Degenerate support (G003)
|
||||
|
||||
#define IMP140200 //GG Add SetSelectedAspect() method.
|
||||
//IMP140200 //GG Add SetSelectedAspect() method.
|
||||
|
||||
#define BUC60632 //GG 15/03/00 Add protection on SetDisplayMode()
|
||||
// method, compute only authorized presentation.
|
||||
@@ -1914,15 +1913,13 @@ UnsetDisplayMode(const Handle(AIS_InteractiveObject)& anIObj,
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
#ifdef GER61351
|
||||
void AIS_InteractiveContext::SetCurrentFacingModel(
|
||||
const Handle(AIS_InteractiveObject)& anIObj,
|
||||
const Aspect_TypeOfFacingModel aModel) {
|
||||
if ( !anIObj.IsNull () ) {
|
||||
anIObj->SetCurrentFacingModel(aModel);
|
||||
}
|
||||
const Aspect_TypeOfFacingModel aModel)
|
||||
{
|
||||
if ( !anIObj.IsNull () )
|
||||
anIObj->SetCurrentFacingModel(aModel);
|
||||
}
|
||||
#endif
|
||||
|
||||
//=======================================================================
|
||||
//function : SetColor
|
||||
@@ -1932,7 +1929,6 @@ void AIS_InteractiveContext::SetCurrentFacingModel(
|
||||
void AIS_InteractiveContext::SetColor(const Handle(AIS_InteractiveObject)& anIObj,
|
||||
const Quantity_NameOfColor aColor,
|
||||
const Standard_Boolean updateviewer)
|
||||
#ifdef GER61351
|
||||
{
|
||||
SetColor(anIObj,Quantity_Color(aColor),updateviewer);
|
||||
}
|
||||
@@ -1940,7 +1936,6 @@ void AIS_InteractiveContext::SetColor(const Handle(AIS_InteractiveObject)& anIOb
|
||||
void AIS_InteractiveContext::SetColor(const Handle(AIS_InteractiveObject)& anIObj,
|
||||
const Quantity_Color &aColor,
|
||||
const Standard_Boolean updateviewer)
|
||||
#endif
|
||||
{
|
||||
if(anIObj.IsNull()) return ;
|
||||
|
||||
@@ -2292,13 +2287,11 @@ Quantity_NameOfColor AIS_InteractiveContext::Color(const Handle(AIS_InteractiveO
|
||||
return anIObj->Color();
|
||||
}
|
||||
|
||||
#ifdef GER61351
|
||||
void AIS_InteractiveContext::Color(const Handle(AIS_InteractiveObject)& anIObj,
|
||||
Quantity_Color &aColor) const
|
||||
Quantity_Color &aColor) const
|
||||
{
|
||||
anIObj->Color(aColor);
|
||||
}
|
||||
#endif
|
||||
|
||||
//=======================================================================
|
||||
//function : Width
|
||||
@@ -2541,7 +2534,6 @@ void AIS_InteractiveContext :: SetDegenerateModel (
|
||||
} // end AIS_InteractiveContext :: SetDegenerateModel
|
||||
#endif
|
||||
|
||||
#ifdef IMP140200
|
||||
//=======================================================================
|
||||
//function : SetSelectedAspect
|
||||
//purpose :
|
||||
@@ -2549,7 +2541,8 @@ void AIS_InteractiveContext :: SetDegenerateModel (
|
||||
void AIS_InteractiveContext::SetSelectedAspect(
|
||||
const Handle(Prs3d_BasicAspect)& anAspect,
|
||||
const Standard_Boolean globalChange,
|
||||
const Standard_Boolean updateViewer) {
|
||||
const Standard_Boolean updateViewer)
|
||||
{
|
||||
if( !HasOpenedContext() ) {
|
||||
Standard_Boolean found = Standard_False;
|
||||
Handle(AIS_Selection) sel =
|
||||
@@ -2563,11 +2556,10 @@ void AIS_InteractiveContext::SetSelectedAspect(
|
||||
if( found && updateViewer) {
|
||||
myMainVwr->Update();
|
||||
if( !(myIsCollClosed && myCollectorVwr.IsNull()) )
|
||||
myCollectorVwr->Update();
|
||||
myCollectorVwr->Update();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
//=======================================================================
|
||||
//function : SetLocalAttributes
|
||||
|
@@ -19,8 +19,7 @@
|
||||
// and conditions governing the rights and limitations under the License.
|
||||
|
||||
|
||||
#define GER61351 //GG_171199 Enable to set an object RGB color
|
||||
// instead a restricted object NameOfColor.
|
||||
//GER61351 //GG_171199 Enable to set an object RGB color instead a restricted object NameOfColor.
|
||||
|
||||
|
||||
inline Standard_Boolean AIS_InteractiveObject::AcceptShapeDecomposition() const
|
||||
@@ -66,19 +65,13 @@ inline Standard_Integer AIS_InteractiveObject::SelectionMode() const
|
||||
|
||||
inline Quantity_NameOfColor AIS_InteractiveObject::Color() const
|
||||
{
|
||||
#ifdef GER61351
|
||||
return myOwnColor.Name();
|
||||
#else
|
||||
return myOwnColor;
|
||||
#endif
|
||||
return myOwnColor.Name();
|
||||
}
|
||||
|
||||
#ifdef GER61351
|
||||
inline void AIS_InteractiveObject::Color(Quantity_Color& aColor) const
|
||||
{
|
||||
aColor = myOwnColor;
|
||||
aColor = myOwnColor;
|
||||
}
|
||||
#endif
|
||||
|
||||
inline Standard_Boolean AIS_InteractiveObject::HasWidth() const
|
||||
{return (!myOwnWidth == 0.);}
|
||||
|
@@ -34,9 +34,7 @@ uses Shape from TopoDS,
|
||||
Dir from gp,
|
||||
Pnt from gp,
|
||||
Projector from Prs3d,
|
||||
Transformation from Geom,
|
||||
PresentationManager2d from PrsMgr,
|
||||
GraphicObject from Graphic2d,
|
||||
Transformation from Geom,
|
||||
ExtendedString from TCollection,
|
||||
Plane from Geom,
|
||||
TypeOfDist from AIS,
|
||||
@@ -150,12 +148,6 @@ is
|
||||
aPresentation : mutable Presentation from Prs3d)
|
||||
is redefined static private;
|
||||
|
||||
Compute(me:mutable;
|
||||
aPresentationManager: PresentationManager2d from PrsMgr;
|
||||
aPresentation: mutable GraphicObject from Graphic2d;
|
||||
aMode: Integer from Standard = 0)
|
||||
is redefined static private;
|
||||
|
||||
Compute(me : mutable;
|
||||
aProjector : Projector from Prs3d;
|
||||
aTrsf : Transformation from Geom;
|
||||
|
@@ -387,19 +387,6 @@ void AIS_LengthDimension::Compute(const Handle(Prs3d_Projector)& aProjector,
|
||||
PrsMgr_PresentableObject::Compute( aProjector , aPresentation ) ;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Compute
|
||||
//purpose : to avoid warning
|
||||
//=======================================================================
|
||||
|
||||
void AIS_LengthDimension::Compute(const Handle(PrsMgr_PresentationManager2d)& aPresentationManager2d,
|
||||
const Handle(Graphic2d_GraphicObject)& aGraphicObject,
|
||||
const Standard_Integer anInteger)
|
||||
{
|
||||
// Standard_NotImplemented::Raise("AIS_LengthDimension::Compute(const Handle(PrsMgr_PresentationManager2d)&,const Handle(Graphic2d_GraphicObject)&,const Standard_Integer)");
|
||||
PrsMgr_PresentableObject::Compute( aPresentationManager2d ,aGraphicObject,anInteger) ;
|
||||
}
|
||||
|
||||
void AIS_LengthDimension::Compute(const Handle_Prs3d_Projector& aProjector, const Handle_Geom_Transformation& aTransformation, const Handle_Prs3d_Presentation& aPresentation)
|
||||
{
|
||||
// Standard_NotImplemented::Raise("AIS_LengthDimension::Compute(const Handle_Prs3d_Projector&, const Handle_Geom_Transformation&, const Handle_Prs3d_Presentation&)");
|
||||
|
@@ -36,8 +36,6 @@ uses
|
||||
Selection from SelectMgr,
|
||||
Projector from Prs3d,
|
||||
Transformation from Geom,
|
||||
PresentationManager2d from PrsMgr,
|
||||
GraphicObject from Graphic2d,
|
||||
Line from AIS,
|
||||
KindOfInteractive from AIS
|
||||
|
||||
@@ -61,13 +59,7 @@ is
|
||||
Compute(me:mutable;
|
||||
aProjector: Projector from Prs3d;
|
||||
aPresentation: mutable Presentation from Prs3d)
|
||||
is redefined static private;
|
||||
|
||||
Compute(me:mutable;
|
||||
aPresentationManager: PresentationManager2d from PrsMgr;
|
||||
aPresentation: mutable GraphicObject from Graphic2d;
|
||||
aMode: Integer from Standard = 0)
|
||||
is redefined static private;
|
||||
is redefined static private;
|
||||
|
||||
Compute(me : mutable;
|
||||
aProjector : Projector from Prs3d;
|
||||
|
@@ -19,15 +19,13 @@
|
||||
// and conditions governing the rights and limitations under the License.
|
||||
|
||||
|
||||
#define GER61351 //GG_171199 Enable to set an object RGB color
|
||||
// instead a restricted object NameOfColor.
|
||||
//GER61351 //GG_171199 Enable to set an object RGB color instead a restricted object NameOfColor.
|
||||
|
||||
#include <AIS_Line.ixx>
|
||||
#include <Aspect_TypeOfLine.hxx>
|
||||
#include <Prs3d_Drawer.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <Prs3d_LineAspect.hxx>
|
||||
#include <Graphic3d_ArrayOfPrimitives.hxx>
|
||||
#include <Graphic3d_AspectLine3d.hxx>
|
||||
#include <Graphic3d_Structure.hxx>
|
||||
#include <TColgp_Array1OfPnt.hxx>
|
||||
@@ -157,13 +155,11 @@ void AIS_Line::ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,
|
||||
//=======================================================================
|
||||
|
||||
void AIS_Line::SetColor(const Quantity_NameOfColor aCol)
|
||||
#ifdef GER61351
|
||||
{
|
||||
SetColor(Quantity_Color(aCol));
|
||||
}
|
||||
|
||||
void AIS_Line::SetColor(const Quantity_Color &aCol)
|
||||
#endif
|
||||
{
|
||||
hasOwnColor=Standard_True;
|
||||
myOwnColor=aCol;
|
||||
@@ -190,15 +186,9 @@ void AIS_Line::UnsetColor()
|
||||
|
||||
if (!HasWidth()) myDrawer->SetLineAspect(NullAsp);
|
||||
else{
|
||||
#ifdef GER61351
|
||||
Quantity_Color CC;
|
||||
if( HasColor() ) CC = myOwnColor;
|
||||
else AIS_GraphicTool::GetLineColor(myDrawer->Link(),AIS_TOA_Line,CC);
|
||||
#else
|
||||
Quantity_NameOfColor CC =
|
||||
AIS_GraphicTool::GetLineColor(myDrawer->Link(),AIS_TOA_Line);
|
||||
#endif
|
||||
|
||||
myDrawer->LineAspect()->SetColor(CC);
|
||||
myOwnColor = CC;
|
||||
}
|
||||
@@ -212,17 +202,10 @@ void AIS_Line::SetWidth(const Standard_Real aValue)
|
||||
{
|
||||
myOwnWidth=aValue;
|
||||
|
||||
#ifndef GER61351
|
||||
Quantity_NameOfColor CC =
|
||||
HasColor()? myOwnColor : AIS_GraphicTool::GetLineColor(myDrawer->Link(),AIS_TOA_Line);
|
||||
#endif
|
||||
|
||||
if (!myDrawer->HasLineAspect ()) {
|
||||
#ifdef GER61351
|
||||
Quantity_Color CC;
|
||||
if( HasColor() ) CC = myOwnColor;
|
||||
else AIS_GraphicTool::GetLineColor(myDrawer->Link(),AIS_TOA_Line,CC);
|
||||
#endif
|
||||
myDrawer->SetLineAspect (new Prs3d_LineAspect(CC,Aspect_TOL_SOLID,aValue));
|
||||
} else
|
||||
myDrawer->LineAspect()->SetWidth(aValue);
|
||||
@@ -251,16 +234,11 @@ void AIS_Line::UnsetWidth()
|
||||
//=======================================================================
|
||||
void AIS_Line::ComputeInfiniteLine( const Handle(Prs3d_Presentation)& aPresentation)
|
||||
{
|
||||
|
||||
GeomAdaptor_Curve curv(myComponent);
|
||||
Standard_Boolean isPrimitiveArraysEnabled = Graphic3d_ArrayOfPrimitives::IsEnable();
|
||||
if(isPrimitiveArraysEnabled) Graphic3d_ArrayOfPrimitives::Disable();
|
||||
StdPrs_Curve::Add(aPresentation,curv,myDrawer);
|
||||
if(isPrimitiveArraysEnabled) Graphic3d_ArrayOfPrimitives::Enable();
|
||||
|
||||
//pas de prise en compte lors du FITALL
|
||||
aPresentation->SetInfiniteState (Standard_True);
|
||||
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@@ -269,7 +247,6 @@ void AIS_Line::ComputeInfiniteLine( const Handle(Prs3d_Presentation)& aPresentat
|
||||
//=======================================================================
|
||||
void AIS_Line::ComputeSegmentLine( const Handle(Prs3d_Presentation)& aPresentation)
|
||||
{
|
||||
|
||||
gp_Pnt P1 = myStartPoint->Pnt();
|
||||
gp_Pnt P2 = myEndPoint->Pnt();
|
||||
|
||||
@@ -277,11 +254,7 @@ void AIS_Line::ComputeSegmentLine( const Handle(Prs3d_Presentation)& aPresentati
|
||||
|
||||
Standard_Real dist = P1.Distance(P2);
|
||||
GeomAdaptor_Curve curv(myComponent,0.,dist);
|
||||
Standard_Boolean isPrimitiveArraysEnabled = Graphic3d_ArrayOfPrimitives::IsEnable();
|
||||
if(isPrimitiveArraysEnabled) Graphic3d_ArrayOfPrimitives::Disable();
|
||||
StdPrs_Curve::Add(aPresentation,curv,myDrawer);
|
||||
if(isPrimitiveArraysEnabled) Graphic3d_ArrayOfPrimitives::Enable();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -325,15 +298,6 @@ void AIS_Line::ComputeSegmentLineSelection(const Handle(SelectMgr_Selection)& aS
|
||||
myEndPoint->Pnt());
|
||||
aSelection->Add(seg);
|
||||
}
|
||||
//=======================================================================
|
||||
//function : Compute
|
||||
//purpose : to avoid warning
|
||||
//=======================================================================
|
||||
void AIS_Line::Compute(const Handle(PrsMgr_PresentationManager2d)&,
|
||||
const Handle(Graphic2d_GraphicObject)&,
|
||||
const Standard_Integer)
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Compute
|
||||
|
@@ -93,7 +93,7 @@
|
||||
#include <AIS_LocalStatus.hxx>
|
||||
#include <StdPrs_WFShape.hxx>
|
||||
#include <Visual3d_TransientManager.hxx>
|
||||
#include <Graphic3d_Array1OfVertex.hxx>
|
||||
#include <Graphic3d_ArrayOfTriangles.hxx>
|
||||
#include <Graphic3d_Group.hxx>
|
||||
#include <Select3D_SensitiveTriangulation.hxx>
|
||||
#include <SelectBasics_SensitiveEntity.hxx>
|
||||
@@ -1430,17 +1430,18 @@ void AIS_LocalContext::HilightTriangle(const Standard_Integer Rank,
|
||||
{
|
||||
static Standard_Integer PrevRank(0);
|
||||
if(Rank==PrevRank) return;
|
||||
// PrevRank = Rank;
|
||||
Handle(SelectBasics_SensitiveEntity) SE = myMainVS->Primitive(Rank);
|
||||
if(SE->IsKind(STANDARD_TYPE(Select3D_SensitiveTriangulation))){
|
||||
if(SE->IsKind(STANDARD_TYPE(Select3D_SensitiveTriangulation)))
|
||||
{
|
||||
Handle(Select3D_SensitiveTriangulation) Tr = *((Handle(Select3D_SensitiveTriangulation)*)&SE);
|
||||
gp_Pnt p1,p2,p3 ; Tr->DetectedTriangle(p1,p2,p3);
|
||||
static Graphic3d_Array1OfVertex Vtt(1,3);
|
||||
|
||||
Vtt.SetValue(1,Graphic3d_Vertex(p1.X(),p1.Y(),p1.Z()));
|
||||
Vtt.SetValue(2,Graphic3d_Vertex(p2.X(),p2.Y(),p2.Z()));
|
||||
Vtt.SetValue(3,Graphic3d_Vertex(p3.X(),p3.Y(),p3.Z()));
|
||||
static Handle(Prs3d_Presentation) TriPrs =
|
||||
Handle(Graphic3d_ArrayOfTriangles) aTris = new Graphic3d_ArrayOfTriangles(3);
|
||||
aTris->AddVertex(p1);
|
||||
aTris->AddVertex(p2);
|
||||
aTris->AddVertex(p3);
|
||||
|
||||
static Handle(Prs3d_Presentation) TriPrs =
|
||||
new Prs3d_Presentation(myMainPM->StructureManager());
|
||||
TriPrs->Clear();
|
||||
#ifdef IMP300101
|
||||
@@ -1448,20 +1449,17 @@ void AIS_LocalContext::HilightTriangle(const Standard_Integer Rank,
|
||||
asp->SetColor(myCTX->HilightColor());
|
||||
TriPrs->SetShadingAspect(asp);
|
||||
#endif
|
||||
Prs3d_Root::CurrentGroup(TriPrs)->Polygon(Vtt);
|
||||
Prs3d_Root::CurrentGroup(TriPrs)->AddPrimitiveArray(aTris);
|
||||
|
||||
#ifndef IMP300101
|
||||
if(view->TransientManagerBeginDraw())
|
||||
Visual3d_TransientManager::EndDraw();
|
||||
#endif
|
||||
if(view->TransientManagerBeginDraw()) {
|
||||
//P->Exploration();
|
||||
Visual3d_TransientManager::DrawStructure(TriPrs);
|
||||
Visual3d_TransientManager::EndDraw();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
|
@@ -40,9 +40,7 @@ uses
|
||||
PresentationManager3d from PrsMgr,
|
||||
Selection from SelectMgr,
|
||||
Projector from Prs3d,
|
||||
Transformation from Geom,
|
||||
PresentationManager2d from PrsMgr,
|
||||
GraphicObject from Graphic2d,
|
||||
Transformation from Geom,
|
||||
ExtendedString from TCollection,
|
||||
ArrowSide from DsgPrs,
|
||||
KindOfSurface from AIS,
|
||||
@@ -85,13 +83,7 @@ is
|
||||
Compute(me:mutable;
|
||||
aProjector: Projector from Prs3d;
|
||||
aPresentation: mutable Presentation from Prs3d)
|
||||
is redefined static private;
|
||||
|
||||
Compute(me:mutable;
|
||||
aPresentationManager: PresentationManager2d from PrsMgr;
|
||||
aPresentation: mutable GraphicObject from Graphic2d;
|
||||
aMode: Integer from Standard = 0)
|
||||
is redefined static private;
|
||||
is redefined static private;
|
||||
|
||||
Compute(me : mutable;
|
||||
aProjector : Projector from Prs3d;
|
||||
|
@@ -146,19 +146,6 @@ void AIS_MaxRadiusDimension::Compute(const Handle(Prs3d_Projector)& aProjector,
|
||||
PrsMgr_PresentableObject::Compute( aProjector , aPresentation ) ;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Compute
|
||||
//purpose : to avoid warning
|
||||
//=======================================================================
|
||||
|
||||
void AIS_MaxRadiusDimension::Compute(const Handle(PrsMgr_PresentationManager2d)& aPresentationManager,
|
||||
const Handle(Graphic2d_GraphicObject)& aPresentation,
|
||||
const Standard_Integer aMode)
|
||||
{
|
||||
// Standard_NotImplemented::Raise("AIS_MaxRadiusDimension::Compute(const Handle(PrsMgr_PresentationManager2d)& aPresentationManager, const Handle(Graphic2d_GraphicObject)& aPresentation, const Standard_Integer aMode)");
|
||||
PrsMgr_PresentableObject::Compute( aPresentationManager ,aPresentation,aMode) ;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Compute
|
||||
//purpose :
|
||||
|
@@ -26,10 +26,8 @@ uses
|
||||
ExtendedString from TCollection,
|
||||
Projector from Prs3d,
|
||||
Presentation from Prs3d,
|
||||
PresentationManager2d from PrsMgr,
|
||||
PresentationManager3d from PrsMgr,
|
||||
Selection from SelectMgr,
|
||||
GraphicObject from Graphic2d,
|
||||
Dir from gp,
|
||||
Pnt from gp,
|
||||
Lin from gp,
|
||||
@@ -70,12 +68,6 @@ is
|
||||
aPresentation: mutable Presentation from Prs3d)
|
||||
is redefined static private;
|
||||
|
||||
Compute(me: mutable;
|
||||
aPresentationManager: PresentationManager2d from PrsMgr;
|
||||
aPresentation : mutable GraphicObject from Graphic2d;
|
||||
aMode : Integer from Standard = 0)
|
||||
is redefined static private;
|
||||
|
||||
Compute(me: mutable;
|
||||
aProjector : Projector from Prs3d;
|
||||
aTrsf : Transformation from Geom;
|
||||
|
@@ -155,18 +155,6 @@ void AIS_MidPointRelation::Compute(const Handle(Prs3d_Projector)& /*aProjector*/
|
||||
// PrsMgr_PresentableObject::Compute( aProjector , aPresentation ) ;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Compute
|
||||
//purpose : to avoid warning at compilation (SUN)
|
||||
//=======================================================================
|
||||
void AIS_MidPointRelation::Compute(const Handle(PrsMgr_PresentationManager2d)& /*aPresentationManager2d*/,
|
||||
const Handle(Graphic2d_GraphicObject)& /*aGraphicObject*/,
|
||||
const Standard_Integer /*anInteger*/)
|
||||
{
|
||||
// Standard_NotImplemented::Raise("AIS_MidPointRelation::Compute(const Handle(PrsMgr_PresentationManager2d)&,const Handle(Graphic2d_GraphicObject)&,const Standard_Integer)");
|
||||
// PrsMgr_PresentableObject::Compute( aPresentationManager2d ,aGraphicObject,anInteger) ;
|
||||
}
|
||||
|
||||
void AIS_MidPointRelation::Compute(const Handle_Prs3d_Projector& aProjector,
|
||||
const Handle_Geom_Transformation& aTransformation,
|
||||
const Handle_Prs3d_Presentation& aPresentation)
|
||||
|
@@ -39,9 +39,7 @@ uses
|
||||
PresentationManager3d from PrsMgr,
|
||||
Selection from SelectMgr,
|
||||
Projector from Prs3d,
|
||||
Transformation from Geom,
|
||||
PresentationManager2d from PrsMgr,
|
||||
GraphicObject from Graphic2d,
|
||||
Transformation from Geom,
|
||||
ExtendedString from TCollection,
|
||||
ArrowSide from DsgPrs,
|
||||
KindOfSurface from AIS,
|
||||
@@ -87,12 +85,6 @@ is
|
||||
aProjector: Projector from Prs3d;
|
||||
aPresentation: mutable Presentation from Prs3d)
|
||||
is redefined static private;
|
||||
|
||||
Compute(me:mutable;
|
||||
aPresentationManager: PresentationManager2d from PrsMgr;
|
||||
aPresentation: mutable GraphicObject from Graphic2d;
|
||||
aMode: Integer from Standard = 0)
|
||||
is redefined static private;
|
||||
|
||||
Compute(me : mutable;
|
||||
aProjector : Projector from Prs3d;
|
||||
|
@@ -148,19 +148,6 @@ void AIS_MinRadiusDimension::Compute(const Handle(Prs3d_Projector)& aProjector,
|
||||
PrsMgr_PresentableObject::Compute( aProjector , aPresentation ) ;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Compute
|
||||
//purpose : to avoid warning
|
||||
//=======================================================================
|
||||
|
||||
void AIS_MinRadiusDimension::Compute(const Handle(PrsMgr_PresentationManager2d)& aPresentationManager,
|
||||
const Handle(Graphic2d_GraphicObject)& aPresentation,
|
||||
const Standard_Integer aMode)
|
||||
{
|
||||
// Standard_NotImplemented::Raise("AIS_MinRadiusDimension::Compute(const Handle(PrsMgr_PresentationManager2d)& aPresentationManager, const Handle(Graphic2d_GraphicObject)& aPresentation, const Standard_Integer aMode)");
|
||||
PrsMgr_PresentableObject::Compute( aPresentationManager ,aPresentation,aMode) ;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Compute
|
||||
//purpose :
|
||||
|
@@ -38,8 +38,6 @@ uses
|
||||
SequenceOfInteractive from AIS,
|
||||
KindOfInteractive from AIS,
|
||||
PresentationManager3d from PrsMgr,
|
||||
PresentationManager2d from PrsMgr,
|
||||
GraphicObject from Graphic2d,
|
||||
Presentation from Prs3d,
|
||||
Projector from Prs3d,
|
||||
Transformation from Geom,
|
||||
@@ -97,12 +95,6 @@ is
|
||||
-- a transformation if there's one stored.
|
||||
is redefined virtual protected;
|
||||
|
||||
Compute(me:mutable;
|
||||
aPresentationManager: PresentationManager2d from PrsMgr;
|
||||
aPresentation: mutable GraphicObject from Graphic2d;
|
||||
aMode: Integer from Standard = 0)
|
||||
is redefined;
|
||||
|
||||
Compute(me : mutable;
|
||||
aProjector : Projector from Prs3d;
|
||||
aTrsf : Transformation from Geom;
|
||||
|
@@ -176,19 +176,6 @@ void AIS_MultipleConnectedInteractive::Compute(const Handle_Prs3d_Projector& aPr
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void AIS_MultipleConnectedInteractive::Compute(const Handle_PrsMgr_PresentationManager2d& aPresentationManager2d,
|
||||
const Handle_Graphic2d_GraphicObject& aGraphicObject,
|
||||
const int anInteger)
|
||||
{
|
||||
// Standard_NotImplemented::Raise("AIS_MultipleConnectedInteractive::Compute(const Handle_PrsMgr_PresentationManager2d&, const Handle_Graphic2d_GraphicObject&, const int)");
|
||||
PrsMgr_PresentableObject::Compute( aPresentationManager2d ,aGraphicObject,anInteger) ;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Compute
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void AIS_MultipleConnectedInteractive::Compute(const Handle_Prs3d_Projector& aProjector,
|
||||
const Handle_Geom_Transformation& aTransformation,
|
||||
const Handle_Prs3d_Presentation& aPresentation)
|
||||
|
@@ -33,8 +33,6 @@ class MultipleConnectedShape from AIS inherits MultipleConnectedInteractive from
|
||||
uses
|
||||
|
||||
PresentationManager3d from PrsMgr,
|
||||
PresentationManager2d from PrsMgr,
|
||||
GraphicObject from Graphic2d,
|
||||
Shape from TopoDS,
|
||||
Projector from Prs3d,
|
||||
Presentation from Prs3d,
|
||||
@@ -108,18 +106,6 @@ is
|
||||
-- presentation of this last object, with
|
||||
-- a transformation if there's one stored.
|
||||
is redefined virtual private;
|
||||
|
||||
Compute(me:mutable;
|
||||
aPresentationManager: PresentationManager2d from PrsMgr;
|
||||
aPresentation: mutable GraphicObject from Graphic2d;
|
||||
aMode: Integer from Standard = 0)
|
||||
---Level: Internal
|
||||
---Purpose: this method should fill the presentation according to the
|
||||
-- enumerated mode of the application and to the display parameter
|
||||
-- of the application.
|
||||
|
||||
raises NotImplemented from Standard
|
||||
is redefined;
|
||||
|
||||
fields
|
||||
myShape : Shape from TopoDS; -- celle qui sert au compute Hidden lines et selection
|
||||
|
@@ -171,19 +171,6 @@ void AIS_MultipleConnectedShape::Compute(const Handle_PrsMgr_PresentationManager
|
||||
AIS_MultipleConnectedInteractive::Compute( aPresentationManager3d , aPresentation , anint ) ;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Compute
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void AIS_MultipleConnectedShape::Compute(const Handle_PrsMgr_PresentationManager2d& aPresentationManager2d,
|
||||
const Handle_Graphic2d_GraphicObject& aGraphicObject,
|
||||
const int anInteger)
|
||||
{
|
||||
// Standard_NotImplemented::Raise("AIS_MultipleConnectedShape::Compute(const Handle_PrsMgr_PresentationManager2d&, const Handle_Graphic2d_GraphicObject&, const int)");
|
||||
PrsMgr_PresentableObject::Compute( aPresentationManager2d ,aGraphicObject,anInteger) ;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : ComputeSelection
|
||||
//purpose :
|
||||
|
@@ -24,12 +24,6 @@
|
||||
#include <AIS_NListIteratorOfListTransient.hxx>
|
||||
#include <NCollection_DefineDataMap.hxx>
|
||||
|
||||
inline Standard_Boolean IsEqual (const Handle_Standard_Transient& theH1,
|
||||
const Handle_Standard_Transient& theH2)
|
||||
{
|
||||
return (theH1 == theH2);
|
||||
}
|
||||
|
||||
DEFINE_BASECOLLECTION(AIS_BaseCollItListTransient,
|
||||
AIS_NListIteratorOfListTransient)
|
||||
DEFINE_DATAMAP (AIS_NDataMapOfTransientIteratorOfListTransient,
|
||||
|
@@ -32,11 +32,9 @@ uses
|
||||
Shape from TopoDS,
|
||||
Presentation from Prs3d,
|
||||
Projector from Prs3d,
|
||||
Transformation from Geom,
|
||||
Transformation from Geom,
|
||||
PresentationManager3d from PrsMgr,
|
||||
PresentationManager2d from PrsMgr,
|
||||
Selection from SelectMgr,
|
||||
GraphicObject from Graphic2d,
|
||||
Dir from gp,
|
||||
Pnt from gp,
|
||||
Trsf from gp,
|
||||
@@ -62,12 +60,6 @@ is
|
||||
aProjector: Projector from Prs3d;
|
||||
aPresentation: mutable Presentation from Prs3d)
|
||||
is redefined static private;
|
||||
|
||||
Compute(me:mutable;
|
||||
aPresentationManager: PresentationManager2d from PrsMgr;
|
||||
aPresentation: mutable GraphicObject from Graphic2d;
|
||||
aMode: Integer from Standard = 0)
|
||||
is redefined static private;
|
||||
|
||||
Compute(me : mutable;
|
||||
aProjector : Projector from Prs3d;
|
||||
|
@@ -148,18 +148,6 @@ void AIS_OffsetDimension::Compute(const Handle(Prs3d_Projector)& /*aProjector*/,
|
||||
// PrsMgr_PresentableObject::Compute( aProjector , aPresentation ) ;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Compute
|
||||
//purpose : to avoid warning at compilation (SUN)
|
||||
//=======================================================================
|
||||
void AIS_OffsetDimension::Compute(const Handle(PrsMgr_PresentationManager2d)& /*aPresentationManager2d*/,
|
||||
const Handle(Graphic2d_GraphicObject)& /*aGraphicObject*/,
|
||||
const Standard_Integer /*anInteger*/)
|
||||
{
|
||||
// Standard_NotImplemented::Raise("AIS_OffsetDimension::Compute(const Handle(PrsMgr_PresentationManager2d)&,const Handle(Graphic2d_GraphicObject)&,const Standard_Integer)");
|
||||
// PrsMgr_PresentableObject::Compute( aPresentationManager2d ,aGraphicObject,anInteger) ;
|
||||
}
|
||||
|
||||
void AIS_OffsetDimension::Compute(const Handle(Prs3d_Projector)& aProjector,
|
||||
const Handle(Geom_Transformation)& aTransformation,
|
||||
const Handle(Prs3d_Presentation)& aPresentation)
|
||||
|
@@ -34,9 +34,7 @@ uses Shape from TopoDS,
|
||||
Dir from gp,
|
||||
Pnt from gp,
|
||||
Projector from Prs3d,
|
||||
Transformation from Geom,
|
||||
PresentationManager2d from PrsMgr,
|
||||
GraphicObject from Graphic2d,
|
||||
Transformation from Geom,
|
||||
ArrowSide from DsgPrs
|
||||
|
||||
is
|
||||
@@ -79,13 +77,6 @@ is
|
||||
aPresentation: mutable Presentation from Prs3d)
|
||||
is redefined static private;
|
||||
|
||||
Compute(me:mutable;
|
||||
aPresentationManager: PresentationManager2d from PrsMgr;
|
||||
aPresentation: mutable GraphicObject from Graphic2d;
|
||||
aMode: Integer from Standard = 0)
|
||||
is redefined static private;
|
||||
|
||||
|
||||
Compute(me : mutable;
|
||||
aProjector : Projector from Prs3d;
|
||||
aTrsf : Transformation from Geom;
|
||||
|
@@ -145,18 +145,6 @@ void AIS_ParallelRelation::Compute(const Handle(Prs3d_Projector)& aProjector,
|
||||
PrsMgr_PresentableObject::Compute( aProjector , aPresentation ) ;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Compute
|
||||
//purpose : to avoid warning
|
||||
//=======================================================================
|
||||
void AIS_ParallelRelation::Compute(const Handle(PrsMgr_PresentationManager2d)& aPresentationManager2d,
|
||||
const Handle(Graphic2d_GraphicObject)& aGraphicObject,
|
||||
const Standard_Integer anInteger)
|
||||
{
|
||||
// Standard_NotImplemented::Raise("AIS_ParallelRelation::Compute(const Handle(PrsMgr_PresentationManager2d)&,const Handle(Graphic2d_GraphicObject)&,const Standard_Integer)");
|
||||
PrsMgr_PresentableObject::Compute( aPresentationManager2d ,aGraphicObject,anInteger) ;
|
||||
}
|
||||
|
||||
void AIS_ParallelRelation::Compute(const Handle_Prs3d_Projector& aProjector, const Handle_Geom_Transformation& aTransformation, const Handle_Prs3d_Presentation& aPresentation)
|
||||
{
|
||||
// Standard_NotImplemented::Raise("AIS_ParallelRelation::Compute(const Handle_Prs3d_Projector&, const Handle_Geom_Transformation&, const Handle_Prs3d_Presentation&)");
|
||||
|
@@ -30,9 +30,7 @@ uses Shape from TopoDS,
|
||||
Pnt from gp,
|
||||
Dir from gp,
|
||||
Projector from Prs3d,
|
||||
Transformation from Geom,
|
||||
PresentationManager2d from PrsMgr,
|
||||
GraphicObject from Graphic2d,
|
||||
Transformation from Geom,
|
||||
Plane from Geom
|
||||
|
||||
is
|
||||
@@ -69,12 +67,6 @@ is
|
||||
aPresentation: mutable Presentation from Prs3d)
|
||||
is redefined static private;
|
||||
|
||||
Compute(me:mutable;
|
||||
aPresentationManager: PresentationManager2d from PrsMgr;
|
||||
aPresentation: mutable GraphicObject from Graphic2d;
|
||||
aMode: Integer from Standard = 0)
|
||||
is redefined static private;
|
||||
|
||||
Compute(me : mutable;
|
||||
aProjector : Projector from Prs3d;
|
||||
aTrsf : Transformation from Geom;
|
||||
|
@@ -129,19 +129,6 @@ void AIS_PerpendicularRelation::Compute(const Handle(Prs3d_Projector)& aProjecto
|
||||
PrsMgr_PresentableObject::Compute( aProjector , aPresentation ) ;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Compute
|
||||
//purpose : to avoid warning
|
||||
//=======================================================================
|
||||
void AIS_PerpendicularRelation::Compute(const Handle(PrsMgr_PresentationManager2d)& aPresentationManager2d,
|
||||
const Handle(Graphic2d_GraphicObject)&
|
||||
aGraphicObject,
|
||||
const Standard_Integer anInteger)
|
||||
{
|
||||
// Standard_NotImplemented::Raise("AIS_PerpendicularRelation::Compute(const Handle(PrsMgr_PresentationManager2d)&,const Handle(Graphic2d_GraphicObject)&,const Standard_Integer)");
|
||||
PrsMgr_PresentableObject::Compute( aPresentationManager2d ,aGraphicObject,anInteger) ;
|
||||
}
|
||||
|
||||
void AIS_PerpendicularRelation::Compute(const Handle_Prs3d_Projector& aProjector, const Handle_Geom_Transformation& aTransformation, const Handle_Prs3d_Presentation& aPresentation)
|
||||
{
|
||||
// Standard_NotImplemented::Raise("AIS_PerpendicularRelation::Compute(const Handle_Prs3d_Projector&, const Handle_Geom_Transformation&, const Handle_Prs3d_Presentation&)");
|
||||
|
@@ -38,8 +38,6 @@ uses
|
||||
Pnt from gp,
|
||||
Projector from Prs3d,
|
||||
Transformation from Geom,
|
||||
PresentationManager2d from PrsMgr,
|
||||
GraphicObject from Graphic2d,
|
||||
NameOfMaterial from Graphic3d,
|
||||
TypeOfPlane from AIS,
|
||||
Axis2Placement from Geom,
|
||||
@@ -200,13 +198,7 @@ is
|
||||
Compute(me:mutable;
|
||||
aProjector: Projector from Prs3d;
|
||||
aPresentation: mutable Presentation from Prs3d)
|
||||
is redefined virtual private;
|
||||
|
||||
Compute(me:mutable;
|
||||
aPresentationManager: PresentationManager2d from PrsMgr;
|
||||
aPresentation: mutable GraphicObject from Graphic2d;
|
||||
aMode: Integer from Standard = 0)
|
||||
is redefined virtual private;
|
||||
is redefined virtual private;
|
||||
|
||||
Compute(me : mutable;
|
||||
aProjector : Projector from Prs3d;
|
||||
|
@@ -31,7 +31,7 @@
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <ElSLib.hxx>
|
||||
|
||||
#include <Graphic3d_Array1OfVertex.hxx>
|
||||
#include <Graphic3d_ArrayOfQuadrangles.hxx>
|
||||
#include <Graphic3d_Group.hxx>
|
||||
#include <Prs3d_Drawer.hxx>
|
||||
#include <Prs3d_LineAspect.hxx>
|
||||
@@ -245,58 +245,59 @@ void AIS_Plane::Compute(const Handle(PrsMgr_PresentationManager3d)& ,
|
||||
|
||||
ComputeFields();
|
||||
aPresentation->SetInfiniteState(myInfiniteState);
|
||||
if (myCurrentMode)
|
||||
myDrawer->PlaneAspect()->EdgesAspect()->SetWidth(3);
|
||||
else
|
||||
myDrawer->PlaneAspect()->EdgesAspect()->SetWidth(1);
|
||||
if(aMode == 0){
|
||||
if (!myIsXYZPlane){
|
||||
ComputeFrame();
|
||||
const Handle(Geom_Plane)& pl = myComponent;
|
||||
const Handle(Geom_Plane)& thegoodpl = Handle(Geom_Plane)::DownCast
|
||||
(pl->Translated(pl->Location(),myCenter));
|
||||
GeomAdaptor_Surface surf(thegoodpl);
|
||||
StdPrs_Plane::Add(aPresentation,surf,myDrawer);
|
||||
}
|
||||
else {
|
||||
DsgPrs_XYZPlanePresentation::Add(aPresentation,myDrawer,myCenter,myPmin,myPmax);
|
||||
}
|
||||
}
|
||||
else if (aMode == 1){
|
||||
if (!myIsXYZPlane){
|
||||
ComputeFrame();
|
||||
Handle(Prs3d_PlaneAspect) theaspect = myDrawer->PlaneAspect();
|
||||
Handle(Graphic3d_Group) TheGroup = Prs3d_Root::CurrentGroup(aPresentation);
|
||||
gp_Pnt p1;
|
||||
Standard_Real Xmax,Ymax;
|
||||
Xmax = Standard_Real(theaspect->PlaneXLength())/2.;
|
||||
Ymax = Standard_Real(theaspect->PlaneYLength())/2.;
|
||||
static Graphic3d_Array1OfVertex vertices(1,5);
|
||||
TheGroup->SetPrimitivesAspect(myDrawer->ShadingAspect()->Aspect());
|
||||
myComponent->D0(-Xmax,Ymax,p1);
|
||||
vertices(1).SetCoord(p1.X(),p1.Y(),p1.Z());
|
||||
vertices(5).SetCoord(p1.X(),p1.Y(),p1.Z());
|
||||
myComponent->D0(Xmax,Ymax,p1);
|
||||
vertices(2).SetCoord(p1.X(),p1.Y(),p1.Z());
|
||||
myComponent->D0(Xmax,-Ymax,p1);
|
||||
vertices(3).SetCoord(p1.X(),p1.Y(),p1.Z());
|
||||
myComponent->D0(-Xmax,-Ymax,p1);
|
||||
vertices(4).SetCoord(p1.X(),p1.Y(),p1.Z());
|
||||
TheGroup->Polygon(vertices);
|
||||
|
||||
}
|
||||
else{
|
||||
DsgPrs_ShadedPlanePresentation::Add(aPresentation,myDrawer,myCenter,myPmin,myPmax);
|
||||
|
||||
}
|
||||
}
|
||||
myDrawer->PlaneAspect()->EdgesAspect()->SetWidth(myCurrentMode == 0? 1 : 3);
|
||||
|
||||
switch (aMode)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
if (!myIsXYZPlane)
|
||||
{
|
||||
ComputeFrame();
|
||||
const Handle(Geom_Plane)& pl = myComponent;
|
||||
const Handle(Geom_Plane)& thegoodpl = Handle(Geom_Plane)::DownCast(pl->Translated(pl->Location(),myCenter));
|
||||
GeomAdaptor_Surface surf(thegoodpl);
|
||||
StdPrs_Plane::Add(aPresentation,surf,myDrawer);
|
||||
}
|
||||
else
|
||||
DsgPrs_XYZPlanePresentation::Add(aPresentation,myDrawer,myCenter,myPmin,myPmax);
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
if (!myIsXYZPlane)
|
||||
{
|
||||
ComputeFrame();
|
||||
Handle(Prs3d_PlaneAspect) theaspect = myDrawer->PlaneAspect();
|
||||
Handle(Graphic3d_Group) TheGroup = Prs3d_Root::CurrentGroup(aPresentation);
|
||||
TheGroup->SetPrimitivesAspect(myDrawer->ShadingAspect()->Aspect());
|
||||
gp_Pnt p1;
|
||||
const Standard_Real Xmax = 0.5*Standard_Real(theaspect->PlaneXLength());
|
||||
const Standard_Real Ymax = 0.5*Standard_Real(theaspect->PlaneYLength());
|
||||
|
||||
Handle(Graphic3d_ArrayOfQuadrangles) aQuads = new Graphic3d_ArrayOfQuadrangles(4);
|
||||
|
||||
myComponent->D0(-Xmax,Ymax,p1);
|
||||
aQuads->AddVertex(p1);
|
||||
myComponent->D0(Xmax,Ymax,p1);
|
||||
aQuads->AddVertex(p1);
|
||||
myComponent->D0(Xmax,-Ymax,p1);
|
||||
aQuads->AddVertex(p1);
|
||||
myComponent->D0(-Xmax,-Ymax,p1);
|
||||
aQuads->AddVertex(p1);
|
||||
|
||||
TheGroup->AddPrimitiveArray(aQuads);
|
||||
}
|
||||
else
|
||||
DsgPrs_ShadedPlanePresentation::Add(aPresentation,myDrawer,myCenter,myPmin,myPmax);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void AIS_Plane::Compute(const Handle_Prs3d_Projector& aProjector, const Handle_Geom_Transformation& aTransformation, const Handle_Prs3d_Presentation& aPresentation)
|
||||
{
|
||||
// Standard_NotImplemented::Raise("AIS_Plane::Compute(const Handle_Prs3d_Projector&, const Handle_Geom_Transformation&, const Handle_Prs3d_Presentation&)");
|
||||
PrsMgr_PresentableObject::Compute( aProjector , aTransformation , aPresentation) ;
|
||||
PrsMgr_PresentableObject::Compute(aProjector, aTransformation, aPresentation);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@@ -534,16 +535,6 @@ void AIS_Plane::ComputeFrame()
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Compute
|
||||
//purpose : to avoid warning
|
||||
//=======================================================================
|
||||
void AIS_Plane::Compute(const Handle(PrsMgr_PresentationManager2d)&,
|
||||
const Handle(Graphic2d_GraphicObject)&,
|
||||
const Standard_Integer)
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Compute
|
||||
//purpose : to avoid warning
|
||||
|
@@ -55,8 +55,6 @@ uses
|
||||
Projector from Prs3d,
|
||||
Transformation from Geom,
|
||||
Drawer from Prs3d,
|
||||
PresentationManager2d from PrsMgr,
|
||||
GraphicObject from Graphic2d,
|
||||
Line from AIS,
|
||||
Point from AIS,
|
||||
Plane from Geom,
|
||||
@@ -109,11 +107,6 @@ is
|
||||
aPresentation: mutable Presentation from Prs3d)
|
||||
is redefined static private;
|
||||
|
||||
Compute(me:mutable;
|
||||
aPresentationManager: PresentationManager2d from PrsMgr;
|
||||
aPresentation: mutable GraphicObject from Graphic2d;
|
||||
aMode: Integer from Standard = 0)
|
||||
is redefined static private;
|
||||
|
||||
Compute(me : mutable;
|
||||
aProjector : Projector from Prs3d;
|
||||
|
@@ -19,8 +19,7 @@
|
||||
// and conditions governing the rights and limitations under the License.
|
||||
|
||||
|
||||
#define GER61351 //GG_171199 Enable to set an object RGB color
|
||||
// instead a restricted object NameOfColor.
|
||||
//GER61351 //GG_171199 Enable to set an object RGB color instead a restricted object NameOfColor.
|
||||
|
||||
#define OCC218 //SAV using DsgPrs_XYZAxisPresentation to draw axes.
|
||||
// + X/YAxis() returns AIS_Line instead of AIS_Axis
|
||||
@@ -280,13 +279,11 @@ void AIS_PlaneTrihedron::ComputeSelection(const Handle(SelectMgr_Selection)& aSe
|
||||
}
|
||||
|
||||
void AIS_PlaneTrihedron::SetColor(const Quantity_NameOfColor aCol)
|
||||
#ifdef GER61351
|
||||
{
|
||||
SetColor(Quantity_Color(aCol));
|
||||
}
|
||||
|
||||
void AIS_PlaneTrihedron::SetColor(const Quantity_Color &aCol)
|
||||
#endif
|
||||
{
|
||||
hasOwnColor=Standard_True;
|
||||
myOwnColor = aCol;
|
||||
@@ -294,15 +291,6 @@ void AIS_PlaneTrihedron::SetColor(const Quantity_Color &aCol)
|
||||
myDrawer->DatumAspect()->SecondAxisAspect()->SetColor(aCol);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Compute
|
||||
//purpose : to avoid warning
|
||||
//=======================================================================
|
||||
void AIS_PlaneTrihedron::Compute(const Handle(PrsMgr_PresentationManager2d)&,
|
||||
const Handle(Graphic2d_GraphicObject)&,
|
||||
const Standard_Integer)
|
||||
{
|
||||
}
|
||||
|
||||
void AIS_PlaneTrihedron::Compute(const Handle(Prs3d_Projector)&,
|
||||
const Handle(Prs3d_Presentation)&)
|
||||
|
@@ -36,8 +36,6 @@ uses
|
||||
Selection from SelectMgr,
|
||||
Projector from Prs3d,
|
||||
Transformation from Geom,
|
||||
PresentationManager2d from PrsMgr,
|
||||
GraphicObject from Graphic2d,
|
||||
Vertex from TopoDS,
|
||||
KindOfInteractive from AIS
|
||||
|
||||
@@ -75,13 +73,7 @@ is
|
||||
Compute(me:mutable;
|
||||
aProjector: Projector from Prs3d;
|
||||
aPresentation: mutable Presentation from Prs3d)
|
||||
is redefined static private;
|
||||
|
||||
Compute(me:mutable;
|
||||
aPresentationManager: PresentationManager2d from PrsMgr;
|
||||
aPresentation: mutable GraphicObject from Graphic2d;
|
||||
aMode: Integer from Standard = 0)
|
||||
is redefined static private;
|
||||
is redefined static private;
|
||||
|
||||
Compute(me : mutable;
|
||||
aProjector : Projector from Prs3d;
|
||||
|
@@ -168,15 +168,7 @@ TopoDS_Vertex AIS_Point::Vertex() const
|
||||
return BRepBuilderAPI_MakeVertex(P);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Compute
|
||||
//purpose : to avoid warning
|
||||
//=======================================================================
|
||||
void AIS_Point::Compute(const Handle(PrsMgr_PresentationManager2d)&,
|
||||
const Handle(Graphic2d_GraphicObject)&,
|
||||
const Standard_Integer)
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Compute
|
||||
//purpose : to avoid warning
|
||||
|
@@ -42,9 +42,7 @@ uses Shape from TopoDS,
|
||||
Lin from gp,
|
||||
Circ from gp,
|
||||
Projector from Prs3d,
|
||||
Transformation from Geom,
|
||||
PresentationManager2d from PrsMgr,
|
||||
GraphicObject from Graphic2d,
|
||||
Transformation from Geom,
|
||||
ExtendedString from TCollection,
|
||||
ArrowSide from DsgPrs,
|
||||
KindOfDimension from AIS
|
||||
@@ -114,12 +112,6 @@ is
|
||||
aProjector: Projector from Prs3d;
|
||||
aPresentation: mutable Presentation from Prs3d)
|
||||
is redefined static private;
|
||||
|
||||
Compute(me:mutable;
|
||||
aPresentationManager: PresentationManager2d from PrsMgr;
|
||||
aPresentation: mutable GraphicObject from Graphic2d;
|
||||
aMode: Integer from Standard = 0)
|
||||
is redefined static private;
|
||||
|
||||
Compute(me : mutable;
|
||||
aProjector : Projector from Prs3d;
|
||||
|
@@ -292,18 +292,6 @@ void AIS_RadiusDimension::Compute(const Handle(Prs3d_Projector)& aProjector,
|
||||
PrsMgr_PresentableObject::Compute( aProjector , aPresentation ) ;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Compute
|
||||
//purpose : to avoid warning
|
||||
//=======================================================================
|
||||
void AIS_RadiusDimension::Compute(const Handle(PrsMgr_PresentationManager2d)& aPresentationManager,
|
||||
const Handle(Graphic2d_GraphicObject)& aPresentation,
|
||||
const Standard_Integer aMode)
|
||||
{
|
||||
// Standard_NotImplemented::Raise("AIS_RadiusDimension::Compute(const Handle(PrsMgr_PresentationManager2d)& aPresentationManager,const Handle(Graphic2d_GraphicObject)& aPresentation,const Standard_Integer aMode)");
|
||||
PrsMgr_PresentableObject::Compute( aPresentationManager ,aPresentation,aMode) ;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Compute
|
||||
//purpose :
|
||||
|
@@ -19,14 +19,12 @@
|
||||
// and conditions governing the rights and limitations under the License.
|
||||
|
||||
|
||||
#define GER61351 //GG_171199 Enable to set an object RGB color
|
||||
// instead a restricted object NameOfColor.
|
||||
//GER61351 //GG_171199 Enable to set an object RGB color instead a restricted object NameOfColor.
|
||||
|
||||
#define BUC60915 //GG 05/06/01 Enable to compute the requested arrow size
|
||||
// if any in all dimensions.
|
||||
|
||||
#include <AIS.hxx>
|
||||
#include <Graphic3d_Array1OfVertex.hxx>
|
||||
#include <Graphic3d_Group.hxx>
|
||||
|
||||
#include <AIS_Relation.ixx>
|
||||
@@ -222,13 +220,11 @@ void AIS_Relation::ComputeProjVertexPresentation(const Handle(Prs3d_Presentation
|
||||
//=======================================================================
|
||||
|
||||
void AIS_Relation::SetColor(const Quantity_NameOfColor aCol)
|
||||
#ifdef GER61351
|
||||
{
|
||||
SetColor(Quantity_Color(aCol));
|
||||
}
|
||||
|
||||
void AIS_Relation::SetColor(const Quantity_Color &aCol)
|
||||
#endif
|
||||
{
|
||||
if(hasOwnColor && myOwnColor==aCol) return;
|
||||
|
||||
@@ -268,13 +264,9 @@ void AIS_Relation::UnsetColor()
|
||||
if (!hasOwnColor) return;
|
||||
hasOwnColor = Standard_False;
|
||||
const Handle(Prs3d_LineAspect)& LA = myDrawer->LineAspect();
|
||||
#ifdef GER61351
|
||||
Quantity_Color CC;
|
||||
AIS_GraphicTool::GetLineColor(myDrawer->Link(),AIS_TOA_Line,CC);
|
||||
LA->SetColor(CC);
|
||||
#else
|
||||
LA->SetColor(AIS_GraphicTool::GetLineColor(myDrawer->Link(),AIS_TOA_Line));
|
||||
#endif
|
||||
myDrawer->AngleAspect()->SetLineAspect(LA);
|
||||
myDrawer->LengthAspect()->SetLineAspect(LA);
|
||||
myDrawer->SetTextAspect(myDrawer->Link()->TextAspect());
|
||||
|
@@ -58,13 +58,11 @@ uses
|
||||
Box from Bnd,
|
||||
ShapeEnum from TopAbs,
|
||||
Shape from TopoDS,
|
||||
GraphicObject from Graphic2d,
|
||||
NameOfMaterial from Graphic3d ,
|
||||
---NameOfPhysicalMaterial from Graphic3d ,
|
||||
MaterialAspect from Graphic3d,
|
||||
Presentation from Prs3d,
|
||||
Projector from Prs3d,
|
||||
PresentationManager2d from PrsMgr,
|
||||
PresentationManager3d from PrsMgr,
|
||||
Selection from SelectMgr,
|
||||
KindOfInteractive from AIS,
|
||||
@@ -174,11 +172,6 @@ uses
|
||||
aMode : Integer from Standard = 0)
|
||||
is redefined virtual protected;
|
||||
|
||||
Compute(me : mutable;
|
||||
aPresentationManager : PresentationManager2d from PrsMgr;
|
||||
aPresentation : mutable GraphicObject from Graphic2d;aMode:Integer from Standard = 0)
|
||||
is redefined virtual protected;
|
||||
|
||||
Compute(me : mutable;
|
||||
aProjector : Projector from Prs3d;
|
||||
aPresentation : mutable Presentation from Prs3d)
|
||||
|
@@ -44,8 +44,7 @@
|
||||
#include <Graphic3d_AspectText3d.hxx>
|
||||
#include <Graphic3d_AspectMarker3d.hxx>
|
||||
#include <Graphic3d_AspectFillArea3d.hxx>
|
||||
#include <Graphic3d_Array1OfVertex.hxx>
|
||||
#include <Graphic3d_ArrayOfPrimitives.hxx>
|
||||
#include <Graphic3d_ArrayOfPolylines.hxx>
|
||||
#include <Graphic3d_MaterialAspect.hxx>
|
||||
|
||||
#include <Prs3d_Presentation.hxx>
|
||||
@@ -104,24 +103,18 @@ void AIS_Shape::DisplayBox(const Handle(Prs3d_Presentation)& aPrs,
|
||||
const Bnd_Box& B,
|
||||
const Handle(Prs3d_Drawer)& aDrawer)
|
||||
{
|
||||
Standard_Real X[2],Y[2],Z[2];
|
||||
Standard_Integer Indx [16] ;
|
||||
static const Standard_Integer Indx[][3] =
|
||||
{ { 0, 0, 0 }, { 1, 0, 0 }, { 1, 0, 1 }, { 0, 0, 1 },
|
||||
{ 0, 1, 1 }, { 1, 1, 1 }, { 1, 1, 0 }, { 0, 1, 0 },
|
||||
{ 0, 0, 0 }, { 0, 0, 1 }, { 1, 0, 1 }, { 1, 1, 1 },
|
||||
{ 0, 1, 1 }, { 0, 1, 0 }, { 1, 1, 0 }, { 1, 0, 0 } };
|
||||
|
||||
if ( B.IsVoid() )
|
||||
return; // nothing to show
|
||||
|
||||
Indx [0]=1;Indx [1]=2;Indx [2]=4;Indx [3]=3;
|
||||
Indx [4]=5;Indx [5]=6;Indx [6]=8;Indx [7]=7;
|
||||
Indx [8]=1;Indx [9]=3;Indx [10]=7;Indx [11]=5;
|
||||
Indx [12]=2;Indx [13]=4;Indx [14]=8;Indx [15]=6;
|
||||
Standard_Real X[2],Y[2],Z[2];
|
||||
B.Get(X[0], Y[0], Z[0], X[1], Y[1], Z[1]);
|
||||
|
||||
Graphic3d_Array1OfVertex V(1,8);
|
||||
Standard_Integer Rank(0);
|
||||
for(Standard_Integer k=0;k<=1;k++)
|
||||
for(Standard_Integer j=0;j<=1;j++)
|
||||
for(Standard_Integer i=0;i<=1;i++)
|
||||
V(++Rank) = Graphic3d_Vertex(X[i],Y[j],Z[k]);
|
||||
|
||||
Handle(Graphic3d_Group) G = Prs3d_Root::CurrentGroup(aPrs);
|
||||
Quantity_Color Q;
|
||||
Aspect_TypeOfLine A;
|
||||
@@ -130,16 +123,11 @@ void AIS_Shape::DisplayBox(const Handle(Prs3d_Presentation)& aPrs,
|
||||
|
||||
G->SetGroupPrimitivesAspect(new Graphic3d_AspectLine3d(Q,Aspect_TOL_DOTDASH,W));
|
||||
|
||||
G->BeginPrimitives();Standard_Integer I,J;
|
||||
Graphic3d_Array1OfVertex VVV (1,5);
|
||||
for(I=1;I<=4;I++){
|
||||
for(J=1;J<=4;J++){
|
||||
VVV.SetValue(J,V(Indx[J+4*I-5]));
|
||||
}
|
||||
VVV.SetValue(5,VVV(1));
|
||||
G->Polyline(VVV);
|
||||
}
|
||||
G->EndPrimitives();
|
||||
Handle(Graphic3d_ArrayOfPolylines) aPolyline = new Graphic3d_ArrayOfPolylines(16);
|
||||
Standard_Integer i(0);
|
||||
for(;i<16;i++)
|
||||
aPolyline->AddVertex(X[Indx[i][0]],Y[Indx[i][1]],Z[Indx[i][2]]);
|
||||
G->AddPrimitiveArray(aPolyline);
|
||||
}
|
||||
|
||||
static Standard_Boolean IsInList(const TColStd_ListOfInteger& LL, const Standard_Integer aMode)
|
||||
@@ -287,17 +275,6 @@ void AIS_Shape::Compute(const Handle(PrsMgr_PresentationManager3d)& /*aPresentat
|
||||
aPrs->ReCompute(); // for hidden line recomputation if necessary...
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Compute
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void AIS_Shape::Compute(const Handle(PrsMgr_PresentationManager2d)& /*aPresentationManager*/,
|
||||
const Handle(Graphic2d_GraphicObject)& /*aGRO*/,
|
||||
const Standard_Integer /*aMode*/)
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Compute
|
||||
//purpose : Hidden Line Removal
|
||||
|
@@ -34,9 +34,7 @@ uses Shape from TopoDS,
|
||||
Dir from gp,
|
||||
Pnt from gp,
|
||||
Projector from Prs3d,
|
||||
Transformation from Geom,
|
||||
PresentationManager2d from PrsMgr,
|
||||
GraphicObject from Graphic2d,
|
||||
Transformation from Geom,
|
||||
ExtendedString from TCollection,
|
||||
Plane from Geom
|
||||
|
||||
@@ -87,12 +85,6 @@ is
|
||||
aPresentation: mutable Presentation from Prs3d)
|
||||
is redefined static private;
|
||||
|
||||
Compute(me:mutable;
|
||||
aPresentationManager: PresentationManager2d from PrsMgr;
|
||||
aPresentation: mutable GraphicObject from Graphic2d;
|
||||
aMode: Integer from Standard = 0)
|
||||
is redefined static private;
|
||||
|
||||
Compute(me : mutable;
|
||||
aProjector : Projector from Prs3d;
|
||||
aTrsf : Transformation from Geom;
|
||||
|
@@ -141,19 +141,6 @@ void AIS_SymmetricRelation::Compute(const Handle(Prs3d_Projector)& /*aProjector*
|
||||
// PrsMgr_PresentableObject::Compute( aProjector , aPresentation ) ;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Compute
|
||||
//purpose : to avoid warning at compilation (SUN)
|
||||
//=======================================================================
|
||||
void AIS_SymmetricRelation::Compute
|
||||
(const Handle(PrsMgr_PresentationManager2d)& /*aPresentationManager2d*/,
|
||||
const Handle(Graphic2d_GraphicObject)& /*aGraphicObject*/,
|
||||
const Standard_Integer /*anInteger*/)
|
||||
{
|
||||
// Standard_NotImplemented::Raise("AIS_SymmetricRelation::Compute(const Handle(PrsMgr_PresentationManager2d)&,const Handle(Graphic2d_GraphicObject)&,const Standard_Integer)");
|
||||
// PrsMgr_PresentableObject::Compute( aPresentationManager2d ,aGraphicObject,anInteger) ;
|
||||
}
|
||||
|
||||
void AIS_SymmetricRelation::Compute(const Handle_Prs3d_Projector& aProjector,
|
||||
const Handle_Geom_Transformation& aTransformation,
|
||||
const Handle_Prs3d_Presentation& aPresentation)
|
||||
|
@@ -30,9 +30,7 @@ uses Shape from TopoDS,
|
||||
Pnt from gp,
|
||||
Dir from gp,
|
||||
Projector from Prs3d,
|
||||
Transformation from Geom,
|
||||
PresentationManager2d from PrsMgr,
|
||||
GraphicObject from Graphic2d,
|
||||
Transformation from Geom,
|
||||
Plane from Geom
|
||||
|
||||
is
|
||||
@@ -75,13 +73,7 @@ is
|
||||
Compute(me:mutable;
|
||||
aProjector: Projector from Prs3d;
|
||||
aPresentation: mutable Presentation from Prs3d)
|
||||
is redefined static private;
|
||||
|
||||
Compute(me:mutable;
|
||||
aPresentationManager: PresentationManager2d from PrsMgr;
|
||||
aPresentation: mutable GraphicObject from Graphic2d;
|
||||
aMode: Integer from Standard = 0)
|
||||
is redefined static private;
|
||||
is redefined static private;
|
||||
|
||||
Compute(me : mutable;
|
||||
aProjector : Projector from Prs3d;
|
||||
|
@@ -129,18 +129,6 @@ void AIS_TangentRelation::Compute(const Handle(Prs3d_Projector)& aProjector,
|
||||
PrsMgr_PresentableObject::Compute( aProjector , aPresentation ) ;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Compute
|
||||
//purpose : to avoid warning
|
||||
//=======================================================================
|
||||
void AIS_TangentRelation::Compute(const Handle(PrsMgr_PresentationManager2d)& aPresentationManager2d,
|
||||
const Handle(Graphic2d_GraphicObject)& aGraphicObject,
|
||||
const Standard_Integer anInteger)
|
||||
{
|
||||
// Standard_NotImplemented::Raise("AIS_TangentRelation::Compute(const Handle(PrsMgr_PresentationManager2d)&,const Handle(Graphic2d_GraphicObject)&,const Standard_Integer)");
|
||||
PrsMgr_PresentableObject::Compute( aPresentationManager2d ,aGraphicObject,anInteger) ;
|
||||
}
|
||||
|
||||
void AIS_TangentRelation::Compute(const Handle_Prs3d_Projector& aProjector,
|
||||
const Handle_Geom_Transformation& aTransformation,
|
||||
const Handle_Prs3d_Presentation& aPresentation)
|
||||
|
@@ -30,7 +30,6 @@
|
||||
#include <Graphic3d_Group.hxx>
|
||||
#include <Graphic3d_AspectFillArea3d.hxx>
|
||||
#include <Graphic3d_ArrayOfTriangles.hxx>
|
||||
#include <Graphic3d_ArrayOfPrimitives.hxx>
|
||||
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE(AIS_Triangulation, AIS_InteractiveObject)
|
||||
@@ -57,16 +56,11 @@ void AIS_Triangulation::Compute(const Handle(PrsMgr_PresentationManager3d)& aPre
|
||||
case 0:
|
||||
const TColgp_Array1OfPnt& nodes = myTriangulation->Nodes(); //Nodes
|
||||
const Poly_Array1OfTriangle& triangles = myTriangulation->Triangles(); //Triangle
|
||||
const TShort_Array1OfShortReal& normals = myTriangulation->Normals(); //Normal
|
||||
|
||||
Standard_Boolean hasVNormals = Standard_False;
|
||||
Standard_Boolean hasVColors = Standard_False;
|
||||
if( normals.Length() > 0 )
|
||||
hasVNormals = Standard_True;
|
||||
if( myFlagColor == 1 )
|
||||
hasVColors = Standard_True;
|
||||
Standard_Boolean hasVNormals = myTriangulation->HasNormals();
|
||||
Standard_Boolean hasVColors = (myFlagColor == 1);
|
||||
|
||||
Handle(Graphic3d_ArrayOfTriangles) array =
|
||||
Handle(Graphic3d_ArrayOfTriangles) anArray =
|
||||
new Graphic3d_ArrayOfTriangles ( myNbNodes, //maxVertexs
|
||||
myNbTriangles * 3,//maxEdges
|
||||
hasVNormals, //hasVNormals
|
||||
@@ -81,26 +75,57 @@ void AIS_Triangulation::Compute(const Handle(PrsMgr_PresentationManager3d)& aPre
|
||||
Standard_Integer j;
|
||||
|
||||
Standard_Real ambient = aspect->FrontMaterial().Ambient();
|
||||
for ( i = nodes.Lower(); i<= nodes.Upper(); i++ ){
|
||||
if( myFlagColor == 1 )
|
||||
array->AddVertex( nodes(i), AttenuateColor(myColor->Value(i),ambient));
|
||||
if( myFlagColor == 0 )
|
||||
array->AddVertex( nodes(i) );
|
||||
j = (i - nodes.Lower()) * 3;
|
||||
array->SetVertexNormal(i, normals(j+1), normals(j+2), normals(j+3));
|
||||
if (hasVNormals)
|
||||
{
|
||||
const TShort_Array1OfShortReal& normals = myTriangulation->Normals();
|
||||
if (hasVColors)
|
||||
{
|
||||
const TColStd_Array1OfInteger& colors = myColor->Array1();
|
||||
for ( i = nodes.Lower(); i <= nodes.Upper(); i++ )
|
||||
{
|
||||
j = (i - nodes.Lower()) * 3;
|
||||
anArray->AddVertex(nodes(i), AttenuateColor(colors(i), ambient));
|
||||
anArray->SetVertexNormal(i, normals(j+1), normals(j+2), normals(j+3));
|
||||
}
|
||||
}
|
||||
else // !hasVColors
|
||||
{
|
||||
for ( i = nodes.Lower(); i <= nodes.Upper(); i++ )
|
||||
{
|
||||
j = (i - nodes.Lower()) * 3;
|
||||
anArray->AddVertex(nodes(i));
|
||||
anArray->SetVertexNormal(i, normals(j+1), normals(j+2), normals(j+3));
|
||||
}
|
||||
}
|
||||
}
|
||||
else // !hasVNormals
|
||||
{
|
||||
if (hasVColors)
|
||||
{
|
||||
const TColStd_Array1OfInteger& colors = myColor->Array1();
|
||||
for ( i = nodes.Lower(); i <= nodes.Upper(); i++ )
|
||||
{
|
||||
anArray->AddVertex(nodes(i), AttenuateColor(colors(i), ambient));
|
||||
}
|
||||
}
|
||||
else // !hasVColors
|
||||
{
|
||||
for ( i = nodes.Lower(); i <= nodes.Upper(); i++ )
|
||||
{
|
||||
anArray->AddVertex(nodes(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Standard_Integer indexTriangle[3] = {0,0,0};
|
||||
for ( i = triangles.Lower(); i<= triangles.Upper(); i++ ) {
|
||||
triangles(i).Get(indexTriangle[0], indexTriangle[1], indexTriangle[2]);
|
||||
array->AddEdge(indexTriangle[0]);
|
||||
array->AddEdge(indexTriangle[1]);
|
||||
array->AddEdge(indexTriangle[2]);
|
||||
anArray->AddEdge(indexTriangle[0]);
|
||||
anArray->AddEdge(indexTriangle[1]);
|
||||
anArray->AddEdge(indexTriangle[2]);
|
||||
}
|
||||
TheGroup->SetPrimitivesAspect(aspect);
|
||||
TheGroup->BeginPrimitives();
|
||||
TheGroup->AddPrimitiveArray(array);
|
||||
TheGroup->EndPrimitives();
|
||||
TheGroup->AddPrimitiveArray(anArray);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user