diff --git a/samples/mfc/standard/01_Geometry/src/StdAfx.h b/samples/mfc/standard/01_Geometry/src/StdAfx.h index 605e1331a1..195d2b801b 100755 --- a/samples/mfc/standard/01_Geometry/src/StdAfx.h +++ b/samples/mfc/standard/01_Geometry/src/StdAfx.h @@ -186,7 +186,6 @@ #include #include #include -#include #include #include #include diff --git a/samples/mfc/standard/Common/Primitive/Sample2D_Markers.h b/samples/mfc/standard/Common/Primitive/Sample2D_Markers.h index 007f027744..d500007220 100755 --- a/samples/mfc/standard/Common/Primitive/Sample2D_Markers.h +++ b/samples/mfc/standard/Common/Primitive/Sample2D_Markers.h @@ -3,7 +3,6 @@ #include #include -#include #include class Sample2D_Markers; DEFINE_STANDARD_HANDLE(Sample2D_Markers,AIS_InteractiveObject) diff --git a/samples/mfc/standard/Common/StdAfx.h b/samples/mfc/standard/Common/StdAfx.h index b9d73fb59b..4eb9b892e2 100755 --- a/samples/mfc/standard/Common/StdAfx.h +++ b/samples/mfc/standard/Common/StdAfx.h @@ -55,7 +55,6 @@ #include #include #include -#include #include #include #include diff --git a/samples/mfc/standard/Common/User_Cylinder.cxx b/samples/mfc/standard/Common/User_Cylinder.cxx index 6803bc7542..c3084edb45 100755 --- a/samples/mfc/standard/Common/User_Cylinder.cxx +++ b/samples/mfc/standard/Common/User_Cylinder.cxx @@ -18,7 +18,6 @@ IMPLEMENT_STANDARD_RTTIEXT(User_Cylinder,AIS_InteractiveObject) #include #include #include -#include #include #include #include diff --git a/src/Graphic3d/FILES b/src/Graphic3d/FILES index 0603ed871d..5bc030e7bd 100755 --- a/src/Graphic3d/FILES +++ b/src/Graphic3d/FILES @@ -1,6 +1,3 @@ -Graphic3d_Array1OfVector.hxx -Graphic3d_Array1OfVertex.hxx -Graphic3d_Array2OfVertex.hxx Graphic3d_ArrayOfPoints.cxx Graphic3d_ArrayOfPoints.hxx Graphic3d_ArrayOfPolygons.cxx @@ -40,21 +37,14 @@ Graphic3d_Buffer.hxx Graphic3d_BufferType.hxx Graphic3d_Camera.cxx Graphic3d_Camera.hxx -Graphic3d_CBitFields4.hxx -Graphic3d_CBitFields8.hxx -Graphic3d_CBitFields16.hxx -Graphic3d_CBitFields20.hxx Graphic3d_CLight.hxx Graphic3d_ClipPlane.cxx Graphic3d_ClipPlane.hxx Graphic3d_CStructure.cxx Graphic3d_CStructure.hxx -Graphic3d_CStructurePtr.hxx Graphic3d_CTexture.hxx Graphic3d_CView.cxx Graphic3d_CView.hxx -Graphic3d_CycleError.hxx -Graphic3d_DataStructure.pxx Graphic3d_DataStructureManager.cxx Graphic3d_DataStructureManager.hxx Graphic3d_ExportFormat.hxx @@ -66,13 +56,9 @@ Graphic3d_Group.hxx Graphic3d_GroupAspect.hxx Graphic3d_GroupDefinitionError.hxx Graphic3d_HorizontalTextAlignment.hxx -Graphic3d_HSequenceOfStructure.hxx Graphic3d_IndexBuffer.hxx Graphic3d_IndexedMapOfAddress.hxx -Graphic3d_InitialisationError.hxx Graphic3d_LevelOfTextureAnisotropy.hxx -Graphic3d_ListIteratorOfListOfShortReal.hxx -Graphic3d_ListOfShortReal.hxx Graphic3d_MapIteratorOfMapOfStructure.hxx Graphic3d_MapOfObject.hxx Graphic3d_MapOfStructure.hxx @@ -88,7 +74,6 @@ Graphic3d_NameOfTexture1D.hxx Graphic3d_NameOfTexture2D.hxx Graphic3d_NameOfTextureEnv.hxx Graphic3d_NameOfTexturePlane.hxx -Graphic3d_NListOfHAsciiString.hxx Graphic3d_NMapOfTransient.hxx Graphic3d_PolygonOffset.hxx Graphic3d_PriorityDefinitionError.hxx @@ -115,8 +100,6 @@ Graphic3d_Structure.pxx Graphic3d_StructureDefinitionError.hxx Graphic3d_StructureManager.cxx Graphic3d_StructureManager.hxx -Graphic3d_StructureManagerPtr.hxx -Graphic3d_StructurePtr.hxx Graphic3d_TextPath.hxx Graphic3d_Texture1D.cxx Graphic3d_Texture1D.hxx @@ -149,8 +132,6 @@ Graphic3d_TypeOfComposition.hxx Graphic3d_TypeOfConnection.hxx Graphic3d_TypeOfLightSource.hxx Graphic3d_TypeOfMaterial.hxx -Graphic3d_TypeOfPolygon.hxx -Graphic3d_TypeOfPrimitive.hxx Graphic3d_TypeOfPrimitiveArray.hxx Graphic3d_TypeOfReflection.hxx Graphic3d_TypeOfShaderObject.hxx diff --git a/src/Graphic3d/Graphic3d_Array1OfVector.hxx b/src/Graphic3d/Graphic3d_Array1OfVector.hxx deleted file mode 100644 index 421f1b29b9..0000000000 --- a/src/Graphic3d/Graphic3d_Array1OfVector.hxx +++ /dev/null @@ -1,26 +0,0 @@ -// Created on: 1993-03-31 -// Created by: NW,JPB,CAL -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef Graphic3d_Array1OfVector_HeaderFile -#define Graphic3d_Array1OfVector_HeaderFile - -#include -#include - -typedef NCollection_Array1 Graphic3d_Array1OfVector; - - -#endif diff --git a/src/Graphic3d/Graphic3d_Array1OfVertex.hxx b/src/Graphic3d/Graphic3d_Array1OfVertex.hxx deleted file mode 100644 index 86d8da4064..0000000000 --- a/src/Graphic3d/Graphic3d_Array1OfVertex.hxx +++ /dev/null @@ -1,26 +0,0 @@ -// Created on: 1993-03-31 -// Created by: NW,JPB,CAL -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef Graphic3d_Array1OfVertex_HeaderFile -#define Graphic3d_Array1OfVertex_HeaderFile - -#include -#include - -typedef NCollection_Array1 Graphic3d_Array1OfVertex; - - -#endif diff --git a/src/Graphic3d/Graphic3d_Array2OfVertex.hxx b/src/Graphic3d/Graphic3d_Array2OfVertex.hxx deleted file mode 100644 index 5e1e82dc7e..0000000000 --- a/src/Graphic3d/Graphic3d_Array2OfVertex.hxx +++ /dev/null @@ -1,26 +0,0 @@ -// Created on: 1993-03-31 -// Created by: NW,JPB,CAL -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef Graphic3d_Array2OfVertex_HeaderFile -#define Graphic3d_Array2OfVertex_HeaderFile - -#include -#include - -typedef NCollection_Array2 Graphic3d_Array2OfVertex; - - -#endif diff --git a/src/Graphic3d/Graphic3d_ArrayOfPrimitives.cxx b/src/Graphic3d/Graphic3d_ArrayOfPrimitives.cxx index ab3abb724c..6fe98f0f3e 100644 --- a/src/Graphic3d/Graphic3d_ArrayOfPrimitives.cxx +++ b/src/Graphic3d/Graphic3d_ArrayOfPrimitives.cxx @@ -12,13 +12,12 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include #include -#include #include -#include #include #include #include diff --git a/src/Graphic3d/Graphic3d_ArrayOfPrimitives.hxx b/src/Graphic3d/Graphic3d_ArrayOfPrimitives.hxx index 271f4cdf86..3a473922e1 100644 --- a/src/Graphic3d/Graphic3d_ArrayOfPrimitives.hxx +++ b/src/Graphic3d/Graphic3d_ArrayOfPrimitives.hxx @@ -30,7 +30,6 @@ #include #include class Standard_OutOfRange; -class Graphic3d_InitialisationError; class Graphic3d_Group; class gp_Pnt; class Quantity_Color; diff --git a/src/Graphic3d/Graphic3d_CBitFields16.hxx b/src/Graphic3d/Graphic3d_CBitFields16.hxx deleted file mode 100644 index e782ff9315..0000000000 --- a/src/Graphic3d/Graphic3d_CBitFields16.hxx +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) 1995-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -/*============================================================================*/ -/*==== Titre: Graphic3d_CBitFields16.hxx */ -/*==== Role : The header file of primitive type "CBitFields16" from Graphic3d */ -/*==== */ -/*==== Implementation: This is a primitive type implemented with typedef */ -/*============================================================================*/ - -#ifndef _Graphic3d_CBitFields16_HeaderFile -#define _Graphic3d_CBitFields16_HeaderFile - -typedef struct { - - unsigned bool1 :1; - unsigned bool2 :1; - unsigned bool3 :1; - unsigned bool4 :1; - - unsigned bool5 :1; - unsigned bool6 :1; - unsigned bool7 :1; - unsigned bool8 :1; - - unsigned bool9 :1; - unsigned bool10 :1; - unsigned bool11 :1; - unsigned bool12 :1; - - unsigned bool13 :1; - unsigned bool14 :1; - unsigned bool15 :1; - unsigned bool16 :1; - -} Graphic3d_CBitFields16; - -#endif /*Graphic3d_CBitFields16_HeaderFile*/ diff --git a/src/Graphic3d/Graphic3d_CBitFields20.hxx b/src/Graphic3d/Graphic3d_CBitFields20.hxx deleted file mode 100644 index baae724cb0..0000000000 --- a/src/Graphic3d/Graphic3d_CBitFields20.hxx +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) 1995-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -/*============================================================================*/ -/*==== Titre: Graphic3d_CBitFields20.hxx */ -/*==== Role : The header file of primitive type "CBitFields20" from Graphic3d */ -/*==== */ -/*==== Implementation: This is a primitive type implemented with typedef */ -/*============================================================================*/ - -#ifndef _Graphic3d_CBitFields20_HeaderFile -#define _Graphic3d_CBitFields20_HeaderFile - -typedef struct { - - unsigned bool1 :1; - unsigned bool2 :1; - unsigned bool3 :1; - unsigned bool4 :1; - - unsigned bool5 :1; - unsigned bool6 :1; - unsigned bool7 :1; - unsigned bool8 :1; - - unsigned bool9 :1; - unsigned bool10 :1; - unsigned bool11 :1; - unsigned bool12 :1; - - unsigned bool13 :1; - unsigned bool14 :1; - unsigned bool15 :1; - unsigned bool16 :1; - - unsigned bool17 :1; - unsigned bool18 :1; - unsigned bool19 :1; - unsigned bool20 :1; - -} Graphic3d_CBitFields20; - -#endif /*Graphic3d_CBitFields20_HeaderFile*/ diff --git a/src/Graphic3d/Graphic3d_CBitFields4.hxx b/src/Graphic3d/Graphic3d_CBitFields4.hxx deleted file mode 100644 index 1ed61a0804..0000000000 --- a/src/Graphic3d/Graphic3d_CBitFields4.hxx +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 1995-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -/*===========================================================================*/ -/*==== Titre: Graphic3d_CBitFields4.hxx */ -/*==== Role : The header file of primitive type "CBitFields4" from Graphic3d */ -/*==== */ -/*==== Implementation: This is a primitive type implemented with typedef */ -/*===========================================================================*/ - -#ifndef _Graphic3d_CBitFields4_HeaderFile -#define _Graphic3d_CBitFields4_HeaderFile - -typedef struct { - - unsigned bool1 :1; - unsigned bool2 :1; - unsigned bool3 :1; - unsigned bool4 :1; - -} Graphic3d_CBitFields4; - -#endif /*Graphic3d_CBitFields4_HeaderFile*/ diff --git a/src/Graphic3d/Graphic3d_CBitFields8.hxx b/src/Graphic3d/Graphic3d_CBitFields8.hxx deleted file mode 100644 index ceeef3a4aa..0000000000 --- a/src/Graphic3d/Graphic3d_CBitFields8.hxx +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 1995-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -/*===========================================================================*/ -/*==== Titre: Graphic3d_CBitFields8.hxx */ -/*==== Role : The header file of primitive type "CBitFields8" from Graphic3d */ -/*==== */ -/*==== Implementation: This is a primitive type implemented with typedef */ -/*===========================================================================*/ - -#ifndef _Graphic3d_CBitFields8_HeaderFile -#define _Graphic3d_CBitFields8_HeaderFile - -typedef struct { - - unsigned bool1 :1; - unsigned bool2 :1; - unsigned bool3 :1; - unsigned bool4 :1; - - unsigned bool5 :1; - unsigned bool6 :1; - unsigned bool7 :1; - unsigned bool8 :1; - -} Graphic3d_CBitFields8; - -#endif /*Graphic3d_CBitFields8_HeaderFile*/ diff --git a/src/Graphic3d/Graphic3d_CStructurePtr.hxx b/src/Graphic3d/Graphic3d_CStructurePtr.hxx deleted file mode 100644 index 5bb0a93714..0000000000 --- a/src/Graphic3d/Graphic3d_CStructurePtr.hxx +++ /dev/null @@ -1,23 +0,0 @@ -// Created on: 1993-03-31 -// Created by: NW,JPB,CAL -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _Graphic3d_CStructurePtr_HeaderFile -#define _Graphic3d_CStructurePtr_HeaderFile - -class Graphic3d_CStructure; -typedef Graphic3d_CStructure* Graphic3d_CStructurePtr; - -#endif // _Graphic3d_CStructurePtr_HeaderFile diff --git a/src/Graphic3d/Graphic3d_CView.hxx b/src/Graphic3d/Graphic3d_CView.hxx index 94913a7238..414004844a 100644 --- a/src/Graphic3d/Graphic3d_CView.hxx +++ b/src/Graphic3d/Graphic3d_CView.hxx @@ -35,7 +35,6 @@ #include #include #include -#include #include #include #include diff --git a/src/Graphic3d/Graphic3d_CycleError.hxx b/src/Graphic3d/Graphic3d_CycleError.hxx deleted file mode 100644 index 2abd06b4a2..0000000000 --- a/src/Graphic3d/Graphic3d_CycleError.hxx +++ /dev/null @@ -1,37 +0,0 @@ -// Created on: 1993-03-31 -// Created by: NW,JPB,CAL -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _Graphic3d_CycleError_HeaderFile -#define _Graphic3d_CycleError_HeaderFile - -#include -#include -#include -#include - -class Graphic3d_CycleError; -DEFINE_STANDARD_HANDLE(Graphic3d_CycleError, Standard_DomainError) - -#if !defined No_Exception && !defined No_Graphic3d_CycleError - #define Graphic3d_CycleError_Raise_if(CONDITION, MESSAGE) \ - if (CONDITION) Graphic3d_CycleError::Raise(MESSAGE); -#else - #define Graphic3d_CycleError_Raise_if(CONDITION, MESSAGE) -#endif - -DEFINE_STANDARD_EXCEPTION(Graphic3d_CycleError, Standard_DomainError) - -#endif // _Graphic3d_CycleError_HeaderFile diff --git a/src/Graphic3d/Graphic3d_DataStructure.pxx b/src/Graphic3d/Graphic3d_DataStructure.pxx deleted file mode 100644 index b883300be2..0000000000 --- a/src/Graphic3d/Graphic3d_DataStructure.pxx +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 1995-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef DATASTRUCTURE_PXX_INCLUDED -#define DATASTRUCTURE_PXX_INCLUDED - -#define Graphic3d_DataStructure_Move_Code 1 -#define Graphic3d_DataStructure_Draw_Code 2 - -#define Graphic3d_DataStructure_Color_Code 3 -#define Graphic3d_DataStructure_Type_Code 4 -#define Graphic3d_DataStructure_Width_Code 5 - -#define MyProjectionFlag MyCBitFields.bool1 -#define IAmDisplayed MyCBitFields.bool2 -#define IAmOpened MyCBitFields.bool3 -#define MyContainsFacet MyCBitFields.bool4 - -#endif diff --git a/src/Graphic3d/Graphic3d_Group.cxx b/src/Graphic3d/Graphic3d_Group.cxx index 26aa68ccc9..0bb8b1d1d7 100644 --- a/src/Graphic3d/Graphic3d_Group.cxx +++ b/src/Graphic3d/Graphic3d_Group.cxx @@ -13,6 +13,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include #include #include @@ -23,7 +24,6 @@ #include #include #include -#include #include #include #include @@ -41,29 +41,26 @@ IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_Group,MMgt_TShared) -#define MyContainsFacet myCBitFields.bool2 - // ======================================================================= // function : Graphic3d_Group // purpose : // ======================================================================= Graphic3d_Group::Graphic3d_Group (const Handle(Graphic3d_Structure)& theStruct) -: myIsClosed (Standard_False) +: myStructure (theStruct.operator->()), + myIsClosed (false), + myContainsFacet (false) { - // A small commentary on the usage of This! // - // Graphic3d_Group is created in a structure. Graphic3d_Structure is a - // manager of Graphic3d_Group. In the constructor of Graphic3d_Group - // a method Add of Graphic3d_Structure is called. It allows adding - // the instance of Graphic3d_Group in its manager. So there are 2 references - // to and everything works well. - // - // This () is the instance of the class, the current group - //Handle(Graphic3d_Group) me = Handle(Graphic3d_Group)::DownCast (This()); +} - myStructure = theStruct.operator->(); - - MyContainsFacet = Standard_False; +// ======================================================================= +// function : ~Graphic3d_Group +// purpose : +// ======================================================================= +Graphic3d_Group::~Graphic3d_Group() +{ + // tell graphics driver to clear internal resources of the group + Clear (Standard_False); } // ======================================================================= @@ -79,10 +76,10 @@ void Graphic3d_Group::Clear (Standard_Boolean theUpdateStructureMgr) myBounds.Clear(); - if (MyContainsFacet) + if (myContainsFacet) { myStructure->GroupsWithFacet (-1); - MyContainsFacet = Standard_False; + myContainsFacet = false; } // clear method could be used on Graphic3d_Structure destruction, @@ -94,16 +91,6 @@ void Graphic3d_Group::Clear (Standard_Boolean theUpdateStructureMgr) } } -// ======================================================================= -// function : Destroy -// purpose : -// ======================================================================= -void Graphic3d_Group::Destroy() -{ - // tell graphics driver to clear internal resources of the group - Clear (Standard_False); -} - // ======================================================================= // function : Remove // purpose : @@ -115,10 +102,10 @@ void Graphic3d_Group::Remove() return; } - if (MyContainsFacet) + if (myContainsFacet) { myStructure->GroupsWithFacet (-1); - MyContainsFacet = Standard_False; + myContainsFacet = false; } myStructure->Remove (this); @@ -137,15 +124,6 @@ Standard_Boolean Graphic3d_Group::IsDeleted() const || myStructure->IsDeleted(); } -// ======================================================================= -// function : ContainsFacet -// purpose : -// ======================================================================= -Standard_Boolean Graphic3d_Group::ContainsFacet() const -{ - return MyContainsFacet; -} - // ======================================================================= // function : IsEmpty // purpose : @@ -178,17 +156,6 @@ void Graphic3d_Group::SetMinMaxValues (const Standard_Real theXMin, const Standa 1.0f)); } -// ======================================================================= -// function : MinMaxValues -// purpose : -// ======================================================================= -void Graphic3d_Group::MinMaxValues (Standard_Real& theXMin, Standard_Real& theYMin, Standard_Real& theZMin, - Standard_Real& theXMax, Standard_Real& theYMax, Standard_Real& theZMax) const -{ - MinMaxCoord (theXMin, theYMin, theZMin, - theXMax, theYMax, theZMax); -} - // ======================================================================= // function : Structure // purpose : @@ -199,11 +166,11 @@ Handle(Graphic3d_Structure) Graphic3d_Group::Structure() const } // ======================================================================= -// function : MinMaxCoord +// function : MinMaxValues // purpose : // ======================================================================= -void Graphic3d_Group::MinMaxCoord (Standard_Real& theXMin, Standard_Real& theYMin, Standard_Real& theZMin, - Standard_Real& theXMax, Standard_Real& theYMax, Standard_Real& theZMax) const +void Graphic3d_Group::MinMaxValues (Standard_Real& theXMin, Standard_Real& theYMin, Standard_Real& theZMin, + Standard_Real& theXMax, Standard_Real& theYMax, Standard_Real& theZMax) const { if (IsEmpty()) { @@ -306,18 +273,6 @@ void Graphic3d_Group::GroupPrimitivesAspect (const Handle(Graphic3d_AspectLine3d } } -// ======================================================================= -// function : PrimitivesAspect -// purpose : -// ======================================================================= -void Graphic3d_Group::PrimitivesAspect (const Handle(Graphic3d_AspectLine3d)& theAspLine, - const Handle(Graphic3d_AspectText3d)& theAspText, - const Handle(Graphic3d_AspectMarker3d)& theAspMarker, - const Handle(Graphic3d_AspectFillArea3d)& theAspFill) const -{ - GroupPrimitivesAspect (theAspLine, theAspText, theAspMarker, theAspFill); -} - // ======================================================================= // function : AddPrimitiveArray // purpose : @@ -350,13 +305,13 @@ void Graphic3d_Group::AddPrimitiveArray (const Graphic3d_TypeOfPrimitiveArray th return; } - if (!MyContainsFacet + if (!myContainsFacet && theType != Graphic3d_TOPA_POLYLINES && theType != Graphic3d_TOPA_SEGMENTS && theType != Graphic3d_TOPA_POINTS) { myStructure->GroupsWithFacet (1); - MyContainsFacet = Standard_True; + myContainsFacet = true; } if (theToEvalMinMax) diff --git a/src/Graphic3d/Graphic3d_Group.hxx b/src/Graphic3d/Graphic3d_Group.hxx index d527aaa985..88b8144848 100644 --- a/src/Graphic3d/Graphic3d_Group.hxx +++ b/src/Graphic3d/Graphic3d_Group.hxx @@ -20,8 +20,6 @@ #include #include -#include -#include #include #include #include @@ -46,14 +44,8 @@ #include class Graphic3d_Structure; -class Graphic3d_GroupDefinitionError; -class Standard_OutOfRange; class Graphic3d_ArrayOfPrimitives; - -class Graphic3d_Group; -DEFINE_STANDARD_HANDLE(Graphic3d_Group, MMgt_TShared) - //! This class allows the definition of groups //! of primitives inside of graphic objects (presentations). //! A group contains the primitives and attributes @@ -86,10 +78,11 @@ DEFINE_STANDARD_HANDLE(Graphic3d_Group, MMgt_TShared) //! that is extended by the descendant class in OpenGl package. class Graphic3d_Group : public MMgt_TShared { + friend class Graphic3d_Structure; + DEFINE_STANDARD_RTTIEXT(Graphic3d_Group,MMgt_TShared) public: - //! Supress all primitives and attributes of . //! To clear group without update in Graphic3d_StructureManager //! pass Standard_False as . This @@ -100,11 +93,7 @@ public: Standard_EXPORT virtual void Clear (const Standard_Boolean theUpdateStructureMgr = Standard_True); //! Supress the group in the structure. - Standard_EXPORT void Destroy(); -~Graphic3d_Group() -{ - Destroy(); -} + Standard_EXPORT virtual ~Graphic3d_Group(); //! Supress the group in the structure. //! Warning: No more graphic operations in after this call. @@ -112,6 +101,8 @@ public: //! Get the current modelling transform persistence (pan, zoom or rotate) Standard_EXPORT void Remove(); +public: + //! Return line aspect. virtual Handle(Graphic3d_AspectLine3d) LineAspect() const = 0; @@ -156,9 +147,25 @@ public: //! after this call in the group. virtual void SetPrimitivesAspect (const Handle(Graphic3d_AspectMarker3d)& theAspect) = 0; - //! Sets the coordinates of the boundary box of the - //! group . - Standard_EXPORT void SetMinMaxValues (const Standard_Real XMin, const Standard_Real YMin, const Standard_Real ZMin, const Standard_Real XMax, const Standard_Real YMax, const Standard_Real ZMax); + //! Returns TRUE if aspect is set for the group. + Standard_EXPORT Standard_Boolean IsGroupPrimitivesAspectSet (const Graphic3d_GroupAspect theAspect) const; + + //! Returns the context of all the primitives of the group. + Standard_EXPORT void GroupPrimitivesAspect (const Handle(Graphic3d_AspectLine3d)& theAspLine, + const Handle(Graphic3d_AspectText3d)& theAspText, + const Handle(Graphic3d_AspectMarker3d)& theAspMarker, + const Handle(Graphic3d_AspectFillArea3d)& theAspFill) const; + + //! Returns the last inserted context in the group for each kind of primitives. + void PrimitivesAspect (const Handle(Graphic3d_AspectLine3d)& theAspLine, + const Handle(Graphic3d_AspectText3d)& theAspText, + const Handle(Graphic3d_AspectMarker3d)& theAspMarker, + const Handle(Graphic3d_AspectFillArea3d)& theAspFill) const + { + GroupPrimitivesAspect (theAspLine, theAspText, theAspMarker, theAspFill); + } + +public: //! Creates the string at position . //! The 3D point of attachment is projected. The text is @@ -246,25 +253,16 @@ public: //! Creates a primitive array with single marker using AddPrimitiveArray(). Standard_EXPORT void Marker (const Graphic3d_Vertex& thePoint, const Standard_Boolean theToEvalMinMax = Standard_True); +public: + //! sets the stencil test to theIsEnabled state; Standard_EXPORT virtual void SetStencilTestOptions (const Standard_Boolean theIsEnabled) = 0; //! sets the flipping to theIsEnabled state. Standard_EXPORT virtual void SetFlippingOptions (const Standard_Boolean theIsEnabled, const gp_Ax2& theRefPlane) = 0; - //! Returns TRUE if aspect is set for the group. - Standard_EXPORT Standard_Boolean IsGroupPrimitivesAspectSet (const Graphic3d_GroupAspect theAspect) const; - - //! Returns the context of all the primitives of the group. - Standard_EXPORT void GroupPrimitivesAspect (const Handle(Graphic3d_AspectLine3d)& CTXL, const Handle(Graphic3d_AspectText3d)& CTXT, const Handle(Graphic3d_AspectMarker3d)& CTXM, const Handle(Graphic3d_AspectFillArea3d)& CTXF) const; - - //! Returns the last inserted context in the group - //! foreach kind of primitives. - Standard_EXPORT void PrimitivesAspect (const Handle(Graphic3d_AspectLine3d)& CTXL, const Handle(Graphic3d_AspectText3d)& CTXT, const Handle(Graphic3d_AspectMarker3d)& CTXM, const Handle(Graphic3d_AspectFillArea3d)& CTXF) const; - - //! Returns Standard_True if the group contains - //! Polygons, Triangles or Quadrangles. - Standard_EXPORT Standard_Boolean ContainsFacet() const; + //! Returns true if the group contains Polygons, Triangles or Quadrangles. + bool ContainsFacet() const { return myContainsFacet; } //! Returns Standard_True if the group is deleted. //! is deleted after the call Remove (me) or the @@ -274,9 +272,13 @@ public: //! Returns Standard_True if the group is empty. Standard_EXPORT Standard_Boolean IsEmpty() const; - //! Returns the coordinates of the boundary box of the - //! group . - Standard_EXPORT void MinMaxValues (Standard_Real& XMin, Standard_Real& YMin, Standard_Real& ZMin, Standard_Real& XMax, Standard_Real& YMax, Standard_Real& ZMax) const; + //! Returns the coordinates of the boundary box of the group. + Standard_EXPORT void MinMaxValues (Standard_Real& theXMin, Standard_Real& theYMin, Standard_Real& theZMin, + Standard_Real& theXMax, Standard_Real& theYMax, Standard_Real& theZMax) const; + + //! Sets the coordinates of the boundary box of the group. + Standard_EXPORT void SetMinMaxValues (const Standard_Real theXMin, const Standard_Real theYMin, const Standard_Real theZMin, + const Standard_Real theXMax, const Standard_Real theYMax, const Standard_Real theZMax); //! Returns boundary box of the group without transformation applied, const Graphic3d_BndBox4f& BoundingBox() const { return myBounds; } @@ -293,40 +295,24 @@ public: //! Return true if primitive arrays within this graphic group form closed volume (do no contain open shells). bool IsClosed() const { return myIsClosed; } -friend class Graphic3d_Structure; - - - DEFINE_STANDARD_RTTIEXT(Graphic3d_Group,MMgt_TShared) - protected: - //! Creates a group in the structure . Standard_EXPORT Graphic3d_Group(const Handle(Graphic3d_Structure)& theStructure); - Graphic3d_CBitFields4 myCBitFields; - Graphic3d_StructurePtr myStructure; - Graphic3d_BndBox4f myBounds; - bool myIsClosed; - -protected: - - - //! Returns the extreme coordinates found in the group. - Standard_EXPORT void MinMaxCoord (Standard_Real& XMin, Standard_Real& YMin, Standard_Real& ZMin, Standard_Real& XMax, Standard_Real& YMax, Standard_Real& ZMax) const; - //! Calls the Update method of the StructureManager which //! contains the associated Structure of the Group . Standard_EXPORT void Update() const; +protected: + Graphic3d_Structure* myStructure; //!< pointer to the parent structure + Graphic3d_BndBox4f myBounds; //!< bounding box + bool myIsClosed; //!< flag indicating closed volume + bool myContainsFacet; //!< flag indicating that this group contains face primitives }; - - - - - +DEFINE_STANDARD_HANDLE(Graphic3d_Group, MMgt_TShared) #endif // _Graphic3d_Group_HeaderFile diff --git a/src/Graphic3d/Graphic3d_HSequenceOfStructure.hxx b/src/Graphic3d/Graphic3d_HSequenceOfStructure.hxx deleted file mode 100644 index 843337fb01..0000000000 --- a/src/Graphic3d/Graphic3d_HSequenceOfStructure.hxx +++ /dev/null @@ -1,27 +0,0 @@ -// Created on: 1993-03-31 -// Created by: NW,JPB,CAL -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef Graphic3d_HSequenceOfStructure_HeaderFile -#define Graphic3d_HSequenceOfStructure_HeaderFile - -#include -#include -#include - -DEFINE_HSEQUENCE(Graphic3d_HSequenceOfStructure, Graphic3d_SequenceOfStructure) - - -#endif diff --git a/src/Graphic3d/Graphic3d_InitialisationError.hxx b/src/Graphic3d/Graphic3d_InitialisationError.hxx deleted file mode 100644 index a9e198a0c4..0000000000 --- a/src/Graphic3d/Graphic3d_InitialisationError.hxx +++ /dev/null @@ -1,37 +0,0 @@ -// Created on: 1993-03-31 -// Created by: NW,JPB,CAL -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _Graphic3d_InitialisationError_HeaderFile -#define _Graphic3d_InitialisationError_HeaderFile - -#include -#include -#include -#include - -class Graphic3d_InitialisationError; -DEFINE_STANDARD_HANDLE(Graphic3d_InitialisationError, Standard_OutOfRange) - -#if !defined No_Exception && !defined No_Graphic3d_InitialisationError - #define Graphic3d_InitialisationError_Raise_if(CONDITION, MESSAGE) \ - if (CONDITION) Graphic3d_InitialisationError::Raise(MESSAGE); -#else - #define Graphic3d_InitialisationError_Raise_if(CONDITION, MESSAGE) -#endif - -DEFINE_STANDARD_EXCEPTION(Graphic3d_InitialisationError, Standard_OutOfRange) - -#endif // _Graphic3d_InitialisationError_HeaderFile diff --git a/src/Graphic3d/Graphic3d_ListIteratorOfListOfShortReal.hxx b/src/Graphic3d/Graphic3d_ListIteratorOfListOfShortReal.hxx deleted file mode 100644 index 06dd588a8e..0000000000 --- a/src/Graphic3d/Graphic3d_ListIteratorOfListOfShortReal.hxx +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2015 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - - -#ifndef Graphic3d_ListIteratorOfListOfShortReal_HeaderFile -#define Graphic3d_ListIteratorOfListOfShortReal_HeaderFile - -#include - -#endif diff --git a/src/Graphic3d/Graphic3d_ListOfShortReal.hxx b/src/Graphic3d/Graphic3d_ListOfShortReal.hxx deleted file mode 100644 index 95fa45b63a..0000000000 --- a/src/Graphic3d/Graphic3d_ListOfShortReal.hxx +++ /dev/null @@ -1,27 +0,0 @@ -// Created on: 1993-03-31 -// Created by: NW,JPB,CAL -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef Graphic3d_ListOfShortReal_HeaderFile -#define Graphic3d_ListOfShortReal_HeaderFile - -#include -#include - -typedef NCollection_List Graphic3d_ListOfShortReal; -typedef NCollection_List::Iterator Graphic3d_ListIteratorOfListOfShortReal; - - -#endif diff --git a/src/Graphic3d/Graphic3d_NListOfHAsciiString.hxx b/src/Graphic3d/Graphic3d_NListOfHAsciiString.hxx deleted file mode 100644 index acaccdfcb5..0000000000 --- a/src/Graphic3d/Graphic3d_NListOfHAsciiString.hxx +++ /dev/null @@ -1,24 +0,0 @@ -// Created on: 2009-01-20 -// Created by: Alexander A. BORODIN -// Copyright (c) 2009-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _Graphic3d_NListOfHAsciiString_HeaderFile -#define _Graphic3d_NListOfHAsciiString_HeaderFile - -#include -#include - -typedef NCollection_List Graphic3d_NListOfHAsciiString; - -#endif diff --git a/src/Graphic3d/Graphic3d_Structure.hxx b/src/Graphic3d/Graphic3d_Structure.hxx index aaf328403e..adf1efa33c 100644 --- a/src/Graphic3d/Graphic3d_Structure.hxx +++ b/src/Graphic3d/Graphic3d_Structure.hxx @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include @@ -449,7 +448,6 @@ friend class Graphic3d_Group; protected: - //! Transforms boundaries with transformation. Standard_EXPORT static void TransformBoundaries (const TColStd_Array2OfReal& theTrsf, Standard_Real& theXMin, Standard_Real& theYMin, Standard_Real& theZMin, Standard_Real& theXMax, Standard_Real& theYMax, Standard_Real& theZMax); @@ -465,14 +463,8 @@ protected: //! Removes the given ancestor structure. Standard_EXPORT Standard_Boolean RemoveAncestor (const Standard_Address theAncestor); - Graphic3d_StructureManagerPtr myStructureManager; - Graphic3d_StructureManagerPtr myFirstStructureManager; - Graphic3d_TypeOfStructure myComputeVisual; - - private: - //! Suppress in the structure , the group theGroup. //! It will be erased at the next screen update. Standard_EXPORT void Remove (const Handle(Graphic3d_Group)& theGroup); @@ -501,6 +493,10 @@ private: protected: + Graphic3d_StructureManager* myStructureManager; + Graphic3d_StructureManager* myFirstStructureManager; + Graphic3d_TypeOfStructure myComputeVisual; + Handle(Graphic3d_CStructure) myCStructure; Graphic3d_IndexedMapOfAddress myAncestors; Graphic3d_IndexedMapOfAddress myDescendants; diff --git a/src/Graphic3d/Graphic3d_StructureManager.cxx b/src/Graphic3d/Graphic3d_StructureManager.cxx index 7af7a77cc0..72e0584665 100644 --- a/src/Graphic3d/Graphic3d_StructureManager.cxx +++ b/src/Graphic3d/Graphic3d_StructureManager.cxx @@ -13,70 +13,38 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -//-Version -//-Design Declaration of variables specific to managers -//-Warning Manager manages a set of structures -//-References -//-Language C++ 2.0 -//-Declarations -// for the class +#include -#include -#include -#include -#include #include #include -#include #include -#include -#include -#include IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_StructureManager,MMgt_TShared) #include #include +// ======================================================================== +// function : Graphic3d_StructureManager +// purpose : +// ======================================================================== Graphic3d_StructureManager::Graphic3d_StructureManager (const Handle(Graphic3d_GraphicDriver)& theDriver) -: myViewGenId (0, 31) +: myViewGenId (0, 31), + myUpdateMode (Aspect_TOU_WAIT), + myGraphicDriver (theDriver) { - myAspectLine3d = new Graphic3d_AspectLine3d (); - myAspectText3d = new Graphic3d_AspectText3d (); - myAspectMarker3d = new Graphic3d_AspectMarker3d (); - myAspectFillArea3d = new Graphic3d_AspectFillArea3d (); - - myUpdateMode = Aspect_TOU_WAIT; - myGraphicDriver = theDriver; - + // } -//-Destructors - -Graphic3d_StructureManager::~Graphic3d_StructureManager () +// ======================================================================== +// function : ~Graphic3d_StructureManager +// purpose : +// ======================================================================== +Graphic3d_StructureManager::~Graphic3d_StructureManager() { - myDisplayedStructure.Clear (); - myHighlightedStructure.Clear (); + myDisplayedStructure.Clear(); + myHighlightedStructure.Clear(); myDefinedViews.Clear(); - -} - -// ======================================================================== -// function : SetUpdateMode -// purpose : -// ======================================================================== -void Graphic3d_StructureManager::SetUpdateMode (const Aspect_TypeOfUpdate theType) -{ - myUpdateMode = theType; -} - -// ======================================================================== -// function : UpdateMode -// purpose : -// ======================================================================== -Aspect_TypeOfUpdate Graphic3d_StructureManager::UpdateMode() const -{ - return myUpdateMode; } // ======================================================================== @@ -118,67 +86,6 @@ void Graphic3d_StructureManager::Erase() } } - - - - -void Graphic3d_StructureManager::SetPrimitivesAspect (const Handle(Graphic3d_AspectLine3d)& CTX) { - - myAspectLine3d = CTX; - -} - -void Graphic3d_StructureManager::SetPrimitivesAspect (const Handle(Graphic3d_AspectFillArea3d)& CTX) { - - myAspectFillArea3d = CTX; - -} - -void Graphic3d_StructureManager::SetPrimitivesAspect (const Handle(Graphic3d_AspectText3d)& CTX) { - - myAspectText3d = CTX; - -} - -void Graphic3d_StructureManager::SetPrimitivesAspect (const Handle(Graphic3d_AspectMarker3d)& CTX) { - - myAspectMarker3d = CTX; - -} - -void Graphic3d_StructureManager::PrimitivesAspect (Handle(Graphic3d_AspectLine3d)& CTXL, Handle(Graphic3d_AspectText3d)& CTXT, Handle(Graphic3d_AspectMarker3d)& CTXM, Handle(Graphic3d_AspectFillArea3d)& CTXF) const { - - CTXL = myAspectLine3d; - CTXT = myAspectText3d; - CTXM = myAspectMarker3d; - CTXF = myAspectFillArea3d; - -} - -Handle(Graphic3d_AspectLine3d) Graphic3d_StructureManager::Line3dAspect () const { - - return (myAspectLine3d); - -} - -Handle(Graphic3d_AspectText3d) Graphic3d_StructureManager::Text3dAspect () const { - - return (myAspectText3d); - -} - -Handle(Graphic3d_AspectMarker3d) Graphic3d_StructureManager::Marker3dAspect () const { - - return (myAspectMarker3d); - -} - -Handle(Graphic3d_AspectFillArea3d) Graphic3d_StructureManager::FillArea3dAspect () const { - - return (myAspectFillArea3d); - -} - void Graphic3d_StructureManager::DisplayedStructures (Graphic3d_MapOfStructure& SG) const { SG.Assign(myDisplayedStructure); diff --git a/src/Graphic3d/Graphic3d_StructureManager.hxx b/src/Graphic3d/Graphic3d_StructureManager.hxx index cba5c9873c..5253e86ed4 100644 --- a/src/Graphic3d/Graphic3d_StructureManager.hxx +++ b/src/Graphic3d/Graphic3d_StructureManager.hxx @@ -33,16 +33,10 @@ #include #include #include -#include typedef NCollection_IndexedMap Graphic3d_IndexedMapOfView; -class Graphic3d_AspectLine3d; -class Graphic3d_AspectText3d; -class Graphic3d_AspectMarker3d; -class Graphic3d_AspectFillArea3d; class Graphic3d_GraphicDriver; -class Graphic3d_InitialisationError; class Graphic3d_Structure; class Graphic3d_DataStructureManager; class Standard_Transient; @@ -72,22 +66,6 @@ public: //! Deletes the manager . Standard_EXPORT ~Graphic3d_StructureManager(); - //! Modifies the default attributes for lines - //! in the visualiser. - Standard_EXPORT void SetPrimitivesAspect (const Handle(Graphic3d_AspectLine3d)& CTX); - - //! Modifies the default attributes for faces - //! in the visualiser. - Standard_EXPORT void SetPrimitivesAspect (const Handle(Graphic3d_AspectFillArea3d)& CTX); - - //! Modifies the default attributes for text - //! in the visualiser. - Standard_EXPORT void SetPrimitivesAspect (const Handle(Graphic3d_AspectText3d)& CTX); - - //! Modifies the default attributes for markers - //! in the visualiser. - Standard_EXPORT void SetPrimitivesAspect (const Handle(Graphic3d_AspectMarker3d)& CTX); - //! Modifies the screen update mode. //! //! TOU_ASAP - as soon as possible @@ -101,13 +79,13 @@ public: //! Use one of the following functions to update the entire display: //! - Redraw all structures in all views: Graphic3d_StructureManager::Redraw() //! - Redraw all structures in one view: Graphic3d_View::Redraw() - Standard_EXPORT void SetUpdateMode (const Aspect_TypeOfUpdate theType); + void SetUpdateMode (const Aspect_TypeOfUpdate theType) { myUpdateMode = theType; } //! Returns the screen update mode. //! //! TOU_ASAP as soon as possible //! TOU_WAIT on demand (Update) - Standard_EXPORT Aspect_TypeOfUpdate UpdateMode() const; + Aspect_TypeOfUpdate UpdateMode() const { return myUpdateMode; } //! Updates screen in function of modifications of the structures //! and invalidates bounding box of specified ZLayerId. @@ -128,21 +106,6 @@ public: //! in a visualiser . Standard_EXPORT void HighlightedStructures (Graphic3d_MapOfStructure& SG) const; - //! Returns the values of the current default attributes. - Standard_EXPORT Handle(Graphic3d_AspectFillArea3d) FillArea3dAspect() const; - - //! Returns the values of the current default attributes. - Standard_EXPORT Handle(Graphic3d_AspectLine3d) Line3dAspect() const; - - //! Returns the values of the current default attributes. - Standard_EXPORT Handle(Graphic3d_AspectMarker3d) Marker3dAspect() const; - - //! Returns the values of the current default attributes. - Standard_EXPORT void PrimitivesAspect (Handle(Graphic3d_AspectLine3d)& CTXL, Handle(Graphic3d_AspectText3d)& CTXT, Handle(Graphic3d_AspectMarker3d)& CTXM, Handle(Graphic3d_AspectFillArea3d)& CTXF) const; - - //! Returns the values of the current default attributes. - Standard_EXPORT Handle(Graphic3d_AspectText3d) Text3dAspect() const; - //! Forces a new construction of the structure. //! if is displayed and TOS_COMPUTED. Standard_EXPORT virtual void ReCompute (const Handle(Graphic3d_Structure)& theStructure); @@ -227,13 +190,10 @@ protected: //! Returns the structure displayed in visualizer . Standard_EXPORT Standard_Integer NumberOfDisplayedStructures() const; - Standard_Integer myId; +protected: + Aspect_GenId myViewGenId; Aspect_TypeOfUpdate myUpdateMode; - Handle(Graphic3d_AspectLine3d) myAspectLine3d; - Handle(Graphic3d_AspectText3d) myAspectText3d; - Handle(Graphic3d_AspectMarker3d) myAspectMarker3d; - Handle(Graphic3d_AspectFillArea3d) myAspectFillArea3d; Graphic3d_MapOfStructure myDisplayedStructure; Graphic3d_MapOfStructure myHighlightedStructure; Graphic3d_MapOfObject myRegisteredObjects; diff --git a/src/Graphic3d/Graphic3d_StructureManagerPtr.hxx b/src/Graphic3d/Graphic3d_StructureManagerPtr.hxx deleted file mode 100644 index 76aa81b2e0..0000000000 --- a/src/Graphic3d/Graphic3d_StructureManagerPtr.hxx +++ /dev/null @@ -1,23 +0,0 @@ -// Created on: 1993-03-31 -// Created by: NW,JPB,CAL -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _Graphic3d_StructureManagerPtr_HeaderFile -#define _Graphic3d_StructureManagerPtr_HeaderFile - -class Graphic3d_StructureManager; -typedef Graphic3d_StructureManager* Graphic3d_StructureManagerPtr; - -#endif // _Graphic3d_StructureManagerPtr_HeaderFile diff --git a/src/Graphic3d/Graphic3d_StructurePtr.hxx b/src/Graphic3d/Graphic3d_StructurePtr.hxx deleted file mode 100644 index 9dd834f277..0000000000 --- a/src/Graphic3d/Graphic3d_StructurePtr.hxx +++ /dev/null @@ -1,23 +0,0 @@ -// Created on: 1993-03-31 -// Created by: NW,JPB,CAL -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _Graphic3d_StructurePtr_HeaderFile -#define _Graphic3d_StructurePtr_HeaderFile - -class Graphic3d_Structure; -typedef Graphic3d_Structure* Graphic3d_StructurePtr; - -#endif // _Graphic3d_StructurePtr_HeaderFile diff --git a/src/Graphic3d/Graphic3d_TypeOfPolygon.hxx b/src/Graphic3d/Graphic3d_TypeOfPolygon.hxx deleted file mode 100644 index 17bbc42f08..0000000000 --- a/src/Graphic3d/Graphic3d_TypeOfPolygon.hxx +++ /dev/null @@ -1,29 +0,0 @@ -// Created on: 1993-03-31 -// Created by: NW,JPB,CAL -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _Graphic3d_TypeOfPolygon_HeaderFile -#define _Graphic3d_TypeOfPolygon_HeaderFile - -//! The type of polygon in a group in a structure. -enum Graphic3d_TypeOfPolygon -{ -Graphic3d_TOP_UNKNOWN, -Graphic3d_TOP_COMPLEX, -Graphic3d_TOP_CONCAVE, -Graphic3d_TOP_CONVEX -}; - -#endif // _Graphic3d_TypeOfPolygon_HeaderFile diff --git a/src/Graphic3d/Graphic3d_TypeOfPrimitive.hxx b/src/Graphic3d/Graphic3d_TypeOfPrimitive.hxx deleted file mode 100644 index 8fe970710d..0000000000 --- a/src/Graphic3d/Graphic3d_TypeOfPrimitive.hxx +++ /dev/null @@ -1,33 +0,0 @@ -// Created on: 1993-03-31 -// Created by: NW,JPB,CAL -// Copyright (c) 1993-1999 Matra Datavision -// Copyright (c) 1999-2014 OPEN CASCADE SAS -// -// This file is part of Open CASCADE Technology software library. -// -// This library is free software; you can redistribute it and/or modify it under -// the terms of the GNU Lesser General Public License version 2.1 as published -// by the Free Software Foundation, with special exception defined in the file -// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT -// distribution for complete text of the license and disclaimer of any warranty. -// -// Alternatively, this file may be used under the terms of Open CASCADE -// commercial license or contractual agreement. - -#ifndef _Graphic3d_TypeOfPrimitive_HeaderFile -#define _Graphic3d_TypeOfPrimitive_HeaderFile - -//! The type of primitive in a group in a structure. -enum Graphic3d_TypeOfPrimitive -{ -Graphic3d_TOP_UNDEFINED, -Graphic3d_TOP_POLYLINE, -Graphic3d_TOP_POLYGON, -Graphic3d_TOP_TRIANGLEMESH, -Graphic3d_TOP_QUADRANGLEMESH, -Graphic3d_TOP_TEXT, -Graphic3d_TOP_MARKER, -Graphic3d_TOP_PARRAY -}; - -#endif // _Graphic3d_TypeOfPrimitive_HeaderFile diff --git a/src/OpenGl/OpenGl_AVIWriter.hxx b/src/OpenGl/OpenGl_AVIWriter.hxx index ba4d3976c9..9d80aa8f45 100644 --- a/src/OpenGl/OpenGl_AVIWriter.hxx +++ b/src/OpenGl/OpenGl_AVIWriter.hxx @@ -17,9 +17,10 @@ #define __OPENGL_AVIWRITER_H #ifdef _MSC_VER -#define THIS void -#include +#define THIS void +#include + #include #include #include diff --git a/src/OpenGl/OpenGl_FrameBuffer.hxx b/src/OpenGl/OpenGl_FrameBuffer.hxx index 2e06a728ee..6baf4ff8b8 100644 --- a/src/OpenGl/OpenGl_FrameBuffer.hxx +++ b/src/OpenGl/OpenGl_FrameBuffer.hxx @@ -19,9 +19,6 @@ #include #include -#include -#include - class OpenGl_FrameBuffer; DEFINE_STANDARD_HANDLE(OpenGl_FrameBuffer, OpenGl_Resource) diff --git a/src/OpenGl/OpenGl_GraphicDriver.hxx b/src/OpenGl/OpenGl_GraphicDriver.hxx index 00cb6a34d9..a69f78cf6b 100644 --- a/src/OpenGl/OpenGl_GraphicDriver.hxx +++ b/src/OpenGl/OpenGl_GraphicDriver.hxx @@ -37,8 +37,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/OpenGl/OpenGl_LayerList.cxx b/src/OpenGl/OpenGl_LayerList.cxx index c266a639a9..cc4024149a 100644 --- a/src/OpenGl/OpenGl_LayerList.cxx +++ b/src/OpenGl/OpenGl_LayerList.cxx @@ -19,7 +19,6 @@ #include #include -#include #include //======================================================================= diff --git a/src/OpenGl/OpenGl_Window.cxx b/src/OpenGl/OpenGl_Window.cxx index 593f3eb5c0..495b5f1654 100644 --- a/src/OpenGl/OpenGl_Window.cxx +++ b/src/OpenGl/OpenGl_Window.cxx @@ -14,7 +14,6 @@ // commercial license or contractual agreement. #include -#include #include #include diff --git a/src/OpenGl/OpenGl_Window_1.mm b/src/OpenGl/OpenGl_Window_1.mm index 0b3c6dd512..bddf2dfbfb 100644 --- a/src/OpenGl/OpenGl_Window_1.mm +++ b/src/OpenGl/OpenGl_Window_1.mm @@ -32,8 +32,6 @@ #endif -#include - #include #include diff --git a/src/OpenGl/OpenGl_Workspace.cxx b/src/OpenGl/OpenGl_Workspace.cxx index 3ee7a41709..94c661c7da 100644 --- a/src/OpenGl/OpenGl_Workspace.cxx +++ b/src/OpenGl/OpenGl_Workspace.cxx @@ -15,8 +15,6 @@ #include -#include - #include #include #include diff --git a/src/V3d/V3d_CircularGrid.cxx b/src/V3d/V3d_CircularGrid.cxx index 412cf63f41..b556636f25 100644 --- a/src/V3d/V3d_CircularGrid.cxx +++ b/src/V3d/V3d_CircularGrid.cxx @@ -11,19 +11,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -/*********************************************************************** - FONCTION : - ---------- - Classe V3d_CircularGrid : - VERSION HISTORY : - -------------------------------- -************************************************************************/ -/*----------------------------------------------------------------------*/ -/* - * Includes - */ +#include -#include #include #include #include @@ -36,7 +25,6 @@ #include #include #include -#include #include IMPLEMENT_STANDARD_RTTIEXT(V3d_CircularGrid,Aspect_CircularGrid) diff --git a/src/WNT/WNT_WClass.cxx b/src/WNT/WNT_WClass.cxx index d2d12c6c52..51a153ebad 100644 --- a/src/WNT/WNT_WClass.cxx +++ b/src/WNT/WNT_WClass.cxx @@ -14,8 +14,6 @@ #include - -#include #include #include #include