- The NCollection_Sequence (Graphic3d_SequenceOfHClipPlane) is used for handling ordered lists of clipping planes instead of NCollection_Set (Graphic3d_SetOfHClipPlane).
Graphic3d_ClipPlane.hxx
Graphic3d_ClipPlane.cxx
Graphic3d_ClipPlane_Handle.hxx
-Graphic3d_SetOfHClipPlane.hxx
-Graphic3d_SetOfHClipPlane_Handle.hxx
+Graphic3d_SequenceOfHClipPlane.hxx
+Graphic3d_SequenceOfHClipPlane_Handle.hxx
imported ShaderProgram_Handle;
---Category: Instantiated classes
- imported SetOfHClipPlane;
+ imported SequenceOfHClipPlane;
---Category: Instantiated classes
- -- Set of handles on clip planes
+ -- Sequence of handles on clip planes
deferred class TextureRoot from Graphic3d;
deferred class TextureMap from Graphic3d;
#define _Graphic3d_CStructure_HeaderFile
#include <Graphic3d_CGroup.hxx>
-#include <Graphic3d_SetOfHClipPlane.hxx>
+#include <Graphic3d_SequenceOfHClipPlane.hxx>
class Graphic3d_CStructure
{
CALL_DEF_TRANSFORM_PERSISTENCE TransformPersistence;
- Graphic3d_SetOfHClipPlane ClipPlanes;
+ Graphic3d_SequenceOfHClipPlane ClipPlanes;
};
///typedef Graphic3d_CStructure CALL_DEF_STRUCTURE;
#include <InterfaceGraphic_Visual3d.hxx>
#include <Handle_Graphic3d_TextureEnv.hxx>
#include <Graphic3d_CLight.hxx>
-#include <Graphic3d_SetOfHClipPlane.hxx>
+#include <Graphic3d_SequenceOfHClipPlane.hxx>
class CALL_DEF_VIEWCONTEXT
{
Handle(Graphic3d_TextureEnv) TextureEnv;
int SurfaceDetail;
- Graphic3d_SetOfHClipPlane ClipPlanes;
+ Graphic3d_SequenceOfHClipPlane ClipPlanes;
};
class Graphic3d_CView
--- /dev/null
+// Created on: 2013-07-15
+// Created by: Anton POLETAEV
+// Copyright (c) 2013 OPEN CASCADE SAS
+//
+// The content of this file is subject to the Open CASCADE Technology Public
+// License Version 65 (the "License") You may not use the content of this file
+// except in compliance with the License Please obtain a copy of the License
+// at http://www.opencascade.org and read it completely before using this file
+//
+// The Initial Developer of the Original Code is Open CASCADE SAS, having its
+// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France
+//
+// The Original Code and all software distributed under the License is
+// distributed on an "AS IS" basis, without warranty of any kind, and the
+// Initial Developer hereby disclaims all such warranties, including without
+// limitation, any warranties of merchantability, fitness for a particular
+// purpose or non-infringement Please see the License for the specific terms
+// and conditions governing the rights and limitations under the License
+
+#ifndef _Graphic3d_SequenceOfHClipPlane_HeaderFile
+#define _Graphic3d_SequenceOfHClipPlane_HeaderFile
+
+#include <NCollection_Sequence.hxx>
+#include <Graphic3d_ClipPlane.hxx>
+
+// CDL-header shortcut for sequence of graphical clipping planes.
+typedef NCollection_Sequence<Handle(Graphic3d_ClipPlane)> Graphic3d_SequenceOfHClipPlane;
+
+#endif
--- /dev/null
+// Created on: 2013-10-08
+// Created by: Anton POLETAEV
+// Copyright (c) 2013 OPEN CASCADE SAS
+//
+// The content of this file is subject to the Open CASCADE Technology Public
+// License Version 65 (the "License") You may not use the content of this file
+// except in compliance with the License Please obtain a copy of the License
+// at http://www.opencascade.org and read it completely before using this file
+//
+// The Initial Developer of the Original Code is Open CASCADE SAS, having its
+// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France
+//
+// The Original Code and all software distributed under the License is
+// distributed on an "AS IS" basis, without warranty of any kind, and the
+// Initial Developer hereby disclaims all such warranties, including without
+// limitation, any warranties of merchantability, fitness for a particular
+// purpose or non-infringement Please see the License for the specific terms
+// and conditions governing the rights and limitations under the License
+
+#ifndef _Graphic3d_SequenceOfHClipPlane_Handle_HeaderFile
+#define _Graphic3d_SequenceOfHClipPlane_Handle_HeaderFile
+
+#include <NCollection_Handle.hxx>
+#include <Graphic3d_SequenceOfHClipPlane.hxx>
+
+typedef NCollection_Handle<Graphic3d_SequenceOfHClipPlane> Handle(Graphic3d_SequenceOfHClipPlane);
+
+#endif
+++ /dev/null
-// Created on: 2013-07-15
-// Created by: Anton POLETAEV
-// Copyright (c) 2013 OPEN CASCADE SAS
-//
-// The content of this file is subject to the Open CASCADE Technology Public
-// License Version 65 (the "License") You may not use the content of this file
-// except in compliance with the License Please obtain a copy of the License
-// at http://www.opencascade.org and read it completely before using this file
-//
-// The Initial Developer of the Original Code is Open CASCADE SAS, having its
-// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France
-//
-// The Original Code and all software distributed under the License is
-// distributed on an "AS IS" basis, without warranty of any kind, and the
-// Initial Developer hereby disclaims all such warranties, including without
-// limitation, any warranties of merchantability, fitness for a particular
-// purpose or non-infringement Please see the License for the specific terms
-// and conditions governing the rights and limitations under the License
-
-#ifndef _Graphic3d_SetOfHClipPlane_HeaderFile
-#define _Graphic3d_SetOfHClipPlane_HeaderFile
-
-#include <NCollection_Set.hxx>
-#include <Graphic3d_ClipPlane.hxx>
-
-// CDL-header shortcut for set of graphical clipping planes. This is a compact
-// way (compared to list) to store clippings, with mandatory uniqueness check.
-typedef NCollection_Set<Handle(Graphic3d_ClipPlane)> Graphic3d_SetOfHClipPlane;
-
-#endif
+++ /dev/null
-// Created on: 2013-10-08
-// Created by: Anton POLETAEV
-// Copyright (c) 2013 OPEN CASCADE SAS
-//
-// The content of this file is subject to the Open CASCADE Technology Public
-// License Version 65 (the "License") You may not use the content of this file
-// except in compliance with the License Please obtain a copy of the License
-// at http://www.opencascade.org and read it completely before using this file
-//
-// The Initial Developer of the Original Code is Open CASCADE SAS, having its
-// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France
-//
-// The Original Code and all software distributed under the License is
-// distributed on an "AS IS" basis, without warranty of any kind, and the
-// Initial Developer hereby disclaims all such warranties, including without
-// limitation, any warranties of merchantability, fitness for a particular
-// purpose or non-infringement Please see the License for the specific terms
-// and conditions governing the rights and limitations under the License
-
-#ifndef _Graphic3d_SetOfHClipPlane_Handle_HeaderFile
-#define _Graphic3d_SetOfHClipPlane_Handle_HeaderFile
-
-#include <NCollection_Handle.hxx>
-#include <Graphic3d_SetOfHClipPlane.hxx>
-
-typedef NCollection_Handle<Graphic3d_SetOfHClipPlane> Handle(Graphic3d_SetOfHClipPlane);
-
-#endif
Vertex from Graphic3d,
TransModeFlags from Graphic3d,
Pnt from gp,
- SetOfHClipPlane from Graphic3d
+ SequenceOfHClipPlane from Graphic3d
raises
---Purpose: Get Z layer ID of displayed structure. The method
-- returns -1 if the structure has no ID (deleted from graphic driver).
- SetClipPlanes (me : mutable; thePlanes : SetOfHClipPlane from Graphic3d) is static;
- ---Purpose: Changes a set of clip planes slicing the structure on rendering.
+ SetClipPlanes (me : mutable; thePlanes : SequenceOfHClipPlane from Graphic3d) is static;
+ ---Purpose: Changes a sequence of clip planes slicing the structure on rendering.
-- @param thePlanes [in] the set of clip planes.
- GetClipPlanes (me) returns SetOfHClipPlane from Graphic3d;
+ GetClipPlanes (me) returns SequenceOfHClipPlane from Graphic3d;
---C++: return const&
---Purpose: Get clip planes slicing the structure on rendering.
-- @return set of clip planes.
//function : SetClipPlanes
//purpose :
//=======================================================================
-void Graphic3d_Structure::SetClipPlanes (const Graphic3d_SetOfHClipPlane& thePlanes)
+void Graphic3d_Structure::SetClipPlanes (const Graphic3d_SequenceOfHClipPlane& thePlanes)
{
MyCStructure.ClipPlanes = thePlanes;
MyGraphicDriver->SetClipPlanes (MyCStructure);
//function : GetClipPlanes
//purpose :
//=======================================================================
-const Graphic3d_SetOfHClipPlane& Graphic3d_Structure::GetClipPlanes() const
+const Graphic3d_SequenceOfHClipPlane& Graphic3d_Structure::GetClipPlanes() const
{
return MyCStructure.ClipPlanes;
}
// check whether algorithm need to be performed
Standard_Boolean isCapping = Standard_False;
- const Graphic3d_SetOfHClipPlane& aContextPlanes = aContext->Clipping().Planes();
- Graphic3d_SetOfHClipPlane::Iterator aCappingIt (aContextPlanes);
+ const Graphic3d_SequenceOfHClipPlane& aContextPlanes = aContext->Clipping().Planes();
+ Graphic3d_SequenceOfHClipPlane::Iterator aCappingIt (aContextPlanes);
for (; aCappingIt.More(); aCappingIt.Next())
{
const Handle(Graphic3d_ClipPlane)& aPlane = aCappingIt.Value();
}
// enable only the rendering plane to generate stencil mask
- Graphic3d_SetOfHClipPlane::Iterator aPlaneIt (aContextPlanes);
+ Graphic3d_SequenceOfHClipPlane::Iterator aPlaneIt (aContextPlanes);
for (; aPlaneIt.More(); aPlaneIt.Next())
{
const Handle(Graphic3d_ClipPlane)& aPlane = aPlaneIt.Value();
// function : Add
// purpose :
// =======================================================================
-void OpenGl_Clipping::Add (Graphic3d_SetOfHClipPlane& thePlanes,
+void OpenGl_Clipping::Add (Graphic3d_SequenceOfHClipPlane& thePlanes,
const EquationCoords& theCoordSpace,
const Handle(OpenGl_Workspace)& theWS)
{
// function : Add
// purpose :
// =======================================================================
-void OpenGl_Clipping::Add (Graphic3d_SetOfHClipPlane& thePlanes, const EquationCoords& theCoordSpace)
+void OpenGl_Clipping::Add (Graphic3d_SequenceOfHClipPlane& thePlanes, const EquationCoords& theCoordSpace)
{
- Graphic3d_SetOfHClipPlane::Iterator aPlaneIt (thePlanes);
+ Graphic3d_SequenceOfHClipPlane::Iterator aPlaneIt (thePlanes);
while (aPlaneIt.More() && myEmptyPlaneIds->Available() > 0)
{
const Handle(Graphic3d_ClipPlane)& aPlane = aPlaneIt.Value();
}
Standard_Integer anID = myEmptyPlaneIds->Next();
- myPlanes.Add (aPlane);
+ myPlanes.Append (aPlane);
myPlaneStates.Bind (aPlane, PlaneProps (theCoordSpace, anID, Standard_True));
glEnable ((GLenum)anID);
// function : Remove
// purpose :
// =======================================================================
-void OpenGl_Clipping::Remove (const Graphic3d_SetOfHClipPlane& thePlanes)
+void OpenGl_Clipping::Remove (const Graphic3d_SequenceOfHClipPlane& thePlanes)
{
- Graphic3d_SetOfHClipPlane::Iterator aPlaneIt (thePlanes);
+ Graphic3d_SequenceOfHClipPlane::Iterator aPlaneIt (thePlanes);
for (; aPlaneIt.More(); aPlaneIt.Next())
{
const Handle(Graphic3d_ClipPlane)& aPlane = aPlaneIt.Value();
// purpose :
// =======================================================================
void OpenGl_Clipping::SetEnabled (const Handle(Graphic3d_ClipPlane)& thePlane,
- const Standard_Boolean theIsEnabled)
+ const Standard_Boolean theIsEnabled)
{
if (!Contains (thePlane))
{
#include <Aspect_GenId.hxx>
#include <Graphic3d_ClipPlane.hxx>
-#include <Graphic3d_SetOfHClipPlane.hxx>
+#include <Graphic3d_SequenceOfHClipPlane.hxx>
#include <NCollection_DataMap.hxx>
#include <NCollection_Handle.hxx>
#include <Standard_TypeDef.hxx>
//! Get clip planes defined for context.
//! @return sequence of set clipping planes.
- inline const Graphic3d_SetOfHClipPlane& Planes() const
+ inline const Graphic3d_SequenceOfHClipPlane& Planes() const
{
return myPlanes;
}
//! This list then can be used to fall back to previous state.
//! @param theCoordSpace [in] the equation definition space.
//! @param theWS [in] the workspace to access the matrices.
- Standard_EXPORT void Add (Graphic3d_SetOfHClipPlane& thePlanes,
+ Standard_EXPORT void Add (Graphic3d_SequenceOfHClipPlane& thePlanes,
const EquationCoords& theCoordSpace,
const Handle(OpenGl_Workspace)& theWS);
//! The list then provides information on which planes were really added to clipping state.
//! This list then can be used to fall back to previous state.
//! @param theCoordSpace [in] the equation definition space.
- Standard_EXPORT void Add (Graphic3d_SetOfHClipPlane& thePlanes,
+ Standard_EXPORT void Add (Graphic3d_SequenceOfHClipPlane& thePlanes,
const EquationCoords& theCoordSpace);
//! Remove the passed set of clipping planes from the context state.
//! @param thePlanes [in] the planes to remove from list.
- Standard_EXPORT void Remove (const Graphic3d_SetOfHClipPlane& thePlanes);
+ Standard_EXPORT void Remove (const Graphic3d_SequenceOfHClipPlane& thePlanes);
//! Enable or disable clipping plane in the OpenGl context.
//! @param thePlane [in] the plane to affect.
//! The list then provides information on which planes were really added to clipping state.
//! This list then can be used to fall back to previous state.
//! @param theWS [in] the workspace to access the matrices.
- inline void AddView (Graphic3d_SetOfHClipPlane& thePlanes, const Handle(OpenGl_Workspace)& theWS)
+ inline void AddView (Graphic3d_SequenceOfHClipPlane& thePlanes, const Handle(OpenGl_Workspace)& theWS)
{
Add (thePlanes, EquationCoords_View, theWS);
}
//! @param thePlanes [in/out] the list of planes to be added.
//! The list then provides information on which planes were really added to clipping state.
//! This list then can be used to fall back to previous state.
- inline void AddView (Graphic3d_SetOfHClipPlane& thePlanes)
+ inline void AddView (Graphic3d_SequenceOfHClipPlane& thePlanes)
{
Add (thePlanes, EquationCoords_View);
}
//! The list then provides information on which planes were really added to clipping state.
//! This list then can be used to fall back to previous state.
//! @param theWS [in] the workspace to access the matrices.
- inline void AddWorld (Graphic3d_SetOfHClipPlane& thePlanes, const Handle(OpenGl_Workspace)& theWS)
+ inline void AddWorld (Graphic3d_SequenceOfHClipPlane& thePlanes, const Handle(OpenGl_Workspace)& theWS)
{
Add (thePlanes, EquationCoords_World, theWS);
}
//! @param thePlanes [in/out] the list of planes to be added.
//! The list then provides information on which planes were really added to clipping state.
//! This list then can be used to fall back to previous state.
- inline void AddWorld (Graphic3d_SetOfHClipPlane& thePlanes)
+ inline void AddWorld (Graphic3d_SequenceOfHClipPlane& thePlanes)
{
Add (thePlanes, EquationCoords_World);
}
typedef NCollection_DataMap<Handle(Graphic3d_ClipPlane), PlaneProps> OpenGl_MapOfPlaneStates;
typedef NCollection_Handle<Aspect_GenId> OpenGl_EmptyPlaneIds;
- Graphic3d_SetOfHClipPlane myPlanes; //!< defined clipping planes.
- OpenGl_MapOfPlaneStates myPlaneStates; //!< map of clip planes bound for the props.
- OpenGl_EmptyPlaneIds myEmptyPlaneIds; //!< generator of empty ids.
+ Graphic3d_SequenceOfHClipPlane myPlanes; //!< defined clipping planes.
+ OpenGl_MapOfPlaneStates myPlaneStates; //!< map of clip planes bound for the props.
+ OpenGl_EmptyPlaneIds myEmptyPlaneIds; //!< generator of empty ids.
private:
}
GLuint aPlanesNb = 0;
- for (Graphic3d_SetOfHClipPlane::Iterator anIter (myContext->Clipping().Planes());
+ for (Graphic3d_SequenceOfHClipPlane::Iterator anIter (myContext->Clipping().Planes());
anIter.More(); anIter.Next())
{
const Handle(Graphic3d_ClipPlane)& aPlane = anIter.Value();
OpenGl_Vec4* anEquations = new OpenGl_Vec4[aPlanesNb];
GLint* aSpaces = new GLint [aPlanesNb];
GLuint aPlaneId = 0;
- for (Graphic3d_SetOfHClipPlane::Iterator anIter (myContext->Clipping().Planes());
+ for (Graphic3d_SequenceOfHClipPlane::Iterator anIter (myContext->Clipping().Planes());
anIter.More(); anIter.Next())
{
const Handle(Graphic3d_ClipPlane)& aPlane = anIter.Value();
#ifndef _OpenGl_State_HeaderFile
#define _OpenGl_State_HeaderFile
-#include <Graphic3d_SetOfHClipPlane.hxx>
-
#include <InterfaceGraphic_tgl_all.hxx>
#include <OpenGl_Element.hxx>
#include <OpenGl_View.hxx>
#include <OpenGl_Workspace.hxx>
-#include <Graphic3d_SetOfHClipPlane_Handle.hxx>
+#include <Graphic3d_SequenceOfHClipPlane_Handle.hxx>
//! Auxiliary class for bounding box presentation
class OpenGl_BndBoxPrs : public OpenGl_Element
const Handle(OpenGl_Context)& aContext = AWorkspace->GetGlContext();
// List of planes to be applied to context state
- Handle(Graphic3d_SetOfHClipPlane) aUserPlanes;
+ Handle(Graphic3d_SequenceOfHClipPlane) aUserPlanes;
// Collect clipping planes of structure scope
if (!myClipPlanes.IsEmpty())
{
- Graphic3d_SetOfHClipPlane::Iterator aClippingIt (myClipPlanes);
+ Graphic3d_SequenceOfHClipPlane::Iterator aClippingIt (myClipPlanes);
for (; aClippingIt.More(); aClippingIt.Next())
{
const Handle(Graphic3d_ClipPlane)& aClipPlane = aClippingIt.Value();
if (aUserPlanes.IsNull())
{
- aUserPlanes = new Graphic3d_SetOfHClipPlane();
+ aUserPlanes = new Graphic3d_SequenceOfHClipPlane();
}
- aUserPlanes->Add (aClipPlane);
+ aUserPlanes->Append (aClipPlane);
}
}
#include <OpenGl_Matrix.hxx>
#include <OpenGl_NamedStatus.hxx>
-#include <Graphic3d_SetOfHClipPlane.hxx>
+#include <Graphic3d_SequenceOfHClipPlane.hxx>
class OpenGl_Structure;
Standard_Boolean IsVisible() const { return !(myNamedStatus & OPENGL_NS_HIDE); }
- void SetClipPlanes (const Graphic3d_SetOfHClipPlane& thePlanes) { myClipPlanes = thePlanes; }
+ void SetClipPlanes (const Graphic3d_SequenceOfHClipPlane& thePlanes) { myClipPlanes = thePlanes; }
void Connect (const OpenGl_Structure *astructure);
void Disconnect (const OpenGl_Structure *astructure);
int myNamedStatus; //Structure_LABNameSet
int myZLayer;
- OpenGl_ListOfStructure myConnected;
- OpenGl_ListOfGroup myGroups;
- Graphic3d_SetOfHClipPlane myClipPlanes;
+ OpenGl_ListOfStructure myConnected;
+ OpenGl_ListOfGroup myGroups;
+ Graphic3d_SequenceOfHClipPlane myClipPlanes;
#ifdef HAVE_OPENCL
mutable OpenGl_ListOfStructure myAncestorStructures;
#include <Graphic3d_CView.hxx>
#include <Graphic3d_CGraduatedTrihedron.hxx>
-#include <Graphic3d_SetOfHClipPlane.hxx>
+#include <Graphic3d_SequenceOfHClipPlane.hxx>
#include <Visual3d_TypeOfSurfaceDetail.hxx>
#include <OpenGl_telem_view.hxx>
void SetBackfacing (const Standard_Integer AMode);
void SetLights (const CALL_DEF_VIEWCONTEXT &AContext);
void SetAntiAliasing (const Standard_Boolean AMode) { myAntiAliasing = AMode; }
- void SetClipPlanes (const Graphic3d_SetOfHClipPlane &thePlanes) { myClipPlanes = thePlanes; }
+ void SetClipPlanes (const Graphic3d_SequenceOfHClipPlane &thePlanes) { myClipPlanes = thePlanes; }
void SetVisualisation (const CALL_DEF_VIEWCONTEXT &AContext);
void SetClipLimit (const Graphic3d_CView& theCView);
OPENGL_EXTRA_REP myExtra;
//}
- Graphic3d_SetOfHClipPlane myClipPlanes;
+ Graphic3d_SequenceOfHClipPlane myClipPlanes;
OPENGL_FOG myFog;
OpenGl_Trihedron* myTrihedron;
// do some "memory allocation"-wise optimization
if (!aPlaneBack.IsNull() || !aPlaneFront.IsNull())
{
- Graphic3d_SetOfHClipPlane aSlicingPlanes;
+ Graphic3d_SequenceOfHClipPlane aSlicingPlanes;
if (!aPlaneBack.IsNull())
{
- aSlicingPlanes.Add (aPlaneBack);
+ aSlicingPlanes.Append (aPlaneBack);
}
if (!aPlaneFront.IsNull())
{
- aSlicingPlanes.Add (aPlaneFront);
+ aSlicingPlanes.Append (aPlaneFront);
}
// add planes at loaded view matrix state
// Apply user clipping planes
if (!myClipPlanes.IsEmpty())
{
- Graphic3d_SetOfHClipPlane aUserPlanes;
- Graphic3d_SetOfHClipPlane::Iterator aClippingIt (myClipPlanes);
+ Graphic3d_SequenceOfHClipPlane aUserPlanes;
+ Graphic3d_SequenceOfHClipPlane::Iterator aClippingIt (myClipPlanes);
for (; aClippingIt.More(); aClippingIt.Next())
{
const Handle(Graphic3d_ClipPlane)& aClipPlane = aClippingIt.Value();
if (aClipPlane->IsOn())
{
- aUserPlanes.Add (aClipPlane);
+ aUserPlanes.Append (aClipPlane);
}
}
ListOfInteger from TColStd,
Location from TopLoc,
ClipPlane_Handle from Graphic3d,
- SetOfHClipPlane from Graphic3d,
+ SequenceOfHClipPlane from Graphic3d,
-- ABD 29/10/04 Transform Persistence of Presentation( pan, zoom, rotate )
TransModeFlags from Graphic3d,
Pnt from gp,
---Purpose: Removes previously added clip plane.
-- @param thePlane [in] the clip plane to be removed from map of clip planes.
- SetClipPlanes (me : mutable; thePlanes : SetOfHClipPlane from Graphic3d) is virtual;
+ SetClipPlanes (me : mutable; thePlanes : SequenceOfHClipPlane from Graphic3d) is virtual;
---Purpose: Set clip planes for graphical clipping for all display mode presentations.
-- The composition of clip planes truncates the rendering space to convex
-- volume. Please be aware that number of supported clip plane is limited.
-- of these planes should be substracted from limit to predict the maximum
-- possible number of object clipping planes.
- GetClipPlanes (me) returns SetOfHClipPlane from Graphic3d;
+ GetClipPlanes (me) returns SequenceOfHClipPlane from Graphic3d;
---C++: inline
---C++: return const&
---Purpose: Get clip planes.
myPresentations: Presentations from PrsMgr is protected;
myTypeOfPresentation3d: TypeOfPresentation3d from PrsMgr is protected;
myLocation : Location from TopLoc is protected;
- myClipPlanes : SetOfHClipPlane from Graphic3d is protected;
+ myClipPlanes : SequenceOfHClipPlane from Graphic3d is protected;
--myTransformPersistence : TransModeFlags from Graphic3d;
myTransformPersistence : CTransPersStruct from Graphic3d;
// =======================================================================
void PrsMgr_PresentableObject::AddClipPlane (const Handle(Graphic3d_ClipPlane)& thePlane)
{
- myClipPlanes.Add (thePlane);
-
- UpdateClipping(); // process changes
+ // add to collection and process changes
+ myClipPlanes.Append (thePlane);
+ UpdateClipping();
}
// =======================================================================
// =======================================================================
void PrsMgr_PresentableObject::RemoveClipPlane (const Handle(Graphic3d_ClipPlane)& thePlane)
{
- myClipPlanes.Remove (thePlane);
+ // remove from collection and process changes
+ Graphic3d_SequenceOfHClipPlane::Iterator aPlaneIt (myClipPlanes);
+ for (; aPlaneIt.More(); aPlaneIt.Next())
+ {
+ const Handle(Graphic3d_ClipPlane)& aPlane = aPlaneIt.Value();
+ if (aPlane != thePlane)
+ continue;
- UpdateClipping(); // process changes
+ myClipPlanes.Remove (aPlaneIt);
+ UpdateClipping();
+ return;
+ }
}
// =======================================================================
// function : SetClipPlanes
// purpose :
// =======================================================================
-void PrsMgr_PresentableObject::SetClipPlanes (const Graphic3d_SetOfHClipPlane& thePlanes)
+void PrsMgr_PresentableObject::SetClipPlanes (const Graphic3d_SequenceOfHClipPlane& thePlanes)
{
+ // change collection and process changes
myClipPlanes = thePlanes;
-
UpdateClipping();
}
inline const TopLoc_Location& PrsMgr_PresentableObject::Location() const
{return myLocation;}
-inline const Graphic3d_SetOfHClipPlane& PrsMgr_PresentableObject::GetClipPlanes() const
+inline const Graphic3d_SequenceOfHClipPlane& PrsMgr_PresentableObject::GetClipPlanes() const
{
return myClipPlanes;
}
--
uses
- View from V3d,
- Selection from SelectMgr,
- EntityOwner from SelectMgr,
- Projector from Select3D,
- Group from Graphic3d,
- Structure from Graphic3d,
- SetOfHClipPlane from Graphic3d,
- Array1OfReal from TColStd,
- Array1OfPnt2d from TColgp,
- SensitivityMode from StdSelect,
- Lin from gp
+ View from V3d,
+ Selection from SelectMgr,
+ EntityOwner from SelectMgr,
+ Projector from Select3D,
+ Group from Graphic3d,
+ Structure from Graphic3d,
+ SequenceOfHClipPlane from Graphic3d,
+ Array1OfReal from TColStd,
+ Array1OfPnt2d from TColgp,
+ SensitivityMode from StdSelect,
+ Lin from gp
is
is static private;
---Level: Internal
- SetClipping (me : mutable; thePlanes : SetOfHClipPlane from Graphic3d) is protected;
+ SetClipping (me : mutable; thePlanes : SequenceOfHClipPlane from Graphic3d) is protected;
---Level: Internal
---Purpose: Set view clipping for the selector.
-- @param thePlanes [in] the view planes.
- ComputeClipRange (me; thePlanes : SetOfHClipPlane from Graphic3d;
+ ComputeClipRange (me; thePlanes : SequenceOfHClipPlane from Graphic3d;
thePickLine : Lin from gp;
theDepthMin, theDepthMax : out Real from Standard)
is protected;
--areas verification...
- myareagroup : Group from Graphic3d;
- mysensgroup : Group from Graphic3d;
- mystruct: Structure from Graphic3d;
- myClipPlanes : SetOfHClipPlane from Graphic3d;
+ myareagroup : Group from Graphic3d;
+ mysensgroup : Group from Graphic3d;
+ mystruct : Structure from Graphic3d;
+ myClipPlanes : SequenceOfHClipPlane from Graphic3d;
end ViewerSelector3d;
-
-
-
#include <V3d_PerspectiveView.hxx>
#include <Select3D_SensitiveEntity.hxx>
#include <Graphic3d_ArrayOfPolylines.hxx>
-#include <Graphic3d_SetOfHClipPlane.hxx>
+#include <Graphic3d_SequenceOfHClipPlane.hxx>
#include <SelectMgr_SelectableObject.hxx>
#include <SelectMgr_DataMapIteratorOfDataMapOfIntegerSensitive.hxx>
#include <SelectBasics_ListOfBox2d.hxx>
//function : SetClipping
//purpose :
//=======================================================================
-void StdSelect_ViewerSelector3d::SetClipping (const Graphic3d_SetOfHClipPlane& thePlanes)
+void StdSelect_ViewerSelector3d::SetClipping (const Graphic3d_SequenceOfHClipPlane& thePlanes)
{
myClipPlanes = thePlanes;
}
//function : ComputeClipRange
//purpose :
//=======================================================================
-void StdSelect_ViewerSelector3d::ComputeClipRange (const Graphic3d_SetOfHClipPlane& thePlanes,
+void StdSelect_ViewerSelector3d::ComputeClipRange (const Graphic3d_SequenceOfHClipPlane& thePlanes,
const gp_Lin& thePickLine,
Standard_Real& theDepthMin,
Standard_Real& theDepthMax) const
theDepthMax = RealLast();
Standard_Real aPlaneA, aPlaneB, aPlaneC, aPlaneD;
- Graphic3d_SetOfHClipPlane::Iterator aPlaneIt (thePlanes);
+ Graphic3d_SequenceOfHClipPlane::Iterator aPlaneIt (thePlanes);
for (; aPlaneIt.More(); aPlaneIt.Next())
{
const Handle(Graphic3d_ClipPlane)& aClipPlane = aPlaneIt.Value();
ExtendedString from TCollection,
PrintAlgo from Aspect,
ClipPlane_Handle from Graphic3d,
- SetOfHClipPlane from Graphic3d
+ SequenceOfHClipPlane from Graphic3d
raises
BadValue from V3d, TypeMismatch from Standard,
---Purpose: Removes clip plane from the view.
-- @param thePlane [in] the clip plane to be removed from view.
- SetClipPlanes (me : mutable; thePlanes : SetOfHClipPlane from Graphic3d);
- ---Purpose: Set clip planes to the view. The planes that have been set
+ SetClipPlanes (me : mutable; thePlanes : SequenceOfHClipPlane from Graphic3d);
+ ---Purpose: Sets sequence of clip planes to the view. The planes that have been set
-- before are removed from the view. The composition of clip planes
-- truncates the rendering space to convex volume. Number of supported
-- clip planes can be consulted by PlaneLimit method of associated
-- are igonred during rendering.
-- @param thePlanes [in] the clip planes to set.
- GetClipPlanes (me) returns SetOfHClipPlane from Graphic3d;
+ GetClipPlanes (me) returns SequenceOfHClipPlane from Graphic3d;
---C++: return const&
---Purpose: Get clip planes.
-- @return sequence clip planes that have been set for the view
//=======================================================================
void V3d_View::AddClipPlane (const Handle(Graphic3d_ClipPlane)& thePlane)
{
- Graphic3d_SetOfHClipPlane aCurrPlanes = MyViewContext.GetClipPlanes();
- if (!aCurrPlanes.Add (thePlane))
- return;
-
- MyViewContext.SetClipPlanes (aCurrPlanes);
- MyView->SetContext (MyViewContext) ;
+ MyViewContext.ChangeClipPlanes().Append (thePlane);
+ MyView->SetContext (MyViewContext);
}
//=======================================================================
//=======================================================================
void V3d_View::RemoveClipPlane (const Handle(Graphic3d_ClipPlane)& thePlane)
{
- Graphic3d_SetOfHClipPlane aCurrPlanes = MyViewContext.GetClipPlanes();
- if (!aCurrPlanes.Remove (thePlane))
+ Graphic3d_SequenceOfHClipPlane& aSeqOfPlanes = MyViewContext.ChangeClipPlanes();
+ Graphic3d_SequenceOfHClipPlane::Iterator aPlaneIt (aSeqOfPlanes);
+ for (; aPlaneIt.More(); aPlaneIt.Next())
+ {
+ const Handle(Graphic3d_ClipPlane)& aPlane = aPlaneIt.Value();
+ if (aPlane != thePlane)
+ continue;
+
+ aSeqOfPlanes.Remove (aPlaneIt);
+ MyView->SetContext (MyViewContext);
return;
-
- MyViewContext.SetClipPlanes (aCurrPlanes);
- MyView->SetContext (MyViewContext) ;
+ }
}
//=======================================================================
//function : SetClipPlanes
//purpose :
//=======================================================================
-void V3d_View::SetClipPlanes (const Graphic3d_SetOfHClipPlane& thePlanes)
+void V3d_View::SetClipPlanes (const Graphic3d_SequenceOfHClipPlane& thePlanes)
{
- MyViewContext.SetClipPlanes (thePlanes);
- MyView->SetContext (MyViewContext) ;
+ MyViewContext.ChangeClipPlanes() = thePlanes;
+ MyView->SetContext (MyViewContext);
}
//=======================================================================
//function : GetClipPlanes
//purpose :
//=======================================================================
-const Graphic3d_SetOfHClipPlane& V3d_View::GetClipPlanes() const
+const Graphic3d_SequenceOfHClipPlane& V3d_View::GetClipPlanes() const
{
- return MyViewContext.GetClipPlanes();
+ return MyViewContext.ClipPlanes();
}
uses
- SequenceOfAddress from TColStd,
- Light from Visual3d,
- HSetOfLight from Visual3d,
-
- TypeOfModel from Visual3d,
- TypeOfVisualization from Visual3d,
- TypeOfSurfaceDetail from Visual3d,
- TextureEnv from Graphic3d,
- SetOfHClipPlane from Graphic3d
+ SequenceOfAddress from TColStd,
+ Light from Visual3d,
+ HSetOfLight from Visual3d,
+ TypeOfModel from Visual3d,
+ TypeOfVisualization from Visual3d,
+ TypeOfSurfaceDetail from Visual3d,
+ TextureEnv from Graphic3d,
+ SequenceOfHClipPlane from Graphic3d
raises
-- Clip Plane
---------------------------------------------------
- SetClipPlanes (me : in out; thePlanes : SetOfHClipPlane from Graphic3d);
- ---Purpose: Set list of clip planes to the view context.
- -- @param thePlanes [in] the clip planes to set.
-
- GetClipPlanes (me) returns SetOfHClipPlane from Graphic3d;
+ ClipPlanes (me) returns SequenceOfHClipPlane from Graphic3d;
---C++: return const&
- ---Purpose: Get clip planes.
+ ---Purpose: Returns sequence of clip planes.
+ -- @return sequence of clip planes.
+
+ ChangeClipPlanes (me : in out) returns SequenceOfHClipPlane from Graphic3d;
+ ---C++: return&
+ ---Purpose: Change clip planes.
-- @return sequence of clip planes.
---------------------------------------------------
MyTextureEnv : TextureEnv from Graphic3d;
MySurfaceDetail : TypeOfSurfaceDetail from Visual3d;
- myClipPlanes : SetOfHClipPlane from Graphic3d;
+ myClipPlanes : SequenceOfHClipPlane from Graphic3d;
end ContextView;
return MySurfaceDetail;
}
-void Visual3d_ContextView::SetClipPlanes (const Graphic3d_SetOfHClipPlane& thePlanes)
+//=======================================================================
+//function : ClipPlanes
+//purpose :
+//=======================================================================
+const Graphic3d_SequenceOfHClipPlane& Visual3d_ContextView::ClipPlanes() const
{
- myClipPlanes = thePlanes;
+ return myClipPlanes;
}
-const Graphic3d_SetOfHClipPlane& Visual3d_ContextView::GetClipPlanes() const
+//=======================================================================
+//function : ChangeClipPlanes
+//purpose :
+//=======================================================================
+Graphic3d_SequenceOfHClipPlane& Visual3d_ContextView::ChangeClipPlanes()
{
return myClipPlanes;
}
MyCView.Context.ActiveLight = NULL;
}
-void Visual3d_View::UpdatePlanes()
+void Visual3d_View::UpdatePlanes()
{
- MyCView.Context.ClipPlanes = MyContext.GetClipPlanes();
-
+ MyCView.Context.ClipPlanes = MyContext.ClipPlanes();
if (IsDeleted() || !IsDefined())
+ {
return;
+ }
MyGraphicDriver->SetClipPlanes (MyCView);
}