* *Aspect_IS_HIDDENLINE* does not implicitly enables drawing mesh edges anymore.
Specify Graphic3d_AspectFillArea3d::SetDrawEdges(true) with Graphic3d_AspectFillArea3d::SetInteriorStyle(Aspect_IS_HIDDENLINE) to get previous behavior of Aspect_IS_HIDDENLINE style.
+@subsection upgrade_740_modedprs PrsMgr_ModedPresentation removal
+
+Proxy classes *Prs3d_Presentation*, *PrsMgr_ModedPresentation* and *PrsMgr_Prs* have been removed.
+Code iterating through the list of low-level structures AIS_InteractiveObject::Presentations() should be updated to access PrsMgr_Presentation directly.
+Forward declarations of *Prs3d_Presentation* should be corrected, since it is now a typedef to *Graphic3d_Structure*.
+
@subsection upgrade_740_geproj Custom defines within env.bat
*env.bat* produced by Visual Studio project generator *genproj.bat* has been modified so that *%CSF_DEFINES%* variable is reset to initial state.
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
+#include <AIS.hxx>
#include <Adaptor3d_HCurve.hxx>
#include <Adaptor3d_HSurface.hxx>
-#include <AIS.hxx>
#include <Bnd_Box.hxx>
#include <BRep_Tool.hxx>
#include <BRepAdaptor_Curve.hxx>
#ifndef _AIS_HeaderFile
#define _AIS_HeaderFile
+#include <AIS_KindOfSurface.hxx>
+#include <Aspect_TypeOfLine.hxx>
+#include <Aspect_TypeOfMarker.hxx>
+#include <gp_Dir.hxx>
+#include <gp_Pnt.hxx>
+#include <Quantity_NameOfColor.hxx>
+#include <Prs3d_Drawer.hxx>
+#include <Prs3d_Presentation.hxx>
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
-#include <Standard_Boolean.hxx>
-#include <Standard_Integer.hxx>
-#include <Standard_Real.hxx>
-#include <AIS_KindOfSurface.hxx>
-#include <Prs3d_Drawer.hxx>
-#include <Quantity_NameOfColor.hxx>
-#include <Aspect_TypeOfLine.hxx>
-#include <Aspect_TypeOfMarker.hxx>
-class gp_Pnt;
-class TopoDS_Shape;
-class gp_Lin;
+class Bnd_Box;
class Geom_Curve;
-class TopoDS_Edge;
class Geom_Plane;
-class TopoDS_Vertex;
-class TopoDS_Face;
-class gp_Pln;
class Geom_Surface;
-class gp_Dir;
-class Bnd_Box;
-class gp_Elips;
-class Prs3d_Presentation;
-class AIS_Triangulation;
-class AIS_InteractiveContext;
-class AIS_GraphicTool;
-class AIS_GlobalStatus;
-class AIS_InteractiveObject;
-class AIS_Point;
-class AIS_Axis;
-class AIS_Trihedron;
-class AIS_PlaneTrihedron;
-class AIS_Line;
-class AIS_Circle;
-class AIS_Plane;
-class AIS_Shape;
-class AIS_ConnectedInteractive;
-class AIS_MultipleConnectedInteractive;
-class AIS_DimensionOwner;
-class AIS_Relation;
-class AIS_EllipseRadiusDimension;
-class AIS_MaxRadiusDimension;
-class AIS_MinRadiusDimension;
-class AIS_Chamf2dDimension;
-class AIS_Chamf3dDimension;
-class AIS_OffsetDimension;
-class AIS_FixRelation;
-class AIS_PerpendicularRelation;
-class AIS_ParallelRelation;
-class AIS_TangentRelation;
-class AIS_ConcentricRelation;
-class AIS_IdenticRelation;
-class AIS_SymmetricRelation;
-class AIS_MidPointRelation;
-class AIS_EqualRadiusRelation;
-class AIS_EqualDistanceRelation;
-class AIS_TypeFilter;
-class AIS_SignatureFilter;
-class AIS_ExclusionFilter;
-class AIS_AttributeFilter;
-class AIS_C0RegularityFilter;
-class AIS_BadEdgeFilter;
-class AIS_Selection;
-
+class TopoDS_Edge;
+class TopoDS_Face;
+class TopoDS_Shape;
+class TopoDS_Vertex;
//! Application Interactive Services provide the means to create links between an application GUI viewer and
//! the packages which are used to manage selection and presentation.
#ifndef _AIS_Chamf2dDimension_HeaderFile
#define _AIS_Chamf2dDimension_HeaderFile
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <gp_Pnt.hxx>
-#include <gp_Dir.hxx>
+#include <AIS_KindOfDimension.hxx>
#include <AIS_Relation.hxx>
-#include <Standard_Real.hxx>
#include <DsgPrs_ArrowSide.hxx>
-#include <AIS_KindOfDimension.hxx>
-#include <Standard_Boolean.hxx>
-#include <PrsMgr_PresentationManager3d.hxx>
-#include <Standard_Integer.hxx>
-#include <SelectMgr_Selection.hxx>
-class TopoDS_Shape;
-class Geom_Plane;
-class TCollection_ExtendedString;
-class gp_Pnt;
-class Prs3d_Presentation;
-class Prs3d_Projector;
-class Geom_Transformation;
+#include <gp_Dir.hxx>
+class Geom_Plane;
-class AIS_Chamf2dDimension;
DEFINE_STANDARD_HANDLE(AIS_Chamf2dDimension, AIS_Relation)
//! A framework to define display of 2D chamfers.
//! chamfer, or the angle if it is not.
class AIS_Chamf2dDimension : public AIS_Relation
{
-
+ DEFINE_STANDARD_RTTIEXT(AIS_Chamf2dDimension, AIS_Relation)
public:
-
//! Constructs the display object for 2D chamfers.
//! This object is defined by the face aFShape, the
//! dimension aVal, the plane aPlane and the text aText.
//! to the object to display before computation !!!
Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTrsf, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
-
-
-
- DEFINE_STANDARD_RTTIEXT(AIS_Chamf2dDimension,AIS_Relation)
-
-protected:
-
-
-
-
private:
-
Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE;
gp_Pnt myPntAttach;
gp_Dir myDir;
-
};
-
#include <AIS_Chamf2dDimension.lxx>
-
-
-
-
#endif // _AIS_Chamf2dDimension_HeaderFile
#ifndef _AIS_Chamf3dDimension_HeaderFile
#define _AIS_Chamf3dDimension_HeaderFile
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <gp_Pnt.hxx>
-#include <gp_Dir.hxx>
+#include <AIS_KindOfDimension.hxx>
#include <AIS_Relation.hxx>
-#include <Standard_Real.hxx>
#include <DsgPrs_ArrowSide.hxx>
-#include <AIS_KindOfDimension.hxx>
-#include <Standard_Boolean.hxx>
-#include <PrsMgr_PresentationManager3d.hxx>
-#include <Standard_Integer.hxx>
-#include <SelectMgr_Selection.hxx>
-class TopoDS_Shape;
-class TCollection_ExtendedString;
-class gp_Pnt;
-class Prs3d_Presentation;
-class Prs3d_Projector;
-class Geom_Transformation;
-
+#include <gp_Dir.hxx>
-class AIS_Chamf3dDimension;
DEFINE_STANDARD_HANDLE(AIS_Chamf3dDimension, AIS_Relation)
//! A framework to define display of 3D chamfers.
//! chamfer, or the angle if it is not.
class AIS_Chamf3dDimension : public AIS_Relation
{
-
+ DEFINE_STANDARD_RTTIEXT(AIS_Chamf3dDimension, AIS_Relation)
public:
-
//! Constructs a display object for 3D chamfers.
//! This object is defined by the shape aFShape, the
//! dimension aVal and the text aText.
//! to the object to display before computation !!!
Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTrsf, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
-
-
-
- DEFINE_STANDARD_RTTIEXT(AIS_Chamf3dDimension,AIS_Relation)
-
-protected:
-
-
-
-
private:
-
Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE;
Standard_EXPORT void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
gp_Pnt myPntAttach;
gp_Dir myDir;
-
};
-
#include <AIS_Chamf3dDimension.lxx>
-
-
-
-
#endif // _AIS_Chamf3dDimension_HeaderFile
#ifndef _AIS_ConcentricRelation_HeaderFile
#define _AIS_ConcentricRelation_HeaderFile
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <gp_Pnt.hxx>
-#include <Standard_Real.hxx>
-#include <gp_Dir.hxx>
#include <AIS_Relation.hxx>
-#include <PrsMgr_PresentationManager3d.hxx>
-#include <Standard_Integer.hxx>
-#include <SelectMgr_Selection.hxx>
-class TopoDS_Shape;
-class Geom_Plane;
-class Prs3d_Presentation;
-class Prs3d_Projector;
-class Geom_Transformation;
+#include <gp_Dir.hxx>
+class Geom_Plane;
-class AIS_ConcentricRelation;
DEFINE_STANDARD_HANDLE(AIS_ConcentricRelation, AIS_Relation)
//! A framework to define a constraint by a relation of
//! relation of concentricity can be extended.
class AIS_ConcentricRelation : public AIS_Relation
{
-
+ DEFINE_STANDARD_RTTIEXT(AIS_ConcentricRelation, AIS_Relation)
public:
-
//! Constructs the display object for concentric relations
//! between shapes.
//! This object is defined by the two shapes, aFShape
//! to the object to display before computation !!!
Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTrsf, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
-
-
-
- DEFINE_STANDARD_RTTIEXT(AIS_ConcentricRelation,AIS_Relation)
-
-protected:
-
-
-
-
private:
-
Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE;
Standard_EXPORT void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
gp_Dir myDir;
gp_Pnt myPnt;
-
};
-
-
-
-
-
-
#endif // _AIS_ConcentricRelation_HeaderFile
#include <Precision.hxx>
#include <Prs3d_Drawer.hxx>
#include <Prs3d_Projector.hxx>
-#include <PrsMgr_ModedPresentation.hxx>
#include <Select3D_SensitiveEntity.hxx>
#include <SelectMgr_EntityOwner.hxx>
#include <SelectMgr_Selection.hxx>
void AIS_ConnectedInteractive::Disconnect()
{
- for(Standard_Integer aPrsIter = 1; aPrsIter <= myPresentations.Length(); ++aPrsIter)
+ for (PrsMgr_Presentations::Iterator aPrsIter (myPresentations); aPrsIter.More(); aPrsIter.Next())
{
- const Handle(PrsMgr_Presentation)& aPrs = myPresentations (aPrsIter).Presentation();
+ const Handle(PrsMgr_Presentation)& aPrs = aPrsIter.Value();
if (!aPrs.IsNull())
{
- aPrs->Presentation()->DisconnectAll (Graphic3d_TOC_DESCENDANT);
+ aPrs->DisconnectAll (Graphic3d_TOC_DESCENDANT);
}
}
}
if (HasConnection())
{
thePrs->Clear (Standard_False);
- thePrs->RemoveAll();
+ thePrs->DisconnectAll (Graphic3d_TOC_DESCENDANT);
if (!myReference->HasInteractiveContext())
{
#ifndef _AIS_EqualDistanceRelation_HeaderFile
#define _AIS_EqualDistanceRelation_HeaderFile
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <TopoDS_Shape.hxx>
-#include <gp_Pnt.hxx>
#include <AIS_Relation.hxx>
-#include <PrsMgr_PresentationManager3d.hxx>
-#include <Standard_Integer.hxx>
-#include <SelectMgr_Selection.hxx>
-#include <Prs3d_Drawer.hxx>
-#include <Standard_Real.hxx>
-#include <Standard_Boolean.hxx>
-#include <DsgPrs_ArrowSide.hxx>
#include <AIS_TypeOfDist.hxx>
-class TopoDS_Shape;
-class Geom_Plane;
-class Prs3d_Presentation;
-class Prs3d_Projector;
-class Geom_Transformation;
-class TopoDS_Edge;
-class Bnd_Box;
-class gp_Pnt;
-class TopoDS_Vertex;
+#include <DsgPrs_ArrowSide.hxx>
+class Geom_Plane;
-class AIS_EqualDistanceRelation;
DEFINE_STANDARD_HANDLE(AIS_EqualDistanceRelation, AIS_Relation)
//! A framework to display equivalent distances between
//! These distances are used to compare shapes by this vector alone.
class AIS_EqualDistanceRelation : public AIS_Relation
{
-
+ DEFINE_STANDARD_RTTIEXT(AIS_EqualDistanceRelation,AIS_Relation)
public:
-
//! Constructs a framework to display equivalent
//! distances between the shapes aShape1, aShape2,
//! aShape3, aShape4 and the plane aPlane.
//! a line or a circle.
Standard_EXPORT static void ComputeOneEdgeOneVertexLength (const Handle(Prs3d_Presentation)& aPresentation, const Handle(Prs3d_Drawer)& aDrawer, const Standard_Real ArrowSize, const TopoDS_Shape& FirstShape, const TopoDS_Shape& SecondShape, const Handle(Geom_Plane)& Plane, const Standard_Boolean AutomaticPos, const Standard_Boolean IsSetBndBox, const Bnd_Box& BndBox, gp_Pnt& Position, gp_Pnt& FirstAttach, gp_Pnt& SecondAttach, gp_Pnt& FirstExtreme, gp_Pnt& SecondExtreme, DsgPrs_ArrowSide& SymbolPrs);
-
-
-
- DEFINE_STANDARD_RTTIEXT(AIS_EqualDistanceRelation,AIS_Relation)
-
-protected:
-
-
-
-
private:
-
Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE;
Standard_EXPORT void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
gp_Pnt myPoint3;
gp_Pnt myPoint4;
-
};
-
#include <AIS_EqualDistanceRelation.lxx>
-
-
-
-
#endif // _AIS_EqualDistanceRelation_HeaderFile
#ifndef _AIS_EqualRadiusRelation_HeaderFile
#define _AIS_EqualRadiusRelation_HeaderFile
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <gp_Pnt.hxx>
#include <AIS_Relation.hxx>
-#include <PrsMgr_PresentationManager3d.hxx>
-#include <Standard_Integer.hxx>
-#include <SelectMgr_Selection.hxx>
-class TopoDS_Edge;
-class Geom_Plane;
-class Prs3d_Presentation;
-class Prs3d_Projector;
-class Geom_Transformation;
+class Geom_Plane;
-class AIS_EqualRadiusRelation;
DEFINE_STANDARD_HANDLE(AIS_EqualRadiusRelation, AIS_Relation)
-
class AIS_EqualRadiusRelation : public AIS_Relation
{
-
+ DEFINE_STANDARD_RTTIEXT(AIS_EqualRadiusRelation, AIS_Relation)
public:
-
//! Creates equal relation of two arc's radiuses.
//! If one of edges is not in the given plane,
//! the presentation method projects it onto the plane.
//! to the object to display before computation !!!
Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTrsf, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
-
-
-
- DEFINE_STANDARD_RTTIEXT(AIS_EqualRadiusRelation,AIS_Relation)
-
-protected:
-
-
-
-
private:
-
Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE;
Standard_EXPORT void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
gp_Pnt myFirstPoint;
gp_Pnt mySecondPoint;
-
};
-
-
-
-
-
-
#endif // _AIS_EqualRadiusRelation_HeaderFile
#ifndef _AIS_FixRelation_HeaderFile
#define _AIS_FixRelation_HeaderFile
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
#include <TopoDS_Wire.hxx>
-#include <gp_Pnt.hxx>
#include <AIS_Relation.hxx>
-#include <Standard_Real.hxx>
-#include <Standard_Boolean.hxx>
-#include <PrsMgr_PresentationManager3d.hxx>
-#include <Standard_Integer.hxx>
-#include <SelectMgr_Selection.hxx>
-class TopoDS_Shape;
-class Geom_Plane;
-class TopoDS_Wire;
-class gp_Pnt;
-class Prs3d_Presentation;
-class Prs3d_Projector;
-class Geom_Transformation;
-class TopoDS_Vertex;
-class Geom_Curve;
-class TopoDS_Edge;
-class gp_Lin;
-class gp_Circ;
+class Geom_Plane;
-class AIS_FixRelation;
DEFINE_STANDARD_HANDLE(AIS_FixRelation, AIS_Relation)
//! Constructs and manages a constraint by a fixed
//! object.
class AIS_FixRelation : public AIS_Relation
{
-
+ DEFINE_STANDARD_RTTIEXT(AIS_FixRelation, AIS_Relation)
public:
-
//! initializes the vertex aShape, the
//! plane aPlane and the wire aWire, which connects
//! to the object to display before computation !!!
Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTrsf, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
-
-
-
- DEFINE_STANDARD_RTTIEXT(AIS_FixRelation,AIS_Relation)
-
-protected:
-
-
-
-
private:
};
-
#include <AIS_FixRelation.lxx>
-
-
-
-
#endif // _AIS_FixRelation_HeaderFile
#include <Prs3d_PlaneAspect.hxx>
#include <Prs3d_PointAspect.hxx>
#include <Prs3d_ShadingAspect.hxx>
-#include <PrsMgr_ModedPresentation.hxx>
#include <PrsMgr_PresentableObject.hxx>
#include <Quantity_Color.hxx>
#include <SelectMgr_EntityOwner.hxx>
{
Handle(AIS_MultipleConnectedInteractive) theObj (Handle(AIS_MultipleConnectedInteractive)::DownCast (theAssembly));
theObj->Disconnect (theObjToDisconnect);
+ if (!myObjects.IsBound (theObjToDisconnect))
+ {
+ // connected presentation might contain displayed presentations
+ myMainPM->Erase (theObjToDisconnect, -1);
+ theObjToDisconnect->ErasePresentations (true);
+ }
+
const Handle(SelectMgr_SelectableObject)& anObj = theObjToDisconnect; // to avoid ambiguity
mgrSelector->Remove (anObj);
}
return Standard_False;
}
- myMainPM->AddToImmediateList (myMainPM->Presentation (theObj, theMode)->Presentation());
+ myMainPM->AddToImmediateList (myMainPM->Presentation (theObj, theMode));
return Standard_True;
}
#include <Prs3d_Presentation.hxx>
#include <Prs3d_ShadingAspect.hxx>
#include <Prs3d_TextAspect.hxx>
-#include <PrsMgr_ModedPresentation.hxx>
#include <PrsMgr_PresentationManager.hxx>
IMPLEMENT_STANDARD_RTTIEXT(AIS_InteractiveObject,SelectMgr_SelectableObject)
}
Handle(PrsMgr_Presentation) aPrs = myCTXPtr->MainPrsMgr()->Presentation (this, myDrawer->DisplayMode(), false);
- return !aPrs.IsNull()
- ? aPrs->Presentation()
- : Handle(Prs3d_Presentation)();
+ return aPrs;
}
//=======================================================================
class AIS_InteractiveContext;
class Graphic3d_MaterialAspect;
-class Prs3d_Presentation;
class Prs3d_BasicAspect;
class Bnd_Box;
#include <AIS_Dimension.hxx>
#include <AIS_KindOfDimension.hxx>
#include <Geom_Plane.hxx>
-#include <Geom_Transformation.hxx>
#include <gp_Pnt.hxx>
#include <gp_Dir.hxx>
#include <Prs3d_DimensionAspect.hxx>
#include <Prs3d_Drawer.hxx>
-#include <Prs3d_Presentation.hxx>
#include <Prs3d_Projector.hxx>
-#include <PrsMgr_PresentationManager3d.hxx>
-#include <SelectMgr_Selection.hxx>
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-#include <Standard_Type.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Vertex.hxx>
-#include <TCollection_ExtendedString.hxx>
-
-class TopoDS_Face;
-class TCollection_ExtendedString;
-class gp_Pnt;
-class TopoDS_Edge;
-class TopoDS_Shape;
-class Geom_Plane;
-class Prs3d_Presentation;
-class Prs3d_Projector;
-class Geom_Transformation;
-class SelectMgr_Selection;
-class Bnd_Box;
-class gp_Dir;
-class TopoDS_Vertex;
-class Standard_Transient;
-class AIS_LengthDimension;
DEFINE_STANDARD_HANDLE (AIS_LengthDimension, AIS_Dimension)
#ifndef _AIS_MaxRadiusDimension_HeaderFile
#define _AIS_MaxRadiusDimension_HeaderFile
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <gp_Pnt.hxx>
#include <AIS_EllipseRadiusDimension.hxx>
-#include <Standard_Real.hxx>
#include <DsgPrs_ArrowSide.hxx>
-#include <PrsMgr_PresentationManager3d.hxx>
-#include <Standard_Integer.hxx>
-#include <SelectMgr_Selection.hxx>
-class Standard_ConstructionError;
-class TopoDS_Shape;
-class TCollection_ExtendedString;
-class gp_Pnt;
-class Prs3d_Presentation;
-class Prs3d_Projector;
-class Geom_Transformation;
-
-class AIS_MaxRadiusDimension;
DEFINE_STANDARD_HANDLE(AIS_MaxRadiusDimension, AIS_EllipseRadiusDimension)
-
//! Ellipse Max radius dimension of a Shape which can be Edge
//! or Face (planar or cylindrical(surface of extrusion or
//! surface of offset))
class AIS_MaxRadiusDimension : public AIS_EllipseRadiusDimension
{
-
+ DEFINE_STANDARD_RTTIEXT(AIS_MaxRadiusDimension, AIS_EllipseRadiusDimension)
public:
-
//! Max Ellipse radius dimension
//! Shape can be edge , planar face or cylindrical face
Standard_EXPORT AIS_MaxRadiusDimension(const TopoDS_Shape& aShape, const Standard_Real aVal, const TCollection_ExtendedString& aText);
//! to the object to display before computation !!!
Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTrsf, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
-
-
-
- DEFINE_STANDARD_RTTIEXT(AIS_MaxRadiusDimension,AIS_EllipseRadiusDimension)
-
-protected:
-
-
-
-
private:
-
Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE;
Standard_EXPORT void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
gp_Pnt myApexN;
gp_Pnt myEndOfArrow;
-
};
-
-
-
-
-
-
#endif // _AIS_MaxRadiusDimension_HeaderFile
#ifndef _AIS_MidPointRelation_HeaderFile
#define _AIS_MidPointRelation_HeaderFile
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <TopoDS_Shape.hxx>
-#include <gp_Pnt.hxx>
#include <AIS_Relation.hxx>
-#include <Standard_Boolean.hxx>
-#include <PrsMgr_PresentationManager3d.hxx>
-#include <Standard_Integer.hxx>
-#include <SelectMgr_Selection.hxx>
-class TopoDS_Shape;
+
class Geom_Plane;
-class Prs3d_Presentation;
-class Prs3d_Projector;
-class Geom_Transformation;
class gp_Lin;
class gp_Pnt;
class gp_Circ;
class gp_Elips;
-
-class AIS_MidPointRelation;
DEFINE_STANDARD_HANDLE(AIS_MidPointRelation, AIS_Relation)
//! presentation of equal distance to point myMidPoint
class AIS_MidPointRelation : public AIS_Relation
{
-
+ DEFINE_STANDARD_RTTIEXT(AIS_MidPointRelation, AIS_Relation)
public:
-
Standard_EXPORT AIS_MidPointRelation(const TopoDS_Shape& aSymmTool, const TopoDS_Shape& FirstShape, const TopoDS_Shape& SecondShape, const Handle(Geom_Plane)& aPlane);
virtual Standard_Boolean IsMovable() const Standard_OVERRIDE;
//! to the object to display before computation !!!
Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTrsf, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
-
-
-
- DEFINE_STANDARD_RTTIEXT(AIS_MidPointRelation,AIS_Relation)
-
-protected:
-
-
-
-
private:
-
Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE;
Standard_EXPORT void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
gp_Pnt mySecondPnt1;
gp_Pnt mySecondPnt2;
-
};
-
#include <AIS_MidPointRelation.lxx>
-
-
-
-
#endif // _AIS_MidPointRelation_HeaderFile
#ifndef _AIS_MinRadiusDimension_HeaderFile
#define _AIS_MinRadiusDimension_HeaderFile
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <gp_Pnt.hxx>
#include <AIS_EllipseRadiusDimension.hxx>
-#include <Standard_Real.hxx>
#include <DsgPrs_ArrowSide.hxx>
-#include <PrsMgr_PresentationManager3d.hxx>
-#include <Standard_Integer.hxx>
-#include <SelectMgr_Selection.hxx>
-class Standard_ConstructionError;
-class TopoDS_Shape;
-class TCollection_ExtendedString;
-class gp_Pnt;
-class Prs3d_Presentation;
-class Prs3d_Projector;
-class Geom_Transformation;
-
-class AIS_MinRadiusDimension;
DEFINE_STANDARD_HANDLE(AIS_MinRadiusDimension, AIS_EllipseRadiusDimension)
//! -- Ellipse Min radius dimension of a Shape which
//! extrusion or surface of offset))
class AIS_MinRadiusDimension : public AIS_EllipseRadiusDimension
{
-
+ DEFINE_STANDARD_RTTIEXT(AIS_MinRadiusDimension, AIS_EllipseRadiusDimension)
public:
-
//! Max Ellipse radius dimension
//! Shape can be edge , planar face or cylindrical face
Standard_EXPORT AIS_MinRadiusDimension(const TopoDS_Shape& aShape, const Standard_Real aVal, const TCollection_ExtendedString& aText);
//! to the object to display before computation !!!
Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTrsf, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
-
-
-
- DEFINE_STANDARD_RTTIEXT(AIS_MinRadiusDimension,AIS_EllipseRadiusDimension)
-
-protected:
-
-
-
-
private:
-
Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE;
gp_Pnt myApexN;
gp_Pnt myEndOfArrow;
-
};
-
-
-
-
-
-
#endif // _AIS_MinRadiusDimension_HeaderFile
#include <AIS_InteractiveContext.hxx>
#include <AIS_InteractiveObject.hxx>
#include <Prs3d_Projector.hxx>
-#include <PrsMgr_ModedPresentation.hxx>
#include <Select3D_SensitiveEntity.hxx>
#include <SelectMgr_EntityOwner.hxx>
#include <Standard_NotImplemented.hxx>
#ifndef _AIS_OffsetDimension_HeaderFile
#define _AIS_OffsetDimension_HeaderFile
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <gp_Pnt.hxx>
-#include <gp_Dir.hxx>
-#include <gp_Trsf.hxx>
#include <AIS_Relation.hxx>
-#include <Standard_Real.hxx>
-#include <PrsMgr_PresentationManager3d.hxx>
-#include <Standard_Integer.hxx>
-#include <SelectMgr_Selection.hxx>
#include <AIS_KindOfDimension.hxx>
-#include <Standard_Boolean.hxx>
-class TopoDS_Shape;
-class TCollection_ExtendedString;
-class Prs3d_Presentation;
-class Prs3d_Projector;
-class Geom_Transformation;
-class gp_Trsf;
-
-class AIS_OffsetDimension;
DEFINE_STANDARD_HANDLE(AIS_OffsetDimension, AIS_Relation)
//! A framework to display dimensions of offsets.
//! and the basis shape.
class AIS_OffsetDimension : public AIS_Relation
{
-
+ DEFINE_STANDARD_RTTIEXT(AIS_OffsetDimension, AIS_Relation)
public:
-
//! Constructs the offset display object defined by the
//! first shape aFShape, the second shape aSShape, the
//! dimension aVal, and the text aText.
//! selection to a relative position.
void SetRelativePos (const gp_Trsf& aTrsf);
-
-
-
- DEFINE_STANDARD_RTTIEXT(AIS_OffsetDimension,AIS_Relation)
-
-protected:
-
-
-
-
private:
-
Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE;
Standard_EXPORT void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
gp_Dir myDirAttach2;
gp_Trsf myRelativePos;
-
};
-
#include <AIS_OffsetDimension.lxx>
-
-
-
-
#endif // _AIS_OffsetDimension_HeaderFile
#ifndef _AIS_ParallelRelation_HeaderFile
#define _AIS_ParallelRelation_HeaderFile
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <gp_Pnt.hxx>
-#include <gp_Dir.hxx>
#include <AIS_Relation.hxx>
#include <DsgPrs_ArrowSide.hxx>
-#include <Standard_Real.hxx>
-#include <Standard_Boolean.hxx>
-#include <PrsMgr_PresentationManager3d.hxx>
-#include <Standard_Integer.hxx>
-#include <SelectMgr_Selection.hxx>
-class TopoDS_Shape;
-class Geom_Plane;
-class gp_Pnt;
-class Prs3d_Presentation;
-class Prs3d_Projector;
-class Geom_Transformation;
-
-class AIS_ParallelRelation;
DEFINE_STANDARD_HANDLE(AIS_ParallelRelation, AIS_Relation)
//! A framework to display constraints of parallelism
//! entities can be faces or edges.
class AIS_ParallelRelation : public AIS_Relation
{
-
+ DEFINE_STANDARD_RTTIEXT(AIS_ParallelRelation, AIS_Relation)
public:
//! to the object to display before computation !!!
Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTrsf, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
-
-
-
- DEFINE_STANDARD_RTTIEXT(AIS_ParallelRelation,AIS_Relation)
-
-protected:
-
-
-
-
private:
-
Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE;
Standard_EXPORT void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
gp_Pnt mySAttach;
gp_Dir myDirAttach;
-
};
-
#include <AIS_ParallelRelation.lxx>
-
-
-
-
#endif // _AIS_ParallelRelation_HeaderFile
#ifndef _AIS_PerpendicularRelation_HeaderFile
#define _AIS_PerpendicularRelation_HeaderFile
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <gp_Pnt.hxx>
#include <AIS_Relation.hxx>
-#include <PrsMgr_PresentationManager3d.hxx>
-#include <Standard_Integer.hxx>
-#include <SelectMgr_Selection.hxx>
-class TopoDS_Shape;
-class Geom_Plane;
-class Prs3d_Presentation;
-class Prs3d_Projector;
-class Geom_Transformation;
-
-class AIS_PerpendicularRelation;
DEFINE_STANDARD_HANDLE(AIS_PerpendicularRelation, AIS_Relation)
//! A framework to display constraints of perpendicularity
//! datums can be edges or faces.
class AIS_PerpendicularRelation : public AIS_Relation
{
-
+ DEFINE_STANDARD_RTTIEXT(AIS_PerpendicularRelation, AIS_Relation)
public:
-
//! Constructs an object to display constraints of
//! perpendicularity on shapes.
//! This object is defined by a first shape aFShape, a
//! to the object to display before computation !!!
Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTrsf, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
-
-
-
- DEFINE_STANDARD_RTTIEXT(AIS_PerpendicularRelation,AIS_Relation)
-
-protected:
-
-
-
-
private:
gp_Pnt myFAttach;
gp_Pnt mySAttach;
-
};
-
-
-
-
-
-
#endif // _AIS_PerpendicularRelation_HeaderFile
#include <Prs3d_Presentation.hxx>
#include <Prs3d_Root.hxx>
#include <Prs3d_ShadingAspect.hxx>
-#include <PrsMgr_ModedPresentation.hxx>
#include <PrsMgr_Presentations.hxx>
#include <Select3D_SensitiveBox.hxx>
#include <Select3D_SensitivePrimitiveArray.hxx>
#include <DsgPrs_ArrowSide.hxx>
#include <gp_Pln.hxx>
#include <gp_Pnt.hxx>
-#include <PrsMgr_TypeOfPresentation3d.hxx>
#include <TCollection_ExtendedString.hxx>
#include <TopoDS_Shape.hxx>
#include <Prs3d_ShadingAspect.hxx>
#include <StdPrs_BndBox.hxx>
#include <StdPrs_ToolTriangulatedShape.hxx>
-#include <PrsMgr_ModedPresentation.hxx>
#include <Quantity_Color.hxx>
#include <Select3D_SensitiveBox.hxx>
#include <Select3D_SensitiveEntity.hxx>
#ifndef _AIS_SymmetricRelation_HeaderFile
#define _AIS_SymmetricRelation_HeaderFile
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
#include <TopoDS_Shape.hxx>
#include <gp_Pnt.hxx>
#include <gp_Dir.hxx>
#include <AIS_Relation.hxx>
-#include <Standard_Boolean.hxx>
-#include <PrsMgr_PresentationManager3d.hxx>
-#include <Standard_Integer.hxx>
-#include <SelectMgr_Selection.hxx>
-class TopoDS_Shape;
-class Geom_Plane;
-class Prs3d_Presentation;
-class Prs3d_Projector;
-class Geom_Transformation;
-
-class AIS_SymmetricRelation;
DEFINE_STANDARD_HANDLE(AIS_SymmetricRelation, AIS_Relation)
//! A framework to display constraints of symmetricity
//! shapes of which the datums are parts.
class AIS_SymmetricRelation : public AIS_Relation
{
-
+ DEFINE_STANDARD_RTTIEXT(AIS_SymmetricRelation, AIS_Relation)
public:
-
//! Constructs an object to display constraints of symmetricity.
//! This object is defined by a tool aSymmTool, a first
//! shape FirstShape, a second shape SecondShape, and a plane aPlane.
//! to the object to display before computation !!!
Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTrsf, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
-
-
-
- DEFINE_STANDARD_RTTIEXT(AIS_SymmetricRelation,AIS_Relation)
-
-protected:
-
-
-
-
private:
-
Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE;
Standard_EXPORT void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
gp_Dir myFDirAttach;
gp_Dir myAxisDirAttach;
-
};
-
#include <AIS_SymmetricRelation.lxx>
-
-
-
-
#endif // _AIS_SymmetricRelation_HeaderFile
#ifndef _AIS_TangentRelation_HeaderFile
#define _AIS_TangentRelation_HeaderFile
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <gp_Pnt.hxx>
-#include <gp_Dir.hxx>
-#include <Standard_Real.hxx>
-#include <Standard_Integer.hxx>
#include <AIS_Relation.hxx>
-#include <PrsMgr_PresentationManager3d.hxx>
-#include <SelectMgr_Selection.hxx>
-class TopoDS_Shape;
-class Geom_Plane;
-class Prs3d_Presentation;
-class Prs3d_Projector;
-class Geom_Transformation;
-
-class AIS_TangentRelation;
DEFINE_STANDARD_HANDLE(AIS_TangentRelation, AIS_Relation)
//! A framework to display tangency constraints between
//! The datums are normally faces or edges.
class AIS_TangentRelation : public AIS_Relation
{
-
+ DEFINE_STANDARD_RTTIEXT(AIS_TangentRelation, AIS_Relation)
public:
-
//! TwoFacesTangent or TwoEdgesTangent relation
//! Constructs an object to display tangency constraints.
//! This object is defined by the first shape aFShape, the
//! to the object to display before computation !!!
Standard_EXPORT virtual void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Geom_Transformation)& aTrsf, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
-
-
-
- DEFINE_STANDARD_RTTIEXT(AIS_TangentRelation,AIS_Relation)
-
-protected:
-
-
-
-
private:
-
Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE;
Standard_EXPORT void Compute (const Handle(Prs3d_Projector)& aProjector, const Handle(Prs3d_Presentation)& aPresentation) Standard_OVERRIDE;
Standard_Real myLength;
Standard_Integer myExternRef;
-
};
-
-
-
-
-
-
#endif // _AIS_TangentRelation_HeaderFile
#include <Precision.hxx>
#include <Prs3d_Drawer.hxx>
#include <Prs3d_Presentation.hxx>
-#include <PrsMgr_ModedPresentation.hxx>
#include <Prs3d_Root.hxx>
#include <Prs3d_LineAspect.hxx>
#include <Prs3d_ShadingAspect.hxx>
{
AIS_Shape::SetColor (theColor);
- for (Standard_Integer aPrsIt = 1; aPrsIt <= Presentations().Length(); ++aPrsIt)
+ for (PrsMgr_Presentations::Iterator aPrsIter (Presentations()); aPrsIter.More(); aPrsIter.Next())
{
- const PrsMgr_ModedPresentation& aPrsModed = Presentations().Value (aPrsIt);
-
- if (aPrsModed.Mode() != 3)
- continue;
-
- updateAttributes (aPrsModed.Presentation()->Presentation());
+ if (aPrsIter.Value()->Mode() == 3)
+ {
+ updateAttributes (aPrsIter.Value());
+ }
}
}
void AIS_TexturedShape::SetMaterial (const Graphic3d_MaterialAspect& theMat)
{
AIS_Shape::SetMaterial (theMat);
-
- for (Standard_Integer aPrsIt = 1; aPrsIt <= Presentations().Length(); ++aPrsIt)
+ for (PrsMgr_Presentations::Iterator aPrsIter (Presentations()); aPrsIter.More(); aPrsIter.Next())
{
- const PrsMgr_ModedPresentation& aPrsModed = Presentations().Value (aPrsIt);
-
- if (aPrsModed.Mode() != 3)
- continue;
-
- updateAttributes (aPrsModed.Presentation()->Presentation());
+ if (aPrsIter.Value()->Mode() == 3)
+ {
+ updateAttributes (aPrsIter.Value());
+ }
}
}
void AIS_TexturedShape::UnsetMaterial()
{
AIS_Shape::UnsetMaterial();
-
- for (Standard_Integer aPrsIt = 1; aPrsIt <= Presentations().Length(); ++aPrsIt)
+ for (PrsMgr_Presentations::Iterator aPrsIter (Presentations()); aPrsIter.More(); aPrsIter.Next())
{
- const PrsMgr_ModedPresentation& aPrsModed = Presentations().Value (aPrsIt);
-
- if (aPrsModed.Mode() != 3)
- continue;
-
- updateAttributes (aPrsModed.Presentation()->Presentation());
+ if (aPrsIter.Value()->Mode() == 3)
+ {
+ updateAttributes (aPrsIter.Value());
+ }
}
}
// modify shading presentation without re-computation
const PrsMgr_Presentations& aPrsList = Presentations();
Handle(Graphic3d_AspectFillArea3d) anAreaAsp = myDrawer->ShadingAspect()->Aspect();
- for (Standard_Integer aPrsIt = 1; aPrsIt <= aPrsList.Length(); ++aPrsIt)
+ for (PrsMgr_Presentations::Iterator aPrsIter (aPrsList); aPrsIter.More(); aPrsIter.Next())
{
- const PrsMgr_ModedPresentation& aPrsModed = aPrsList.Value (aPrsIt);
- if (aPrsModed.Mode() != AIS_WireFrame)
+ if (aPrsIter.Value()->Mode() != AIS_WireFrame)
{
continue;
}
- const Handle(Prs3d_Presentation)& aPrs = aPrsModed.Presentation()->Presentation();
-
+ const Handle(Prs3d_Presentation)& aPrs = aPrsIter.Value();
for (Graphic3d_SequenceOfGroup::Iterator aGroupIt (aPrs->Groups()); aGroupIt.More(); aGroupIt.Next())
{
const Handle(Graphic3d_Group)& aGroup = aGroupIt.Value();
#ifndef _AIS_Triangulation_HeaderFile
#define _AIS_Triangulation_HeaderFile
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
#include <TColStd_HArray1OfInteger.hxx>
-#include <Standard_Integer.hxx>
#include <AIS_InteractiveObject.hxx>
-#include <PrsMgr_PresentationManager3d.hxx>
-#include <SelectMgr_Selection.hxx>
-#include <Standard_Real.hxx>
-class Poly_Triangulation;
-class Prs3d_Presentation;
+class Poly_Triangulation;
-class AIS_Triangulation;
DEFINE_STANDARD_HANDLE(AIS_Triangulation, AIS_InteractiveObject)
//! Interactive object that draws data from Poly_Triangulation, optionally with colors associated
//! Interactive selection of triangles and vertices is not yet implemented.
class AIS_Triangulation : public AIS_InteractiveObject
{
-
+ DEFINE_STANDARD_RTTIEXT(AIS_Triangulation, AIS_InteractiveObject)
public:
-
//! Constructs the Triangulation display object
Standard_EXPORT AIS_Triangulation(const Handle(Poly_Triangulation)& aTriangulation);
//! Removes the setting for transparency in the reconstructed compound shape.
Standard_EXPORT virtual void UnsetTransparency() Standard_OVERRIDE;
- DEFINE_STANDARD_RTTIEXT(AIS_Triangulation,AIS_InteractiveObject)
-
protected:
Standard_EXPORT void updatePresentation();
Standard_Integer myNbNodes;
Standard_Integer myNbTriangles;
-
};
-
-
-
-
-
-
#endif // _AIS_Triangulation_HeaderFile
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
+#include <DsgPrs.hxx>
+
#include <Aspect_TypeOfLine.hxx>
#include <Aspect_TypeOfMarker.hxx>
-#include <DsgPrs.hxx>
#include <ElCLib.hxx>
#include <gce_MakeLin.hxx>
#include <Geom_Circle.hxx>
#ifndef _DsgPrs_HeaderFile
#define _DsgPrs_HeaderFile
-#include <Standard.hxx>
-#include <Standard_DefineAlloc.hxx>
-#include <Standard_Handle.hxx>
-
#include <DsgPrs_ArrowSide.hxx>
-#include <Standard_Boolean.hxx>
-#include <Standard_Real.hxx>
-class Prs3d_Presentation;
-class Prs3d_DimensionAspect;
-class gp_Pnt;
-class gp_Dir;
-class gp_Pln;
-class Geom_Surface;
-class Geom_Curve;
-class gp_Ax1;
-class gp_Circ;
-class gp_Elips;
-class DsgPrs_EllipseRadiusPresentation;
-class DsgPrs_LengthPresentation;
-class DsgPrs_RadiusPresentation;
-class DsgPrs_DiameterPresentation;
-class DsgPrs_FilletRadiusPresentation;
-class DsgPrs_AnglePresentation;
-class DsgPrs_Chamf2dPresentation;
-class DsgPrs_ParalPresentation;
-class DsgPrs_PerpenPresentation;
-class DsgPrs_SymmetricPresentation;
-class DsgPrs_MidPointPresentation;
-class DsgPrs_TangentPresentation;
-class DsgPrs_ConcentricPresentation;
-class DsgPrs_FixPresentation;
-class DsgPrs_IdenticPresentation;
-class DsgPrs_EqualRadiusPresentation;
-class DsgPrs_EqualDistancePresentation;
-class DsgPrs_SymbPresentation;
-class DsgPrs_ShapeDirPresentation;
-class DsgPrs_OffsetPresentation;
-class DsgPrs_XYZAxisPresentation;
-class DsgPrs_XYZPlanePresentation;
-class DsgPrs_ShadedPlanePresentation;
+#include <gp_Dir.hxx>
+#include <gp_Pnt.hxx>
+#include <Prs3d_Presentation.hxx>
+class Geom_Curve;
+class Geom_Surface;
+class Prs3d_DimensionAspect;
//! Describes Standard Presentations for DsgIHM objects
class DsgPrs
DEFINE_STANDARD_ALLOC
-
//! draws symbols ((one or two) arrows,(one or two)points
//! at thebeginning and at the end of the dimension
Standard_EXPORT static void ComputeSymbol (const Handle(Prs3d_Presentation)& aPresentation, const Handle(Prs3d_DimensionAspect)& anAspect, const gp_Pnt& pt1, const gp_Pnt& pt2, const gp_Dir& dir1, const gp_Dir& dir2, const DsgPrs_ArrowSide ArrowSide, const Standard_Boolean drawFromCenter = Standard_True);
//! computes length of ellipse arc in parametric units
Standard_EXPORT static Standard_Real DistanceFromApex (const gp_Elips& elips, const gp_Pnt& Apex, const Standard_Real par);
-
-
-
-protected:
-
-
-
-
-
-private:
-
-
-
-
-friend class DsgPrs_EllipseRadiusPresentation;
-friend class DsgPrs_LengthPresentation;
-friend class DsgPrs_RadiusPresentation;
-friend class DsgPrs_DiameterPresentation;
-friend class DsgPrs_FilletRadiusPresentation;
-friend class DsgPrs_AnglePresentation;
-friend class DsgPrs_Chamf2dPresentation;
-friend class DsgPrs_ParalPresentation;
-friend class DsgPrs_PerpenPresentation;
-friend class DsgPrs_SymmetricPresentation;
-friend class DsgPrs_MidPointPresentation;
-friend class DsgPrs_TangentPresentation;
-friend class DsgPrs_ConcentricPresentation;
-friend class DsgPrs_FixPresentation;
-friend class DsgPrs_IdenticPresentation;
-friend class DsgPrs_EqualRadiusPresentation;
-friend class DsgPrs_EqualDistancePresentation;
-friend class DsgPrs_SymbPresentation;
-friend class DsgPrs_ShapeDirPresentation;
-friend class DsgPrs_OffsetPresentation;
-friend class DsgPrs_XYZAxisPresentation;
-friend class DsgPrs_XYZPlanePresentation;
-friend class DsgPrs_ShadedPlanePresentation;
-
};
-
-
-
-
-
-
#endif // _DsgPrs_HeaderFile
#include <Standard_Real.hxx>
#include <DsgPrs_ArrowSide.hxx>
#include <Standard_Boolean.hxx>
-class Prs3d_Presentation;
+#include <Prs3d_Presentation.hxx>
+
class TCollection_ExtendedString;
class gp_Circ;
class gp_Pnt;
#include <Prs3d_Drawer.hxx>
#include <DsgPrs_ArrowSide.hxx>
-class Prs3d_Presentation;
+#include <Prs3d_Presentation.hxx>
+
class gp_Pnt;
class TCollection_ExtendedString;
-
//! Framework for display of 2D chamfers.
class DsgPrs_Chamf2dPresentation
{
#include <Standard_Handle.hxx>
#include <Prs3d_Drawer.hxx>
-#include <Standard_Real.hxx>
-class Prs3d_Presentation;
+#include <Prs3d_Presentation.hxx>
+
class gp_Pnt;
class gp_Dir;
-
//! A framework to define display of relations of concentricity.
class DsgPrs_ConcentricPresentation
{
#include <Prs3d_Drawer.hxx>
#include <DsgPrs_ArrowSide.hxx>
-#include <Standard_Boolean.hxx>
-#include <Standard_Real.hxx>
-class Prs3d_Presentation;
+#include <Prs3d_Presentation.hxx>
+
class TCollection_ExtendedString;
class gp_Pnt;
class gp_Circ;
#include <Standard_Handle.hxx>
#include <Prs3d_Drawer.hxx>
-#include <Standard_Real.hxx>
-#include <Standard_Boolean.hxx>
#include <DsgPrs_ArrowSide.hxx>
-class Prs3d_Presentation;
+#include <Prs3d_Presentation.hxx>
+
class TCollection_ExtendedString;
class gp_Pnt;
class gp_Elips;
class Geom_OffsetCurve;
-
-
class DsgPrs_EllipseRadiusPresentation
{
public:
#include <Prs3d_Drawer.hxx>
#include <DsgPrs_ArrowSide.hxx>
-class Prs3d_Presentation;
+#include <Prs3d_Presentation.hxx>
+
class gp_Pnt;
class Geom_Plane;
class gp_Dir;
class gp_Circ;
-
//! A framework to display equal distances between shapes and a given plane.
//! The distance is the length of a projection from the shape to the plane.
//! These distances are used to compare two shapes by this vector alone.
#include <Standard_Handle.hxx>
#include <Prs3d_Drawer.hxx>
-class Prs3d_Presentation;
+#include <Prs3d_Presentation.hxx>
+
class gp_Pnt;
class Geom_Plane;
-
//! A framework to define display of equality in radii.
class DsgPrs_EqualRadiusPresentation
{
#include <Standard_Handle.hxx>
#include <Prs3d_Drawer.hxx>
-#include <Standard_Real.hxx>
#include <DsgPrs_ArrowSide.hxx>
-#include <Standard_Boolean.hxx>
-class Prs3d_Presentation;
+#include <Prs3d_Presentation.hxx>
+
class TCollection_ExtendedString;
class gp_Pnt;
class gp_Dir;
class Geom_TrimmedCurve;
-
//! A framework for displaying radii of fillets.
class DsgPrs_FilletRadiusPresentation
{
#include <Standard_Handle.hxx>
#include <Prs3d_Drawer.hxx>
-#include <Standard_Real.hxx>
-class Prs3d_Presentation;
+#include <Prs3d_Presentation.hxx>
+
class gp_Pnt;
class gp_Dir;
-
//! class which draws the presentation of Fixed objects
class DsgPrs_FixPresentation
{
#include <Standard_Handle.hxx>
#include <Prs3d_Drawer.hxx>
-class Prs3d_Presentation;
+#include <Prs3d_Presentation.hxx>
+
class TCollection_ExtendedString;
class gp_Pnt;
class gp_Ax2;
class gp_Elips;
-
-
class DsgPrs_IdenticPresentation
{
public:
#include <Prs3d_Drawer.hxx>
#include <DsgPrs_ArrowSide.hxx>
-class Prs3d_Presentation;
+#include <Prs3d_Presentation.hxx>
+
class TCollection_ExtendedString;
class gp_Pnt;
class gp_Dir;
class gp_Pln;
class Geom_Surface;
-
//! Framework for displaying lengths.
//! The length displayed is indicated by line segments
//! and text alone or by a combination of line segment,
#include <Standard_Handle.hxx>
#include <Prs3d_Drawer.hxx>
-#include <Standard_Boolean.hxx>
-class Prs3d_Presentation;
+#include <Prs3d_Presentation.hxx>
+
class gp_Ax2;
class gp_Pnt;
class gp_Circ;
class gp_Elips;
-
-
class DsgPrs_MidPointPresentation
{
public:
#include <Standard_Handle.hxx>
#include <Prs3d_Drawer.hxx>
-class Prs3d_Presentation;
+#include <Prs3d_Presentation.hxx>
+
class TCollection_ExtendedString;
class gp_Pnt;
class gp_Dir;
-
//! A framework to define display of offsets.
class DsgPrs_OffsetPresentation
{
#ifndef _DsgPrs_ParalPresentation_HeaderFile
#define _DsgPrs_ParalPresentation_HeaderFile
-#include <Standard.hxx>
-#include <Standard_DefineAlloc.hxx>
-#include <Standard_Handle.hxx>
-
#include <Prs3d_Drawer.hxx>
#include <DsgPrs_ArrowSide.hxx>
-class Prs3d_Presentation;
+#include <Prs3d_Presentation.hxx>
+
class TCollection_ExtendedString;
class gp_Pnt;
class gp_Dir;
-
//! A framework to define display of relations of parallelism between shapes.
class DsgPrs_ParalPresentation
{
#include <Standard_Handle.hxx>
#include <Prs3d_Drawer.hxx>
-#include <Standard_Boolean.hxx>
-class Prs3d_Presentation;
-class gp_Pnt;
+#include <Prs3d_Presentation.hxx>
+class gp_Pnt;
//! A framework to define display of perpendicular
//! constraints between shapes.
#include <Standard_Handle.hxx>
#include <Prs3d_Drawer.hxx>
-#include <Standard_Real.hxx>
-#include <Standard_Boolean.hxx>
#include <DsgPrs_ArrowSide.hxx>
-class Prs3d_Presentation;
+#include <Prs3d_Presentation.hxx>
+
class TCollection_ExtendedString;
class gp_Pnt;
class gp_Circ;
#include <Standard_Handle.hxx>
#include <Prs3d_Drawer.hxx>
-class Prs3d_Presentation;
-class gp_Pnt;
+#include <Prs3d_Presentation.hxx>
+class gp_Pnt;
//! A framework to define display of shaded planes.
class DsgPrs_ShadedPlanePresentation
#include <Standard_Handle.hxx>
#include <Prs3d_Drawer.hxx>
-#include <Standard_Integer.hxx>
-class Prs3d_Presentation;
-class TopoDS_Shape;
+#include <Prs3d_Presentation.hxx>
+class TopoDS_Shape;
//! A framework to define display of the normal to the
//! surface of a shape.
#include <Standard_Handle.hxx>
#include <Prs3d_Drawer.hxx>
-class Prs3d_Presentation;
+#include <Prs3d_Presentation.hxx>
+
class TCollection_ExtendedString;
class gp_Pnt;
-
//! A framework to define display of symbols.
class DsgPrs_SymbPresentation
{
#include <Standard_Handle.hxx>
#include <Prs3d_Drawer.hxx>
-class Prs3d_Presentation;
+#include <Prs3d_Presentation.hxx>
+
class gp_Pnt;
class gp_Dir;
class gp_Lin;
class gp_Circ;
-
//! A framework to define display of symmetry between shapes.
class DsgPrs_SymmetricPresentation
{
#include <Standard_Handle.hxx>
#include <Prs3d_Drawer.hxx>
-#include <Standard_Real.hxx>
-class Prs3d_Presentation;
+#include <Prs3d_Presentation.hxx>
+
class gp_Pnt;
class gp_Dir;
-
//! A framework to define display of tangents.
class DsgPrs_TangentPresentation
{
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
-#include <Standard_Real.hxx>
#include <Standard_CString.hxx>
-class Prs3d_Presentation;
+#include <Prs3d_Presentation.hxx>
+
class Prs3d_LineAspect;
class gp_Dir;
class gp_Pnt;
class Prs3d_ArrowAspect;
class Prs3d_TextAspect;
-
//! A framework for displaying the axes of an XYZ trihedron.
class DsgPrs_XYZAxisPresentation
{
#include <Standard_Handle.hxx>
#include <Prs3d_Drawer.hxx>
-class Prs3d_Presentation;
-class gp_Pnt;
+#include <Prs3d_Presentation.hxx>
+class gp_Pnt;
//! A framework for displaying the planes of an XYZ trihedron.
class DsgPrs_XYZPlanePresentation
Graphic3d_HorizontalTextAlignment.hxx
Graphic3d_IndexBuffer.hxx
Graphic3d_MutableIndexBuffer.hxx
-Graphic3d_IndexedMapOfAddress.hxx
Graphic3d_LevelOfTextureAnisotropy.hxx
Graphic3d_LightSet.cxx
Graphic3d_LightSet.hxx
// function : Clear
// purpose :
// =======================================================================
-void Graphic3d_CView::Clear (const Handle(Graphic3d_Structure)& theStructure,
+void Graphic3d_CView::Clear (Graphic3d_Structure* theStructure,
const Standard_Boolean theWithDestruction)
{
const Standard_Integer anIndex = IsComputed (theStructure);
// function : Connect
// purpose :
// =======================================================================
-void Graphic3d_CView::Connect (const Handle(Graphic3d_Structure)& theMother,
- const Handle(Graphic3d_Structure)& theDaughter)
+void Graphic3d_CView::Connect (const Graphic3d_Structure* theMother,
+ const Graphic3d_Structure* theDaughter)
{
Standard_Integer anIndexM = IsComputed (theMother);
Standard_Integer anIndexD = IsComputed (theDaughter);
// function : Disconnect
// purpose :
// =======================================================================
-void Graphic3d_CView::Disconnect (const Handle(Graphic3d_Structure)& theMother,
- const Handle(Graphic3d_Structure)& theDaughter)
+void Graphic3d_CView::Disconnect (const Graphic3d_Structure* theMother,
+ const Graphic3d_Structure* theDaughter)
{
Standard_Integer anIndexM = IsComputed (theMother);
Standard_Integer anIndexD = IsComputed (theDaughter);
return;
}
- Graphic3d_TypeOfAnswer anAnswer = acceptDisplay (theStructure->Visual());
- if (!ComputedMode())
- {
- anAnswer = Graphic3d_TOA_YES;
- }
-
+ const Graphic3d_TypeOfAnswer anAnswer = myIsInComputedMode ? acceptDisplay (theStructure->Visual()) : Graphic3d_TOA_YES;
if (anAnswer != Graphic3d_TOA_COMPUTE)
{
eraseStructure (theStructure->CStructure());
}
- else if (anAnswer == Graphic3d_TOA_COMPUTE && myIsInComputedMode)
+
+ const Standard_Integer anIndex = !myStructsToCompute.IsEmpty() ? IsComputed (theStructure) : 0;
+ if (anIndex != 0)
{
- const Standard_Integer anIndex = IsComputed (theStructure);
- if (anIndex != 0)
+ if (anAnswer == Graphic3d_TOA_COMPUTE
+ && myIsInComputedMode)
{
const Handle(Graphic3d_Structure)& aCompStruct = myStructsComputed.ChangeValue (anIndex);
eraseStructure (aCompStruct->CStructure());
}
+ myStructsComputed .Remove (anIndex);
+ myStructsToCompute.Remove (anIndex);
}
+
myStructsDisplayed.Remove (theStructure);
Update (theStructure->GetZLayer());
}
// function : IsComputed
// purpose :
// =======================================================================
-Standard_Integer Graphic3d_CView::IsComputed (const Handle(Graphic3d_Structure)& theStructure) const
+Standard_Integer Graphic3d_CView::IsComputed (const Graphic3d_Structure* theStructure) const
{
const Standard_Integer aStructId = theStructure->Identification();
- const Standard_Integer aNbStructs = myStructsToCompute.Length();
- for (Standard_Integer aStructIter = 1; aStructIter <= aNbStructs; ++aStructIter)
+ Standard_Integer aStructIndex = 1;
+ for (Graphic3d_SequenceOfStructure::Iterator aStructIter (myStructsToCompute); aStructIter.More(); aStructIter.Next(), ++aStructIndex)
{
- const Handle(Graphic3d_Structure)& aStruct = myStructsToCompute.Value (aStructIter);
+ const Handle(Graphic3d_Structure)& aStruct = aStructIter.Value();
if (aStruct->Identification() == aStructId)
{
- return aStructIter;
+ return aStructIndex;
}
}
return 0;
Standard_EXPORT Graphic3d_TypeOfAnswer acceptDisplay (const Graphic3d_TypeOfStructure theStructType) const;
//! Clears the structure in this view.
- Standard_EXPORT void Clear (const Handle(Graphic3d_Structure)& theStructure, const Standard_Boolean theWithDestruction);
+ Standard_EXPORT void Clear (Graphic3d_Structure* theStructure,
+ const Standard_Boolean theWithDestruction);
//! Connects the structures.
- Standard_EXPORT void Connect (const Handle(Graphic3d_Structure)& theMother,
- const Handle(Graphic3d_Structure)& theDaughter);
+ Standard_EXPORT void Connect (const Graphic3d_Structure* theMother,
+ const Graphic3d_Structure* theDaughter);
//! Disconnects the structures.
- Standard_EXPORT void Disconnect (const Handle(Graphic3d_Structure)& theMother,
- const Handle(Graphic3d_Structure)& theDaughter);
+ Standard_EXPORT void Disconnect (const Graphic3d_Structure* theMother,
+ const Graphic3d_Structure* theDaughter);
//! Displays the structure in the view.
Standard_EXPORT void Display (const Handle(Graphic3d_Structure)& theStructure);
Standard_EXPORT void UnHighlight (const Handle(Graphic3d_Structure)& theStructure);
//! Returns an index != 0 if the structure have another structure computed for the view <me>.
- Standard_EXPORT Standard_Integer IsComputed (const Handle(Graphic3d_Structure)& theStructure) const;
+ Standard_EXPORT Standard_Integer IsComputed (const Graphic3d_Structure* theStructure) const;
+
+ Standard_Integer IsComputed (const Handle(Graphic3d_Structure)& theStructure) const { return IsComputed (theStructure.get()); }
//! Returns true if the structure is displayed in the view.
Standard_EXPORT Standard_Boolean IsDisplayed (const Handle(Graphic3d_Structure)& theStructure) const;
+++ /dev/null
-// Created on: 2015-04-2015
-// Created by: Denis BOGOLEPOV
-// 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_IndexedMapOfAddress
-#define _Graphic3d_IndexedMapOfAddress
-
-#include <NCollection_IndexedMap.hxx>
-
-typedef NCollection_IndexedMap<const Standard_Address> Graphic3d_IndexedMapOfAddress;
-
-#endif // _Graphic3d_IndexedMapOfAddress
IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_Structure,Standard_Transient)
-//=============================================================================
-//function : Graphic3d_Structure
-//purpose :
-//=============================================================================
-Graphic3d_Structure::Graphic3d_Structure (const Handle(Graphic3d_StructureManager)& theManager)
-: myStructureManager(theManager.operator->()),
- myComputeVisual (Graphic3d_TOS_ALL),
- myOwner (NULL),
- myVisual (Graphic3d_TOS_ALL)
-{
- myCStructure = theManager->GraphicDriver()->CreateStructure (theManager);
-}
-
//=============================================================================
//function : Graphic3d_Structure
//purpose :
//=============================================================================
Graphic3d_Structure::Graphic3d_Structure (const Handle(Graphic3d_StructureManager)& theManager,
- const Handle(Graphic3d_Structure)& thePrs)
-: myStructureManager(theManager.operator->()),
- myComputeVisual (thePrs->myComputeVisual),
- myOwner (thePrs->myOwner),
- myVisual (thePrs->myVisual)
+ const Handle(Graphic3d_Structure)& theLinkPrs)
+: myStructureManager(theManager.get()),
+ myOwner (NULL),
+ myVisual (Graphic3d_TOS_ALL),
+ myComputeVisual (Graphic3d_TOS_ALL)
{
- myCStructure = thePrs->myCStructure->ShadowLink (theManager);
+ if (!theLinkPrs.IsNull())
+ {
+ myOwner = theLinkPrs->myOwner;
+ myVisual = theLinkPrs->myVisual;
+ myComputeVisual = theLinkPrs->myComputeVisual;
+ myCStructure = theLinkPrs->myCStructure->ShadowLink (theManager);
+ }
+ else
+ {
+ myCStructure = theManager->GraphicDriver()->CreateStructure (theManager);
+ }
}
//=============================================================================
aGroupIter.ChangeValue()->Clear (Standard_False);
}
- Standard_Address APtr = (void *) this;
- // It is necessary to remove the eventual pointer on the structure
- // that can be destroyed, in the list of descendants
- // of ancestors of this structure and in the list of ancestors
- // of descendants of the same structure.
-
+ // It is necessary to remove the eventual pointer on the structure that can be destroyed, in the list of descendants
+ // of ancestors of this structure and in the list of ancestors of descendants of the same structure.
for (Standard_Integer aStructIdx = 1, aNbDesc = myDescendants.Size(); aStructIdx <= aNbDesc; ++aStructIdx)
{
- ((Graphic3d_Structure *)myDescendants.FindKey (aStructIdx))->Remove (APtr, Graphic3d_TOC_ANCESTOR);
+ myDescendants.FindKey (aStructIdx)->Remove (this, Graphic3d_TOC_ANCESTOR);
}
for (Standard_Integer aStructIdx = 1, aNbAnces = myAncestors.Size(); aStructIdx <= aNbAnces; ++aStructIdx)
{
- ((Graphic3d_Structure *)myAncestors.FindKey (aStructIdx))->Remove (APtr, Graphic3d_TOC_DESCENDANT);
+ myAncestors.FindKey (aStructIdx)->Remove (this, Graphic3d_TOC_DESCENDANT);
}
// Destruction of me in the graphic library
}
}
-//=============================================================================
-//function : SetIsForHighlight
-//purpose :
-//=============================================================================
-void Graphic3d_Structure::SetIsForHighlight (const Standard_Boolean isForHighlight)
-{
- myCStructure->IsForHighlight = isForHighlight;
-}
-
//=============================================================================
//function : SetDisplayPriority
//purpose :
}
}
-//=============================================================================
-//function : DisplayPriority
-//purpose :
-//=============================================================================
-Standard_Integer Graphic3d_Structure::DisplayPriority() const
-{
- return myCStructure->Priority;
-}
-
//=============================================================================
//function : Erase
//purpose :
}
}
-//=============================================================================
-//function : HighlightStyle
-//purpose :
-//=============================================================================
-const Handle(Graphic3d_PresentationAttributes)& Graphic3d_Structure::HighlightStyle() const
-{
- return myCStructure->HighlightStyle();
-}
-
-//=============================================================================
-//function : IsDisplayed
-//purpose :
-//=============================================================================
-Standard_Boolean Graphic3d_Structure::IsDisplayed() const
-{
- return myCStructure->stick ? Standard_True : Standard_False;
-}
-
-//=============================================================================
-//function : IsDeleted
-//purpose :
-//=============================================================================
-Standard_Boolean Graphic3d_Structure::IsDeleted() const
-{
- return myCStructure.IsNull();
-}
-
-//=============================================================================
-//function : IsHighlighted
-//purpose :
-//=============================================================================
-Standard_Boolean Graphic3d_Structure::IsHighlighted() const
-{
- return myCStructure->highlight ? Standard_True : Standard_False;
-}
-
-//=============================================================================
-//function : IsVisible
-//purpose :
-//=============================================================================
-Standard_Boolean Graphic3d_Structure::IsVisible() const
-{
- return myCStructure->visible ? Standard_True : Standard_False;
-}
-
-//=============================================================================
-//function : IsTransformed
-//purpose :
-//=============================================================================
-Standard_Boolean Graphic3d_Structure::IsTransformed() const
-{
- return !myCStructure->Transformation().IsNull()
- && myCStructure->Transformation()->Form() != gp_Identity;
-}
-
//=============================================================================
//function : ContainsFacet
//purpose :
}
// stop at the first descendant containing at least one facet
- for (Graphic3d_IndexedMapOfAddress::Iterator anIter (myDescendants); anIter.More(); anIter.Next())
+ for (NCollection_IndexedMap<Graphic3d_Structure*>::Iterator anIter (myDescendants); anIter.More(); anIter.Next())
{
- if (((const Graphic3d_Structure *)anIter.Value())->ContainsFacet())
+ if (anIter.Value()->ContainsFacet())
{
return Standard_True;
}
}
// stop at the first non-empty descendant
- for (Graphic3d_IndexedMapOfAddress::Iterator anIter (myDescendants); anIter.More(); anIter.Next())
+ for (NCollection_IndexedMap<Graphic3d_Structure*>::Iterator anIter (myDescendants); anIter.More(); anIter.Next())
{
- if (!((const Graphic3d_Structure* )anIter.Value())->IsEmpty())
+ if (!anIter.Value()->IsEmpty())
{
return Standard_False;
}
}
}
-//=============================================================================
-//function : Compute
-//purpose :
-//=============================================================================
-void Graphic3d_Structure::Compute()
-{
- // Implemented by Presentation
-}
-
-//=============================================================================
-//function : Compute
-//purpose :
-//=============================================================================
-Handle(Graphic3d_Structure) Graphic3d_Structure::Compute (const Handle(Graphic3d_DataStructureManager)& )
-{
- // Implemented by Presentation
- return this;
-}
-
-//=============================================================================
-//function : Compute
-//purpose :
-//=============================================================================
-Handle(Graphic3d_Structure) Graphic3d_Structure::Compute (const Handle(Graphic3d_DataStructureManager)& ,
- const Handle(Geom_Transformation)& )
-{
- // Implemented by Presentation
- return this;
-}
-
-//=============================================================================
-//function : Compute
-//purpose :
-//=============================================================================
-void Graphic3d_Structure::Compute (const Handle(Graphic3d_DataStructureManager)& ,
- Handle(Graphic3d_Structure)& )
-{
- // Implemented by Presentation
-}
-
-//=============================================================================
-//function : Compute
-//purpose :
-//=============================================================================
-void Graphic3d_Structure::Compute (const Handle(Graphic3d_DataStructureManager)& ,
- const Handle(Geom_Transformation)& ,
- Handle(Graphic3d_Structure)& )
-{
- // Implemented by Presentation
-}
-
//=============================================================================
//function : ReCompute
//purpose :
myStructureManager->ReCompute (this, theProjector);
}
-//=============================================================================
-//function : SetInfiniteState
-//purpose :
-//=============================================================================
-void Graphic3d_Structure::SetInfiniteState (const Standard_Boolean theToSet)
-{
- myCStructure->IsInfinite = theToSet ? 1 : 0;
-}
-
-//=============================================================================
-//function : IsInfinite
-//purpose :
-//=============================================================================
-Standard_Boolean Graphic3d_Structure::IsInfinite() const
-{
- return IsDeleted()
- || myCStructure->IsInfinite;
-}
-
//=============================================================================
//function : GraphicClear
//purpose :
myCStructure->Clear();
}
-//=============================================================================
-//function : GraphicConnect
-//purpose :
-//=============================================================================
-void Graphic3d_Structure::GraphicConnect (const Handle(Graphic3d_Structure)& theDaughter)
-{
- myCStructure->Connect (*theDaughter->myCStructure);
-}
-
-//=============================================================================
-//function : GraphicDisconnect
-//purpose :
-//=============================================================================
-void Graphic3d_Structure::GraphicDisconnect (const Handle(Graphic3d_Structure)& theDaughter)
-{
- myCStructure->Disconnect (*theDaughter->myCStructure);
-}
-
-//=============================================================================
-//function : Groups
-//purpose :
-//=============================================================================
-const Graphic3d_SequenceOfGroup& Graphic3d_Structure::Groups() const
-{
- return myCStructure->Groups();
-}
-
-//=============================================================================
-//function : NumberOfGroups
-//purpose :
-//=============================================================================
-Standard_Integer Graphic3d_Structure::NumberOfGroups() const
-{
- return myCStructure->Groups().Length();
-}
-
//=============================================================================
//function : SetVisual
//purpose :
"ZoomLimit sup < ZoomLimit inf");
}
-//=============================================================================
-//function : Visual
-//purpose :
-//=============================================================================
-Graphic3d_TypeOfStructure Graphic3d_Structure::Visual() const
-{
- return myVisual;
-}
-
//=============================================================================
//function : AcceptConnection
//purpose :
//=============================================================================
-Standard_Boolean Graphic3d_Structure::AcceptConnection (const Handle(Graphic3d_Structure)& theStructure1,
- const Handle(Graphic3d_Structure)& theStructure2,
- const Graphic3d_TypeOfConnection theType)
+Standard_Boolean Graphic3d_Structure::AcceptConnection (Graphic3d_Structure* theStructure1,
+ Graphic3d_Structure* theStructure2,
+ Graphic3d_TypeOfConnection theType)
{
// cycle detection
- Graphic3d_MapOfStructure aSet;
+ NCollection_Map<Graphic3d_Structure*> aSet;
Graphic3d_Structure::Network (theStructure2, theType, aSet);
return !aSet.Contains (theStructure1);
}
//=============================================================================
void Graphic3d_Structure::Ancestors (Graphic3d_MapOfStructure& theSet) const
{
- for (Graphic3d_IndexedMapOfAddress::Iterator anIter (myAncestors); anIter.More(); anIter.Next())
+ for (NCollection_IndexedMap<Graphic3d_Structure*>::Iterator anIter (myAncestors); anIter.More(); anIter.Next())
{
- theSet.Add ((Graphic3d_Structure* )anIter.Value());
+ theSet.Add (anIter.Value());
}
}
-//=============================================================================
-//function : SetOwner
-//purpose :
-//=============================================================================
-void Graphic3d_Structure::SetOwner (const Standard_Address theOwner)
-{
- myOwner = theOwner;
-}
-
-//=============================================================================
-//function : Owner
-//purpose :
-//=============================================================================
-Standard_Address Graphic3d_Structure::Owner() const
-{
- return myOwner;
-}
-
//=============================================================================
//function : Descendants
//purpose :
//=============================================================================
void Graphic3d_Structure::Descendants (Graphic3d_MapOfStructure& theSet) const
{
- for (Graphic3d_IndexedMapOfAddress::Iterator anIter (myDescendants); anIter.More(); anIter.Next())
+ for (NCollection_IndexedMap<Graphic3d_Structure*>::Iterator anIter (myDescendants); anIter.More(); anIter.Next())
{
- theSet.Add ((Graphic3d_Structure* )anIter.Value());
+ theSet.Add (anIter.Value());
}
}
//function : AppendAncestor
//purpose :
//=============================================================================
-Standard_Boolean Graphic3d_Structure::AppendAncestor (const Standard_Address theAncestor)
+Standard_Boolean Graphic3d_Structure::AppendAncestor (Graphic3d_Structure* theAncestor)
{
const Standard_Integer aSize = myAncestors.Size();
//function : AppendDescendant
//purpose :
//=============================================================================
-Standard_Boolean Graphic3d_Structure::AppendDescendant (const Standard_Address theDescendant)
+Standard_Boolean Graphic3d_Structure::AppendDescendant (Graphic3d_Structure* theDescendant)
{
const Standard_Integer aSize = myDescendants.Size();
//function : RemoveAncestor
//purpose :
//=============================================================================
-Standard_Boolean Graphic3d_Structure::RemoveAncestor (const Standard_Address theAncestor)
+Standard_Boolean Graphic3d_Structure::RemoveAncestor (Graphic3d_Structure* theAncestor)
{
const Standard_Integer anIndex = myAncestors.FindIndex (theAncestor);
//function : RemoveDescendant
//purpose :
//=============================================================================
-Standard_Boolean Graphic3d_Structure::RemoveDescendant (const Standard_Address theDescendant)
+Standard_Boolean Graphic3d_Structure::RemoveDescendant (Graphic3d_Structure* theDescendant)
{
const Standard_Integer anIndex = myDescendants.FindIndex (theDescendant);
//function : Connect
//purpose :
//=============================================================================
-void Graphic3d_Structure::Connect (const Handle(Graphic3d_Structure)& theStructure,
- const Graphic3d_TypeOfConnection theType,
- const Standard_Boolean theWithCheck)
+void Graphic3d_Structure::Connect (Graphic3d_Structure* theStructure,
+ Graphic3d_TypeOfConnection theType,
+ Standard_Boolean theWithCheck)
{
if (IsDeleted())
{
return;
}
- const Standard_Address aStructure = theStructure.operator->();
-
if (theType == Graphic3d_TOC_DESCENDANT)
{
- if (!AppendDescendant (aStructure))
+ if (!AppendDescendant (theStructure))
{
return;
}
}
else // Graphic3d_TOC_ANCESTOR
{
- if (!AppendAncestor (aStructure))
+ if (!AppendAncestor (theStructure))
{
return;
}
//function : Disconnect
//purpose :
//=============================================================================
-void Graphic3d_Structure::Disconnect (const Handle(Graphic3d_Structure)& theStructure)
+void Graphic3d_Structure::Disconnect (Graphic3d_Structure* theStructure)
{
if (IsDeleted())
{
return;
}
- const Standard_Address aStructure = theStructure.operator->();
-
- if (RemoveDescendant (aStructure))
+ if (RemoveDescendant (theStructure))
{
theStructure->Disconnect (this);
CalculateBoundBox();
Update (true);
}
- else if (RemoveAncestor (aStructure))
+ else if (RemoveAncestor (theStructure))
{
theStructure->Disconnect (this);
CalculateBoundBox();
// is modified by :
// Graphic3d_Structure::Disconnect (AStructure)
// that takes AStructure from myDescendants
- ((Graphic3d_Structure* )(myDescendants.FindKey (1)))->Disconnect (this);
+ myDescendants.FindKey (1)->Disconnect (this);
}
break;
}
// is modified by :
// Graphic3d_Structure::Disconnect (AStructure)
// that takes AStructure from myAncestors
- ((Graphic3d_Structure* )(myAncestors.FindKey (1)))->Disconnect (this);
+ myAncestors.FindKey (1)->Disconnect (this);
}
break;
}
return aResult;
}
-//=============================================================================
-//function : Identification
-//purpose :
-//=============================================================================
-Standard_Integer Graphic3d_Structure::Identification() const
-{
- return myCStructure->Id;
-}
-
//=============================================================================
//function : SetTransformPersistence
//purpose :
//function : Remove
//purpose :
//=============================================================================
-void Graphic3d_Structure::Remove (const Standard_Address thePtr,
+void Graphic3d_Structure::Remove (Graphic3d_Structure* thePtr,
const Graphic3d_TypeOfConnection theType)
{
if (theType == Graphic3d_TOC_DESCENDANT)
Graphic3d_BndBox3d aCombinedBox, aBox;
getBox (aCombinedBox, theToIgnoreInfiniteFlag);
- for (Graphic3d_IndexedMapOfAddress::Iterator anIter (myDescendants); anIter.More(); anIter.Next())
+ for (NCollection_IndexedMap<Graphic3d_Structure*>::Iterator anIter (myDescendants); anIter.More(); anIter.Next())
{
- const Graphic3d_Structure* aStruct = (const Graphic3d_Structure* )anIter.Value();
+ const Graphic3d_Structure* aStruct = anIter.Value();
aStruct->getBox (aBox, theToIgnoreInfiniteFlag);
aCombinedBox.Combine (aBox);
}
//function : Network
//purpose :
//=============================================================================
-void Graphic3d_Structure::Network (const Handle(Graphic3d_Structure)& theStructure,
- const Graphic3d_TypeOfConnection theType,
- Graphic3d_MapOfStructure& theSet)
+void Graphic3d_Structure::Network (Graphic3d_Structure* theStructure,
+ const Graphic3d_TypeOfConnection theType,
+ NCollection_Map<Graphic3d_Structure*>& theSet)
{
- Graphic3d_MapOfStructure aSetD, aSetA;
- theStructure->Descendants (aSetD);
- theStructure->Ancestors (aSetA);
theSet.Add (theStructure);
switch (theType)
{
case Graphic3d_TOC_DESCENDANT:
- for (Graphic3d_MapIteratorOfMapOfStructure anIter (aSetD); anIter.More(); anIter.Next())
+ {
+ for (NCollection_IndexedMap<Graphic3d_Structure*>::Iterator anIter (theStructure->myDescendants); anIter.More(); anIter.Next())
{
- Graphic3d_Structure::Network (anIter.Key(), theType, theSet);
+ Graphic3d_Structure::Network (anIter.Value(), theType, theSet);
}
break;
+ }
case Graphic3d_TOC_ANCESTOR:
- for (Graphic3d_MapIteratorOfMapOfStructure anIter (aSetA); anIter.More(); anIter.Next())
+ {
+ for (NCollection_IndexedMap<Graphic3d_Structure*>::Iterator anIter (theStructure->myAncestors); anIter.More(); anIter.Next())
{
- Graphic3d_Structure::Network (anIter.Key (), theType, theSet);
+ Graphic3d_Structure::Network (anIter.Value(), theType, theSet);
}
break;
+ }
}
}
void Graphic3d_Structure::PrintNetwork (const Handle(Graphic3d_Structure)& theStructure,
const Graphic3d_TypeOfConnection theType)
{
- Graphic3d_MapOfStructure aSet;
- Graphic3d_Structure::Network (theStructure, theType, aSet);
- for (Graphic3d_MapIteratorOfMapOfStructure anIter (aSet); anIter.More(); anIter.Next())
+ NCollection_Map<Graphic3d_Structure*> aSet;
+ Graphic3d_Structure::Network (theStructure.get(), theType, aSet);
+ for (NCollection_Map<Graphic3d_Structure*>::Iterator anIter (aSet); anIter.More(); anIter.Next())
{
std::cout << "\tIdent " << (anIter.Key())->Identification () << "\n";
}
myStructureManager->Update (theUpdateLayer ? myCStructure->ZLayer() : Graphic3d_ZLayerId_UNKNOWN);
}
-//=============================================================================
-//function : GraphicTransform
-//purpose :
-//=============================================================================
-void Graphic3d_Structure::GraphicTransform (const Handle(Geom_Transformation)& theTrsf)
-{
- myCStructure->SetTransformation (theTrsf);
-}
-
-//=============================================================================
-//function : ComputeVisual
-//purpose :
-//=============================================================================
-Graphic3d_TypeOfStructure Graphic3d_Structure::ComputeVisual() const
-{
- return myComputeVisual;
-}
-
-//=============================================================================
-//function : SetComputeVisual
-//purpose :
-//=============================================================================
-void Graphic3d_Structure::SetComputeVisual (const Graphic3d_TypeOfStructure theVisual)
-{
- // The ComputeVisual is saved only if the structure is declared TOS_ALL, TOS_WIREFRAME or TOS_SHADING.
- // This declaration permits to calculate proper representation of the structure calculated by Compute instead of passage to TOS_COMPUTED.
- if (theVisual != Graphic3d_TOS_COMPUTED)
- {
- myComputeVisual = theVisual;
- }
-}
-
-//=============================================================================
-//function : SetHLRValidation
-//purpose :
-//=============================================================================
-void Graphic3d_Structure::SetHLRValidation (const Standard_Boolean theFlag)
-{
- myCStructure->HLRValidation = theFlag ? 1 : 0;
-}
-
-//=============================================================================
-//function : HLRValidation
-//purpose :
-//=============================================================================
-Standard_Boolean Graphic3d_Structure::HLRValidation() const
-{
- // Hidden parts stored in <me> are valid if :
- // 1/ the owner is defined.
- // 2/ they are not invalid.
- return myOwner != NULL
- && myCStructure->HLRValidation != 0;
-}
-
//=======================================================================
//function : SetZLayer
//purpose :
myStructureManager->ChangeZLayer (this, theLayerId);
myCStructure->SetZLayer (theLayerId);
}
-
-//=======================================================================
-//function : GetZLayer
-//purpose :
-//=======================================================================
-Graphic3d_ZLayerId Graphic3d_Structure::GetZLayer() const
-{
- return myCStructure->ZLayer();
-}
-
-//=======================================================================
-//function : SetClipPlanes
-//purpose :
-//=======================================================================
-void Graphic3d_Structure::SetClipPlanes (const Handle(Graphic3d_SequenceOfHClipPlane)& thePlanes)
-{
- myCStructure->SetClipPlanes (thePlanes);
-}
-
-//=======================================================================
-//function : GetClipPlanes
-//purpose :
-//=======================================================================
-const Handle(Graphic3d_SequenceOfHClipPlane)& Graphic3d_Structure::ClipPlanes() const
-{
- return myCStructure->ClipPlanes();
-}
-
-//=======================================================================
-//function : SetMutable
-//purpose :
-//=======================================================================
-void Graphic3d_Structure::SetMutable (const Standard_Boolean theIsMutable)
-{
- myCStructure->IsMutable = theIsMutable;
-}
-
-//=======================================================================
-//function : IsMutable
-//purpose :
-//=======================================================================
-Standard_Boolean Graphic3d_Structure::IsMutable() const
-{
- return myCStructure->IsMutable;
-}
#ifndef _Graphic3d_Structure_HeaderFile
#define _Graphic3d_Structure_HeaderFile
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
+#include <Graphic3d_BndBox4f.hxx>
+#include <Graphic3d_BndBox4d.hxx>
#include <Graphic3d_CStructure.hxx>
-#include <Graphic3d_IndexedMapOfAddress.hxx>
-#include <Standard_Address.hxx>
-#include <Graphic3d_TypeOfStructure.hxx>
-#include <Standard_Transient.hxx>
-#include <Standard_Boolean.hxx>
-#include <Standard_Integer.hxx>
-#include <Graphic3d_ZLayerId.hxx>
-#include <Graphic3d_SequenceOfHClipPlane.hxx>
-#include <Standard_Real.hxx>
-#include <Graphic3d_SequenceOfGroup.hxx>
-#include <Graphic3d_TypeOfConnection.hxx>
#include <Graphic3d_MapOfStructure.hxx>
+#include <Graphic3d_SequenceOfGroup.hxx>
+#include <Graphic3d_SequenceOfHClipPlane.hxx>
#include <Graphic3d_TypeOfComposition.hxx>
+#include <Graphic3d_TypeOfConnection.hxx>
+#include <Graphic3d_TypeOfStructure.hxx>
#include <Graphic3d_TransformPers.hxx>
#include <Graphic3d_TransModeFlags.hxx>
-#include <Graphic3d_BndBox4f.hxx>
-#include <Graphic3d_BndBox4d.hxx>
#include <Graphic3d_Vertex.hxx>
-class Graphic3d_PriorityDefinitionError;
-class Graphic3d_StructureDefinitionError;
-class Graphic3d_TransformError;
-class Graphic3d_Group;
+#include <Graphic3d_ZLayerId.hxx>
+#include <NCollection_IndexedMap.hxx>
+
class Graphic3d_StructureManager;
class Graphic3d_DataStructureManager;
class Bnd_Box;
class gp_Pnt;
-
-class Graphic3d_Structure;
DEFINE_STANDARD_HANDLE(Graphic3d_Structure, Standard_Transient)
//! This class allows the definition a graphic object.
-//! This graphic structure can be displayed,
-//! erased, or highlighted.
-//! This graphic structure can be connected with
-//! another graphic structure.
-//! Keywords: Structure, StructureManager, Display, Erase, Highlight,
-//! UnHighlight, Visible, Priority, Selectable, Visible,
-//! Visual, Connection, Ancestors, Descendants, Transformation
+//! This graphic structure can be displayed, erased, or highlighted.
+//! This graphic structure can be connected with another graphic structure.
class Graphic3d_Structure : public Standard_Transient
{
-
+ DEFINE_STANDARD_RTTIEXT(Graphic3d_Structure, Standard_Transient)
+ friend class Graphic3d_Group;
public:
-
//! Creates a graphic object in the manager theManager.
//! It will appear in all the views of the visualiser.
//! The structure is not displayed when it is created.
- Standard_EXPORT Graphic3d_Structure(const Handle(Graphic3d_StructureManager)& theManager);
-
- //! Creates a shadow link to existing graphic object.
- Standard_EXPORT Graphic3d_Structure(const Handle(Graphic3d_StructureManager)& theManager, const Handle(Graphic3d_Structure)& thePrs);
+ //! @param theManager structure manager holding this structure
+ //! @param theLinkPrs another structure for creating a shadow (linked) structure
+ Standard_EXPORT Graphic3d_Structure (const Handle(Graphic3d_StructureManager)& theManager,
+ const Handle(Graphic3d_Structure)& theLinkPrs = Handle(Graphic3d_Structure)());
//! if WithDestruction == Standard_True then
//! suppress all the groups of primitives in the structure.
//! Suppresses the structure <me>.
//! It will be erased at the next screen update.
- Standard_EXPORT ~Graphic3d_Structure();
+ Standard_EXPORT virtual ~Graphic3d_Structure();
//! Displays the structure <me> in all the views of the visualiser.
Standard_EXPORT virtual void Display();
-
- //! Returns the current display priority for the
- //! structure <me>.
- Standard_EXPORT Standard_Integer DisplayPriority() const;
+
+ //! Returns the current display priority for this structure.
+ Standard_Integer DisplayPriority() const { return myCStructure->Priority; }
//! Erases the structure <me> in all the views
//! of the visualiser.
//! Computes axis-aligned bounding box of a structure.
Standard_EXPORT virtual void CalculateBoundBox();
- //! If <theToSet> is Standard_True then <me> is infinite and
- //! the MinMaxValues method method return :
+ //! Sets infinite flag.
+ //! When TRUE, the MinMaxValues method returns:
//! theXMin = theYMin = theZMin = RealFirst().
//! theXMax = theYMax = theZMax = RealLast().
- //! By default, <me> is not infinite but empty.
- Standard_EXPORT void SetInfiniteState (const Standard_Boolean theToSet);
-
+ //! By default, structure is created not infinite but empty.
+ void SetInfiniteState (const Standard_Boolean theToSet) { myCStructure->IsInfinite = theToSet ? 1 : 0; }
+
//! Modifies the order of displaying the structure.
//! Values are between 0 and 10.
//! Structures are drawn according to their display priorities
//! test between layers
Standard_EXPORT void SetZLayer (const Graphic3d_ZLayerId theLayerId);
- //! Get Z layer ID of displayed structure. The method
- //! returns -1 if the structure has no ID (deleted from graphic driver).
- Standard_EXPORT Graphic3d_ZLayerId GetZLayer() const;
+ //! Get Z layer ID of displayed structure.
+ //! The method returns -1 if the structure has no ID (deleted from graphic driver).
+ Graphic3d_ZLayerId GetZLayer() const { return myCStructure->ZLayer(); }
//! Changes a sequence of clip planes slicing the structure on rendering.
//! @param thePlanes [in] the set of clip planes.
- Standard_EXPORT void SetClipPlanes (const Handle(Graphic3d_SequenceOfHClipPlane)& thePlanes);
+ void SetClipPlanes (const Handle(Graphic3d_SequenceOfHClipPlane)& thePlanes) { myCStructure->SetClipPlanes (thePlanes); }
//! Get clip planes slicing the structure on rendering.
//! @return set of clip planes.
- Standard_EXPORT const Handle(Graphic3d_SequenceOfHClipPlane)& ClipPlanes() const;
+ const Handle(Graphic3d_SequenceOfHClipPlane)& ClipPlanes() const { return myCStructure->ClipPlanes(); }
//! Modifies the visibility indicator to Standard_True or
//! Standard_False for the structure <me>.
//! greater than <LimitSup> or if <LimitInf> or
//! <LimitSup> is a negative value.
Standard_EXPORT void SetZoomLimit (const Standard_Real LimitInf, const Standard_Real LimitSup);
-
- //! marks the structure <me> representing wired structure needed for
- //! highlight only so it won't be added to BVH tree.
- //! Category: Methods to modify the class definition
- Standard_EXPORT void SetIsForHighlight (const Standard_Boolean isForHighlight);
+
+ //! Marks the structure <me> representing wired structure needed for highlight only so it won't be added to BVH tree.
+ void SetIsForHighlight (const Standard_Boolean isForHighlight) { myCStructure->IsForHighlight = isForHighlight; }
//! Suppresses the highlight for the structure <me>
//! in all the views of the visualiser.
Standard_EXPORT void UnHighlight();
- Standard_EXPORT virtual void Compute();
+ virtual void Compute()
+ {
+ //
+ }
//! Returns the new Structure defined for the new visualization
- Standard_EXPORT virtual Handle(Graphic3d_Structure) Compute (const Handle(Graphic3d_DataStructureManager)& aProjector);
+ virtual Handle(Graphic3d_Structure) Compute (const Handle(Graphic3d_DataStructureManager)& theProjector)
+ {
+ (void )theProjector;
+ return this;
+ }
//! Returns the new Structure defined for the new visualization
- Standard_EXPORT virtual Handle(Graphic3d_Structure) Compute (const Handle(Graphic3d_DataStructureManager)& theProjector,
- const Handle(Geom_Transformation)& theTrsf);
-
+ virtual Handle(Graphic3d_Structure) Compute (const Handle(Graphic3d_DataStructureManager)& theProjector,
+ const Handle(Geom_Transformation)& theTrsf)
+ {
+ (void )theProjector;
+ (void )theTrsf;
+ return this;
+ }
+
//! Returns the new Structure defined for the new visualization
- Standard_EXPORT virtual void Compute (const Handle(Graphic3d_DataStructureManager)& aProjector, Handle(Graphic3d_Structure)& aStructure);
+ virtual void Compute (const Handle(Graphic3d_DataStructureManager)& theProjector,
+ Handle(Graphic3d_Structure)& theStructure)
+ {
+ (void )theProjector;
+ (void )theStructure;
+ }
//! Returns the new Structure defined for the new visualization
- Standard_EXPORT virtual void Compute (const Handle(Graphic3d_DataStructureManager)& theProjector,
- const Handle(Geom_Transformation)& theTrsf,
- Handle(Graphic3d_Structure)& theStructure);
+ virtual void Compute (const Handle(Graphic3d_DataStructureManager)& theProjector,
+ const Handle(Geom_Transformation)& theTrsf,
+ Handle(Graphic3d_Structure)& theStructure)
+ {
+ (void )theProjector;
+ (void )theTrsf;
+ (void )theStructure;
+ }
//! Forces a new construction of the structure <me>
//! if <me> is displayed and TOS_COMPUTED.
//! Polygons, Triangles or Quadrangles.
Standard_EXPORT Standard_Boolean ContainsFacet() const;
- //! Returns the groups sequence included in the structure <me> (internal storage).
- Standard_EXPORT const Graphic3d_SequenceOfGroup& Groups() const;
-
- //! Returns the current number of groups in the
- //! structure <me>.
- Standard_EXPORT Standard_Integer NumberOfGroups() const;
+ //! Returns the groups sequence included in this structure.
+ const Graphic3d_SequenceOfGroup& Groups() const { return myCStructure->Groups(); }
+
+ //! Returns the current number of groups in this structure.
+ Standard_Integer NumberOfGroups() const { return myCStructure->Groups().Length(); }
//! Append new group to this structure.
Standard_EXPORT Handle(Graphic3d_Group) NewGroup();
+
+ //! Returns the last created group or creates new one if list is empty.
+ Handle(Graphic3d_Group) CurrentGroup()
+ {
+ if (Groups().IsEmpty())
+ {
+ return NewGroup();
+ }
+ return Groups().Last();
+ }
+
+ //! Returns the highlight attributes.
+ const Handle(Graphic3d_PresentationAttributes)& HighlightStyle() const { return myCStructure->HighlightStyle(); }
+
+ //! Returns TRUE if this structure is deleted (after Remove() call).
+ Standard_Boolean IsDeleted() const { return myCStructure.IsNull(); }
- //! Returns the highlight color for the Highlight method
- //! with the highlight method TOHM_COLOR or TOHM_BOUNDBOX.
- Standard_EXPORT const Handle(Graphic3d_PresentationAttributes)& HighlightStyle() const;
-
- //! Returns Standard_True if the structure <me> is deleted.
- //! <me> is deleted after the call Remove (me).
- Standard_EXPORT Standard_Boolean IsDeleted() const;
-
- //! Returns the display indicator for the structure <me>.
- Standard_EXPORT virtual Standard_Boolean IsDisplayed() const;
+ //! Returns the display indicator for this structure.
+ virtual Standard_Boolean IsDisplayed() const { return myCStructure->stick != 0; }
//! Returns Standard_True if the structure <me> is empty.
//! Warning: A structure is empty if :
Standard_EXPORT Standard_Boolean IsEmpty() const;
//! Returns Standard_True if the structure <me> is infinite.
- Standard_EXPORT Standard_Boolean IsInfinite() const;
+ Standard_Boolean IsInfinite() const
+ {
+ return IsDeleted()
+ || myCStructure->IsInfinite;
+ }
- //! Returns the highlight indicator for the structure <me>.
- Standard_EXPORT virtual Standard_Boolean IsHighlighted() const;
+ //! Returns the highlight indicator for this structure.
+ virtual Standard_Boolean IsHighlighted() const { return myCStructure->highlight != 0; }
- //! Returns Standard_True if the structure <me> is transformed.
- //! <=> The transformation != Identity.
- Standard_EXPORT Standard_Boolean IsTransformed() const;
+ //! Returns TRUE if the structure is transformed.
+ Standard_Boolean IsTransformed() const
+ {
+ return !myCStructure->Transformation().IsNull()
+ && myCStructure->Transformation()->Form() != gp_Identity;
+ }
- //! Returns the visibility indicator for the structure <me>.
- Standard_EXPORT Standard_Boolean IsVisible() const;
+ //! Returns the visibility indicator for this structure.
+ Standard_Boolean IsVisible() const { return myCStructure->visible != 0; }
//! Returns the coordinates of the boundary box of the structure <me>.
//! If <theToIgnoreInfiniteFlag> is TRUE, the method returns actual graphical
Standard_EXPORT Bnd_Box MinMaxValues (const Standard_Boolean theToIgnoreInfiniteFlag = Standard_False) const;
//! Returns the visualisation mode for the structure <me>.
- Standard_EXPORT Graphic3d_TypeOfStructure Visual() const;
+ Graphic3d_TypeOfStructure Visual() const { return myVisual; }
//! Returns Standard_True if the connection is possible between
//! <AStructure1> and <AStructure2> without a creation
//! - the set of all descendants of <AStructure1> contains
//! <AStructure2> and if the
//! TypeOfConnection == TOC_ANCESTOR
- Standard_EXPORT static Standard_Boolean AcceptConnection (const Handle(Graphic3d_Structure)& AStructure1, const Handle(Graphic3d_Structure)& AStructure2, const Graphic3d_TypeOfConnection AType);
+ Standard_EXPORT static Standard_Boolean AcceptConnection (Graphic3d_Structure* theStructure1,
+ Graphic3d_Structure* theStructure2,
+ Graphic3d_TypeOfConnection theType);
//! Returns the group of structures to which <me> is connected.
Standard_EXPORT void Ancestors (Graphic3d_MapOfStructure& SG) const;
//! Remove, and stacks the transformations.
//! No connection if the graph of the structures
//! contains a cycle and <WithCheck> is Standard_True;
- Standard_EXPORT void Connect (const Handle(Graphic3d_Structure)& AStructure, const Graphic3d_TypeOfConnection AType, const Standard_Boolean WithCheck = Standard_False);
+ Standard_EXPORT void Connect (Graphic3d_Structure* theStructure,
+ Graphic3d_TypeOfConnection theType,
+ Standard_Boolean theWithCheck = Standard_False);
+
+ Standard_DEPRECATED("Deprecated short-cut")
+ void Connect (const Handle(Graphic3d_Structure)& thePrs)
+ {
+ Connect (thePrs.get(), Graphic3d_TOC_DESCENDANT);
+ }
//! Returns the group of structures connected to <me>.
Standard_EXPORT void Descendants (Graphic3d_MapOfStructure& SG) const;
//! Suppress the connection between <AStructure> and <me>.
- Standard_EXPORT void Disconnect (const Handle(Graphic3d_Structure)& AStructure);
+ Standard_EXPORT void Disconnect (Graphic3d_Structure* theStructure);
+
+ Standard_DEPRECATED("Deprecated alias for Disconnect()")
+ void Remove (const Handle(Graphic3d_Structure)& thePrs) { Disconnect (thePrs.get()); }
//! If Atype is TOC_DESCENDANT then suppress all
//! the connections with the child structures of <me>.
//! If Atype is TOC_ANCESTOR then suppress all
//! the connections with the parent structures of <me>.
Standard_EXPORT void DisconnectAll (const Graphic3d_TypeOfConnection AType);
+
+ Standard_DEPRECATED("Deprecated alias for DisconnectAll()")
+ void RemoveAll() { DisconnectAll (Graphic3d_TOC_DESCENDANT); }
//! Returns <ASet> the group of structures :
//! - directly or indirectly connected to <AStructure> if the
//! TypeOfConnection == TOC_DESCENDANT
//! - to which <AStructure> is directly or indirectly connected
//! if the TypeOfConnection == TOC_ANCESTOR
- Standard_EXPORT static void Network (const Handle(Graphic3d_Structure)& AStructure, const Graphic3d_TypeOfConnection AType, Graphic3d_MapOfStructure& ASet);
-
- Standard_EXPORT void SetOwner (const Standard_Address Owner);
+ Standard_EXPORT static void Network (Graphic3d_Structure* theStructure,
+ const Graphic3d_TypeOfConnection theType,
+ NCollection_Map<Graphic3d_Structure*>& theSet);
- Standard_EXPORT Standard_Address Owner() const;
+ void SetOwner (const Standard_Address theOwner) { myOwner = theOwner; }
- Standard_EXPORT void SetHLRValidation (const Standard_Boolean AFlag);
+ Standard_Address Owner() const { return myOwner; }
- Standard_EXPORT Standard_Boolean HLRValidation() const;
+ void SetHLRValidation (const Standard_Boolean theFlag) { myCStructure->HLRValidation = theFlag ? 1 : 0; }
+
+ //! Hidden parts stored in this structure are valid if:
+ //! 1) the owner is defined.
+ //! 2) they are not invalid.
+ Standard_Boolean HLRValidation() const
+ {
+ return myOwner != NULL
+ && myCStructure->HLRValidation != 0;
+ }
//! Return local transformation.
const Handle(Geom_Transformation)& Transformation() const { return myCStructure->Transformation(); }
const Handle(Graphic3d_TransformPers)& TransformPersistence() const { return myCStructure->TransformPersistence(); }
//! Sets if the structure location has mutable nature (content or location will be changed regularly).
- Standard_EXPORT void SetMutable (const Standard_Boolean theIsMutable);
+ void SetMutable (const Standard_Boolean theIsMutable) { myCStructure->IsMutable = theIsMutable; }
//! Returns true if structure has mutable nature (content or location are be changed regularly).
//! Mutable structure will be managed in different way than static onces.
- Standard_EXPORT Standard_Boolean IsMutable() const;
+ Standard_Boolean IsMutable() const { return myCStructure->IsMutable; }
- Standard_EXPORT Graphic3d_TypeOfStructure ComputeVisual() const;
+ Graphic3d_TypeOfStructure ComputeVisual() const { return myComputeVisual; }
//! Clears the structure <me>.
Standard_EXPORT void GraphicClear (const Standard_Boolean WithDestruction);
- Standard_EXPORT void GraphicConnect (const Handle(Graphic3d_Structure)& ADaughter);
+ void GraphicConnect (const Handle(Graphic3d_Structure)& theDaughter) { myCStructure->Connect (*theDaughter->myCStructure); }
- Standard_EXPORT void GraphicDisconnect (const Handle(Graphic3d_Structure)& ADaughter);
+ void GraphicDisconnect (const Handle(Graphic3d_Structure)& theDaughter) { myCStructure->Disconnect (*theDaughter->myCStructure); }
//! Internal method which sets new transformation without calling graphic manager callbacks.
- Standard_EXPORT void GraphicTransform (const Handle(Geom_Transformation)& theTrsf);
+ void GraphicTransform (const Handle(Geom_Transformation)& theTrsf) { myCStructure->SetTransformation (theTrsf); }
- //! Returns the identification number of the structure <me>.
- Standard_EXPORT Standard_Integer Identification() const;
+ //! Returns the identification number of this structure.
+ Standard_Integer Identification() const { return myCStructure->Id; }
//! Prints informations about the network associated
//! with the structure <AStructure>.
Standard_EXPORT static void PrintNetwork (const Handle(Graphic3d_Structure)& AStructure, const Graphic3d_TypeOfConnection AType);
- //! Suppress the adress <APtr> in the list
- //! of descendants or in the list of ancestors.
- Standard_EXPORT void Remove (const Standard_Address APtr, const Graphic3d_TypeOfConnection AType);
+ //! Suppress the structure in the list of descendants or in the list of ancestors.
+ Standard_EXPORT void Remove (Graphic3d_Structure* thePtr,
+ const Graphic3d_TypeOfConnection theType);
- Standard_EXPORT void SetComputeVisual (const Graphic3d_TypeOfStructure AVisual);
+ void SetComputeVisual (const Graphic3d_TypeOfStructure theVisual)
+ {
+ // The ComputeVisual is saved only if the structure is declared TOS_ALL, TOS_WIREFRAME or TOS_SHADING.
+ // This declaration permits to calculate proper representation of the structure calculated by Compute instead of passage to TOS_COMPUTED.
+ if (theVisual != Graphic3d_TOS_COMPUTED)
+ {
+ myComputeVisual = theVisual;
+ }
+ }
//! Transforms theX, theY, theZ with the transformation theTrsf.
Standard_EXPORT static void Transforms (const gp_Trsf& theTrsf,
//! Returns the low-level structure
const Handle(Graphic3d_CStructure)& CStructure() const { return myCStructure; }
-friend class Graphic3d_Group;
-
-
- DEFINE_STANDARD_RTTIEXT(Graphic3d_Structure,Standard_Transient)
-
protected:
//! Transforms boundaries with <theTrsf> transformation.
Standard_Real& theXMax, Standard_Real& theYMax, Standard_Real& theZMax);
//! Appends new descendant structure.
- Standard_EXPORT Standard_Boolean AppendDescendant (const Standard_Address theDescendant);
+ Standard_EXPORT Standard_Boolean AppendDescendant (Graphic3d_Structure* theDescendant);
//! Removes the given descendant structure.
- Standard_EXPORT Standard_Boolean RemoveDescendant (const Standard_Address theDescendant);
+ Standard_EXPORT Standard_Boolean RemoveDescendant (Graphic3d_Structure* theDescendant);
//! Appends new ancestor structure.
- Standard_EXPORT Standard_Boolean AppendAncestor (const Standard_Address theAncestor);
+ Standard_EXPORT Standard_Boolean AppendAncestor (Graphic3d_Structure* theAncestor);
//! Removes the given ancestor structure.
- Standard_EXPORT Standard_Boolean RemoveAncestor (const Standard_Address theAncestor);
+ Standard_EXPORT Standard_Boolean RemoveAncestor (Graphic3d_Structure* theAncestor);
private:
protected:
- Graphic3d_StructureManager* myStructureManager;
- Graphic3d_TypeOfStructure myComputeVisual;
-
- Handle(Graphic3d_CStructure) myCStructure;
- Graphic3d_IndexedMapOfAddress myAncestors;
- Graphic3d_IndexedMapOfAddress myDescendants;
- Standard_Address myOwner;
- Graphic3d_TypeOfStructure myVisual;
+ Graphic3d_StructureManager* myStructureManager;
+ Handle(Graphic3d_CStructure) myCStructure;
+ NCollection_IndexedMap<Graphic3d_Structure*> myAncestors;
+ NCollection_IndexedMap<Graphic3d_Structure*> myDescendants;
+ Standard_Address myOwner;
+ Graphic3d_TypeOfStructure myVisual;
+ Graphic3d_TypeOfStructure myComputeVisual;
};
myDeviceLostFlag = Standard_False;
// Go through all unique structures including child (connected) ones and ensure that they are computed.
- Graphic3d_MapOfStructure aStructNetwork;
+ NCollection_Map<Graphic3d_Structure*> aStructNetwork;
for (Graphic3d_MapIteratorOfMapOfStructure anIter(myDisplayedStructure); anIter.More(); anIter.Next())
{
Handle(Graphic3d_Structure) aStructure = anIter.Key();
- anIter.Key()->Network (anIter.Key(), Graphic3d_TOC_DESCENDANT, aStructNetwork);
+ anIter.Key()->Network (anIter.Key().get(), Graphic3d_TOC_DESCENDANT, aStructNetwork);
}
RecomputeStructures (aStructNetwork);
}
-void Graphic3d_StructureManager::RecomputeStructures (const Graphic3d_MapOfStructure& theStructures)
+void Graphic3d_StructureManager::RecomputeStructures (const NCollection_Map<Graphic3d_Structure*>& theStructures)
{
- for (Graphic3d_MapIteratorOfMapOfStructure anIter (theStructures); anIter.More(); anIter.Next())
+ for (NCollection_Map<Graphic3d_Structure*>::Iterator anIter (theStructures); anIter.More(); anIter.Next())
{
- Handle(Graphic3d_Structure) aStruct = anIter.Key();
+ Graphic3d_Structure* aStruct = anIter.Key();
aStruct->Clear();
aStruct->Compute();
}
// function : Clear
// purpose :
// ========================================================================
-void Graphic3d_StructureManager::Clear (const Handle(Graphic3d_Structure)& theStructure,
+void Graphic3d_StructureManager::Clear (Graphic3d_Structure* theStructure,
const Standard_Boolean theWithDestruction)
{
for (Graphic3d_IndexedMapOfView::Iterator aViewIt (myDefinedViews); aViewIt.More(); aViewIt.Next())
// function : Connect
// purpose :
// ========================================================================
-void Graphic3d_StructureManager::Connect (const Handle(Graphic3d_Structure)& theMother,
- const Handle(Graphic3d_Structure)& theDaughter)
+void Graphic3d_StructureManager::Connect (const Graphic3d_Structure* theMother,
+ const Graphic3d_Structure* theDaughter)
{
for (Graphic3d_IndexedMapOfView::Iterator aViewIt (myDefinedViews); aViewIt.More(); aViewIt.Next())
{
// function : Disconnect
// purpose :
// ========================================================================
-void Graphic3d_StructureManager::Disconnect (const Handle(Graphic3d_Structure)& theMother,
- const Handle(Graphic3d_Structure)& theDaughter)
+void Graphic3d_StructureManager::Disconnect (const Graphic3d_Structure* theMother,
+ const Graphic3d_Structure* theDaughter)
{
for (Graphic3d_IndexedMapOfView::Iterator aViewIt (myDefinedViews); aViewIt.More(); aViewIt.Next())
{
Standard_EXPORT virtual void ReCompute (const Handle(Graphic3d_Structure)& theStructure, const Handle(Graphic3d_DataStructureManager)& theProjector);
//! Clears the structure.
- Standard_EXPORT virtual void Clear (const Handle(Graphic3d_Structure)& theStructure, const Standard_Boolean theWithDestruction);
+ Standard_EXPORT virtual void Clear (Graphic3d_Structure* theStructure, const Standard_Boolean theWithDestruction);
//! Connects the structures.
- Standard_EXPORT virtual void Connect (const Handle(Graphic3d_Structure)& theMother, const Handle(Graphic3d_Structure)& theDaughter);
+ Standard_EXPORT virtual void Connect (const Graphic3d_Structure* theMother,
+ const Graphic3d_Structure* theDaughter);
//! Disconnects the structures.
- Standard_EXPORT virtual void Disconnect (const Handle(Graphic3d_Structure)& theMother, const Handle(Graphic3d_Structure)& theDaughter);
+ Standard_EXPORT virtual void Disconnect (const Graphic3d_Structure* theMother,
+ const Graphic3d_Structure* theDaughter);
//! Display the structure.
Standard_EXPORT virtual void Display (const Handle(Graphic3d_Structure)& theStructure);
Standard_EXPORT void RecomputeStructures();
//! Recomputes all structures from theStructures.
- Standard_EXPORT void RecomputeStructures (const Graphic3d_MapOfStructure& theStructures);
+ Standard_EXPORT void RecomputeStructures (const NCollection_Map<Graphic3d_Structure*>& theStructures);
Standard_EXPORT Handle(Graphic3d_ViewAffinity) RegisterObject (const Handle(Standard_Transient)& theObject);
#ifndef _MeshVS_ElementalColorPrsBuilder_HeaderFile
#define _MeshVS_ElementalColorPrsBuilder_HeaderFile
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
#include <MeshVS_DataMapOfIntegerColor.hxx>
#include <MeshVS_DataMapOfIntegerTwoColors.hxx>
#include <MeshVS_PrsBuilder.hxx>
#include <MeshVS_DisplayModeFlags.hxx>
-#include <Standard_Integer.hxx>
#include <MeshVS_BuilderPriority.hxx>
-#include <TColStd_PackedMapOfInteger.hxx>
-#include <Standard_Boolean.hxx>
#include <MeshVS_TwoColors.hxx>
+
class MeshVS_Mesh;
class MeshVS_DataSource;
-class Prs3d_Presentation;
class Quantity_Color;
#include <Prs3d_Presentation.hxx>
#include <Prs3d_Root.hxx>
#include <Prs3d_ShadingAspect.hxx>
-#include <PrsMgr_ModedPresentation.hxx>
#include <PrsMgr_PresentationManager3d.hxx>
#include <Select3D_SensitiveBox.hxx>
#include <Select3D_SensitiveGroup.hxx>
#ifndef _MeshVS_Mesh_HeaderFile
#define _MeshVS_Mesh_HeaderFile
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
#include <MeshVS_SequenceOfPrsBuilder.hxx>
#include <MeshVS_DataMapOfIntegerOwner.hxx>
#include <MeshVS_MeshSelectionMethod.hxx>
#include <AIS_InteractiveObject.hxx>
-#include <Standard_Boolean.hxx>
-#include <PrsMgr_PresentationManager3d.hxx>
-#include <Standard_Integer.hxx>
-#include <SelectMgr_Selection.hxx>
#include <SelectMgr_SequenceOfOwner.hxx>
#include <Quantity_NameOfColor.hxx>
#include <Standard_CString.hxx>
+
class MeshVS_PrsBuilder;
class TColStd_HPackedMapOfInteger;
class MeshVS_DataSource;
class MeshVS_Drawer;
class SelectMgr_EntityOwner;
-class Prs3d_Presentation;
-
-class MeshVS_Mesh;
DEFINE_STANDARD_HANDLE(MeshVS_Mesh, AIS_InteractiveObject)
//! the main class provides interface to create mesh presentation as a whole
#ifndef _MeshVS_MeshPrsBuilder_HeaderFile
#define _MeshVS_MeshPrsBuilder_HeaderFile
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
#include <MeshVS_PrsBuilder.hxx>
#include <MeshVS_DisplayModeFlags.hxx>
-#include <Standard_Integer.hxx>
#include <MeshVS_BuilderPriority.hxx>
#include <TColStd_PackedMapOfInteger.hxx>
-#include <Standard_Boolean.hxx>
#include <TColStd_Array1OfReal.hxx>
-#include <Standard_Real.hxx>
#include <MeshVS_HArray1OfSequenceOfInteger.hxx>
+
class MeshVS_Mesh;
class MeshVS_DataSource;
-class Prs3d_Presentation;
class Graphic3d_ArrayOfSegments;
class Graphic3d_ArrayOfTriangles;
class Graphic3d_ArrayOfPrimitives;
class Graphic3d_AspectFillArea3d;
class Graphic3d_AspectLine3d;
-
-class MeshVS_MeshPrsBuilder;
DEFINE_STANDARD_HANDLE(MeshVS_MeshPrsBuilder, MeshVS_PrsBuilder)
//! This class provides methods to compute base mesh presentation
#ifndef _MeshVS_NodalColorPrsBuilder_HeaderFile
#define _MeshVS_NodalColorPrsBuilder_HeaderFile
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
#include <MeshVS_DataMapOfIntegerColor.hxx>
-#include <Standard_Boolean.hxx>
#include <Aspect_SequenceOfColor.hxx>
#include <TColStd_DataMapOfIntegerReal.hxx>
#include <Quantity_Color.hxx>
#include <MeshVS_PrsBuilder.hxx>
#include <MeshVS_DisplayModeFlags.hxx>
-#include <Standard_Integer.hxx>
#include <MeshVS_BuilderPriority.hxx>
#include <TColStd_PackedMapOfInteger.hxx>
-#include <Standard_Real.hxx>
#include <MeshVS_HArray1OfSequenceOfInteger.hxx>
#include <TColStd_Array1OfInteger.hxx>
#include <TColStd_Array1OfReal.hxx>
+
class MeshVS_Mesh;
class MeshVS_DataSource;
-class Prs3d_Presentation;
class Quantity_Color;
class Graphic3d_Texture2D;
class Graphic3d_ArrayOfPrimitives;
-
-class MeshVS_NodalColorPrsBuilder;
DEFINE_STANDARD_HANDLE(MeshVS_NodalColorPrsBuilder, MeshVS_PrsBuilder)
//! This class provides methods to create presentation of nodes with assigned color.
#ifndef _MeshVS_PrsBuilder_HeaderFile
#define _MeshVS_PrsBuilder_HeaderFile
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <Standard_Boolean.hxx>
#include <MeshVS_MeshPtr.hxx>
-#include <Standard_Integer.hxx>
#include <PrsMgr_PresentationManager3d.hxx>
-#include <Standard_Transient.hxx>
+#include <Prs3d_Presentation.hxx>
#include <MeshVS_DisplayModeFlags.hxx>
#include <MeshVS_BuilderPriority.hxx>
#include <TColStd_PackedMapOfInteger.hxx>
+
class MeshVS_DataSource;
class MeshVS_Drawer;
class MeshVS_Mesh;
-class Prs3d_Presentation;
class SelectBasics_SensitiveEntity;
class SelectBasics_EntityOwner;
#ifndef _MeshVS_TextPrsBuilder_HeaderFile
#define _MeshVS_TextPrsBuilder_HeaderFile
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
#include <MeshVS_DataMapOfIntegerAsciiString.hxx>
#include <MeshVS_PrsBuilder.hxx>
-#include <Standard_Real.hxx>
#include <MeshVS_DisplayModeFlags.hxx>
-#include <Standard_Integer.hxx>
#include <MeshVS_BuilderPriority.hxx>
-#include <TColStd_PackedMapOfInteger.hxx>
-#include <Standard_Boolean.hxx>
+
class MeshVS_Mesh;
class Quantity_Color;
class MeshVS_DataSource;
-class Prs3d_Presentation;
class TCollection_AsciiString;
-
-class MeshVS_TextPrsBuilder;
DEFINE_STANDARD_HANDLE(MeshVS_TextPrsBuilder, MeshVS_PrsBuilder)
//! This class provides methods to create text data presentation.
#ifndef _MeshVS_VectorPrsBuilder_HeaderFile
#define _MeshVS_VectorPrsBuilder_HeaderFile
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <Standard_Boolean.hxx>
-#include <Standard_Real.hxx>
#include <MeshVS_DataMapOfIntegerVector.hxx>
#include <MeshVS_PrsBuilder.hxx>
#include <MeshVS_DisplayModeFlags.hxx>
-#include <Standard_Integer.hxx>
#include <MeshVS_BuilderPriority.hxx>
-#include <TColStd_PackedMapOfInteger.hxx>
#include <TColgp_Array1OfPnt.hxx>
+
class MeshVS_Mesh;
class Quantity_Color;
class MeshVS_DataSource;
-class Prs3d_Presentation;
class gp_Trsf;
class Graphic3d_ArrayOfPrimitives;
class gp_Vec;
-
-class MeshVS_VectorPrsBuilder;
DEFINE_STANDARD_HANDLE(MeshVS_VectorPrsBuilder, MeshVS_PrsBuilder)
//! This class provides methods to create vector data presentation.
Prs3d_Point.hxx
Prs3d_PointAspect.cxx
Prs3d_PointAspect.hxx
-Prs3d_Presentation.cxx
Prs3d_Presentation.hxx
Prs3d_PresentationShadow.cxx
Prs3d_PresentationShadow.hxx
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
-#include <Standard_Boolean.hxx>
-#include <Standard_Real.hxx>
#include <Prs3d_Drawer.hxx>
#include <Prs3d_NListOfSequenceOfPnt.hxx>
+#include <Prs3d_Presentation.hxx>
class TopoDS_Shape;
-class Prs3d_Presentation;
//! The Prs3d package provides the following services
//! - a presentation object (the context for all
+++ /dev/null
-// 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.
-
-#include <Prs3d_Presentation.hxx>
-
-#include <Geom_Transformation.hxx>
-#include <gp_Ax1.hxx>
-#include <gp_Dir.hxx>
-#include <gp_Pnt.hxx>
-#include <gp_Trsf.hxx>
-#include <gp_Vec.hxx>
-#include <Graphic3d_DataStructureManager.hxx>
-#include <Graphic3d_Group.hxx>
-#include <Graphic3d_NameOfMaterial.hxx>
-#include <Graphic3d_Structure.hxx>
-#include <Graphic3d_StructureManager.hxx>
-#include <Prs3d_Root.hxx>
-#include <Standard_Real.hxx>
-#include <Standard_Type.hxx>
-
-IMPLEMENT_STANDARD_RTTIEXT(Prs3d_Presentation,Graphic3d_Structure)
-
-//=======================================================================
-//function : Prs3d_Presentation
-//purpose :
-//=======================================================================
-Prs3d_Presentation::Prs3d_Presentation (const Handle(Graphic3d_StructureManager)& theViewer,
- const Standard_Boolean theToInit)
-: Graphic3d_Structure (theViewer)
-{
- if (!theToInit)
- {
- return;
- }
-}
-
-//=======================================================================
-//function : Prs3d_Presentation
-//purpose :
-//=======================================================================
-Prs3d_Presentation::Prs3d_Presentation (const Handle(Graphic3d_StructureManager)& theViewer,
- const Handle(Prs3d_Presentation)& thePrs)
-: Graphic3d_Structure (theViewer, thePrs)
-{
- //
-}
-
-
-//=======================================================================
-//function : Connect
-//purpose :
-//=======================================================================
-void Prs3d_Presentation::Connect
- ( const Handle(Prs3d_Presentation)& aPresentation)
-{
- Graphic3d_Structure::Connect(aPresentation, Graphic3d_TOC_DESCENDANT);
-}
-
-
-//=======================================================================
-//function : Remove
-//purpose :
-//=======================================================================
-void Prs3d_Presentation::Remove (const Handle(Prs3d_Presentation)& aPresentation)
-{
- Disconnect(aPresentation);
-}
-
-//=======================================================================
-//function : RemoveAll
-//purpose :
-//=======================================================================
-void Prs3d_Presentation::RemoveAll ()
-{
- DisconnectAll(Graphic3d_TOC_DESCENDANT);
-}
-
-
-//=======================================================================
-//function : CurrentGroup
-//purpose :
-//=======================================================================
-Handle(Graphic3d_Group) Prs3d_Presentation::CurrentGroup () const
-{
- if (Groups().IsEmpty())
- {
- return const_cast<Prs3d_Presentation* >(this)->NewGroup();
- }
- return Groups().Last();
-}
-
-//=======================================================================
-//function : Compute
-//purpose :
-//=======================================================================
-
-Handle(Graphic3d_Structure) Prs3d_Presentation::
- Compute(const Handle(Graphic3d_DataStructureManager)& /*aProjector*/)
-{
- return this;
-}
-
-//=======================================================================
-//function : Compute
-//purpose :
-//=======================================================================
-
-void Prs3d_Presentation::Compute(const Handle(Graphic3d_DataStructureManager)& aDataStruct,
- Handle(Graphic3d_Structure)& aStruct)
-{
- Graphic3d_Structure::Compute(aDataStruct,aStruct );
-}
-
-//=======================================================================
-//function : Compute
-//purpose :
-//=======================================================================
-
-Handle(Graphic3d_Structure) Prs3d_Presentation::Compute (const Handle(Graphic3d_DataStructureManager)& theDataStruc,
- const Handle(Geom_Transformation)& theTrsf)
-{
- return Graphic3d_Structure::Compute (theDataStruc, theTrsf);
-}
-
-//=======================================================================
-//function : Compute
-//purpose :
-//=======================================================================
-
-void Prs3d_Presentation::Compute (const Handle(Graphic3d_DataStructureManager)& theDataStruc,
- const Handle(Geom_Transformation)& theTrsf,
- Handle(Graphic3d_Structure)& theStruc)
-{
- Graphic3d_Structure::Compute (theDataStruc, theTrsf, theStruc);
-}
#ifndef _Prs3d_Presentation_HeaderFile
#define _Prs3d_Presentation_HeaderFile
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
#include <Graphic3d_Structure.hxx>
-#include <Standard_Boolean.hxx>
-
-class Prs3d_Root;
-class Graphic3d_StructureManager;
-class Graphic3d_Structure;
-class Graphic3d_DataStructureManager;
-class Geom_Transformation;
-class Graphic3d_Group;
-
-class Prs3d_Presentation;
-DEFINE_STANDARD_HANDLE(Prs3d_Presentation, Graphic3d_Structure)
-
-//! Defines a presentation object which can be displayed,
-//! highlighted or erased.
-//! The presentation object stores the results of the
-//! presentation algorithms as defined in the StdPrs
-//! classes and the Prs3d classes inheriting Prs3d_Root.
-//! This presentation object is used to give display
-//! attributes defined at this level to
-//! ApplicationInteractiveServices classes at the level above.
-//! A presentation object is attached to a given Viewer.
-class Prs3d_Presentation : public Graphic3d_Structure
-{
-
-public:
-
- //! Constructs a presentation object
- //! if <Init> is false, no color initialization is done.
- Standard_EXPORT Prs3d_Presentation(const Handle(Graphic3d_StructureManager)& theStructManager, const Standard_Boolean theToInit = Standard_True);
-
- //! Constructs a presentation object.
- Standard_EXPORT Prs3d_Presentation(const Handle(Graphic3d_StructureManager)& theStructManager, const Handle(Prs3d_Presentation)& thePrs);
-
- Standard_EXPORT virtual Handle(Graphic3d_Structure) Compute (const Handle(Graphic3d_DataStructureManager)& aProjector) Standard_OVERRIDE;
-
- //! Returns the new Structure defined for the new visualization
- Standard_EXPORT virtual Handle(Graphic3d_Structure) Compute (const Handle(Graphic3d_DataStructureManager)& theProjector,
- const Handle(Geom_Transformation)& theTrsf) Standard_OVERRIDE;
-
- //! Returns the new Structure defined for the new visualization
- Standard_EXPORT virtual void Compute (const Handle(Graphic3d_DataStructureManager)& aProjector, Handle(Graphic3d_Structure)& aStructure) Standard_OVERRIDE;
-
- //! Returns the new Structure defined for the new visualization
- Standard_EXPORT virtual void Compute (const Handle(Graphic3d_DataStructureManager)& theProjector,
- const Handle(Geom_Transformation)& theTrsf,
- Handle(Graphic3d_Structure)& theStructure) Standard_OVERRIDE;
-
- Standard_EXPORT void Connect (const Handle(Prs3d_Presentation)& aPresentation);
-
- Standard_EXPORT void Remove (const Handle(Prs3d_Presentation)& aPresentation);
-
- Standard_EXPORT void RemoveAll();
-
-friend class Prs3d_Root;
-
- DEFINE_STANDARD_RTTIEXT(Prs3d_Presentation,Graphic3d_Structure)
-
-private:
-
- Standard_EXPORT Handle(Graphic3d_Group) CurrentGroup() const;
-};
+//! Alias for porting code.
+typedef Graphic3d_Structure Prs3d_Presentation;
#endif // _Prs3d_Presentation_HeaderFile
#include <Prs3d_PresentationShadow.hxx>
-
-IMPLEMENT_STANDARD_RTTIEXT(Prs3d_PresentationShadow,Prs3d_Presentation)
+IMPLEMENT_STANDARD_RTTIEXT(Prs3d_PresentationShadow, Graphic3d_Structure)
//=======================================================================
//function : Prs3d_PresentationShadow
//purpose :
//=======================================================================
Prs3d_PresentationShadow::Prs3d_PresentationShadow (const Handle(Graphic3d_StructureManager)& theViewer,
- const Handle(Prs3d_Presentation)& thePrs)
-: Prs3d_Presentation (theViewer, thePrs),
- myParentStructId (thePrs->Identification()),
- myParentAffinity (thePrs->CStructure()->ViewAffinity)
+ const Handle(Graphic3d_Structure)& thePrs)
+: Graphic3d_Structure (theViewer, thePrs),
+ myParentAffinity (thePrs->CStructure()->ViewAffinity),
+ myParentStructId (thePrs->Identification())
{
//
}
#include <Prs3d_Presentation.hxx>
//! Defines a "shadow" of existing presentation object with custom aspects.
-class Prs3d_PresentationShadow : public Prs3d_Presentation
+class Prs3d_PresentationShadow : public Graphic3d_Structure
{
-
+ DEFINE_STANDARD_RTTIEXT(Prs3d_PresentationShadow, Graphic3d_Structure)
public:
//! Constructs a shadow of existing presentation object.
Standard_EXPORT Prs3d_PresentationShadow (const Handle(Graphic3d_StructureManager)& theViewer,
- const Handle(Prs3d_Presentation)& thePrs);
+ const Handle(Graphic3d_Structure)& thePrs);
//! Returns the id of the parent presentation
inline Standard_Integer ParentId() const { return myParentStructId; }
//! Do nothing - axis-aligned bounding box should be initialized from parent structure.
Standard_EXPORT virtual void CalculateBoundBox() Standard_OVERRIDE;
-private:
-
- DEFINE_STANDARD_RTTIEXT(Prs3d_PresentationShadow,Prs3d_Presentation)
-
private:
- Standard_Integer myParentStructId;
+
Handle(Graphic3d_ViewAffinity) myParentAffinity;
+ Standard_Integer myParentStructId;
};
-DEFINE_STANDARD_HANDLE(Prs3d_PresentationShadow, Prs3d_Presentation)
+DEFINE_STANDARD_HANDLE(Prs3d_PresentationShadow, Graphic3d_Structure)
#endif // _Prs3d_PresentationShadow_HeaderFile
PrsMgr_ListOfPresentableObjects.hxx
PrsMgr_ListOfPresentations.hxx
-PrsMgr_ModedPresentation.cxx
-PrsMgr_ModedPresentation.hxx
PrsMgr_PresentableObject.cxx
PrsMgr_PresentableObject.hxx
PrsMgr_Presentation.cxx
PrsMgr_PresentationManager.hxx
PrsMgr_PresentationManager3d.hxx
PrsMgr_Presentations.hxx
-PrsMgr_Prs.cxx
-PrsMgr_Prs.hxx
PrsMgr_TypeOfPresentation3d.hxx
+++ /dev/null
-// Copyright (c) 1998-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.
-
-
-#include <PrsMgr_ModedPresentation.hxx>
-#include <PrsMgr_Presentation.hxx>
-
-PrsMgr_ModedPresentation::PrsMgr_ModedPresentation()
-: myMode (0) {}
-
-PrsMgr_ModedPresentation::PrsMgr_ModedPresentation (const Handle(PrsMgr_Presentation)& thePrs,
- const Standard_Integer theMode)
-: myPresentation (thePrs),
- myMode (theMode)
-{
- //
-}
-
-const Handle(PrsMgr_Presentation)& PrsMgr_ModedPresentation::Presentation() const
-{
- return myPresentation;
-}
-
-Standard_Integer PrsMgr_ModedPresentation::Mode() const
-{
- return myMode;
-}
+++ /dev/null
-// Created on: 1995-01-30
-// Created by: Mister rmi
-// 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 _PrsMgr_ModedPresentation_HeaderFile
-#define _PrsMgr_ModedPresentation_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_DefineAlloc.hxx>
-#include <Standard_Handle.hxx>
-
-#include <Standard_Integer.hxx>
-class PrsMgr_Presentation;
-
-
-
-class PrsMgr_ModedPresentation
-{
-public:
-
- DEFINE_STANDARD_ALLOC
-
-
- Standard_EXPORT PrsMgr_ModedPresentation();
-
- Standard_EXPORT PrsMgr_ModedPresentation(const Handle(PrsMgr_Presentation)& thePrs, const Standard_Integer theMode);
-
- Standard_EXPORT const Handle(PrsMgr_Presentation)& Presentation() const;
-
- Standard_EXPORT Standard_Integer Mode() const;
-
-
-
-
-protected:
-
-
-
-
-
-private:
-
-
-
- Handle(PrsMgr_Presentation) myPresentation;
- Standard_Integer myMode;
-
-
-};
-
-
-
-
-
-
-
-#endif // _PrsMgr_ModedPresentation_HeaderFile
#include <Prs3d_Presentation.hxx>
#include <Prs3d_Projector.hxx>
#include <Prs3d_ShadingAspect.hxx>
-#include <PrsMgr_ModedPresentation.hxx>
+#include <PrsMgr_Presentation.hxx>
+#include <PrsMgr_PresentationManager.hxx>
#include <Standard_NotImplemented.hxx>
#include <TColStd_MapOfInteger.hxx>
//=======================================================================
PrsMgr_PresentableObject::~PrsMgr_PresentableObject()
{
+ for (PrsMgr_Presentations::Iterator aPrsIter (myPresentations); aPrsIter.More(); aPrsIter.Next())
+ {
+ // should never happen - assertion can be used
+ const Handle(PrsMgr_Presentation)& aPrs3d = aPrsIter.Value();
+ aPrs3d->Erase();
+ aPrs3d->myPresentableObject = NULL;
+ }
+
for (PrsMgr_ListOfPresentableObjectsIter anIter (myChildren); anIter.More(); anIter.Next())
{
anIter.Value()->SetCombinedParentTransform (Handle(Geom_Transformation)());
const Handle(PrsMgr_Presentation)& thePrs,
const Standard_Integer theMode)
{
- Handle(Prs3d_Presentation) aStruct3d = thePrs->Presentation();
+ const Handle(Prs3d_Presentation)& aStruct3d = thePrs;
Compute (thePrsMgr, aStruct3d, theMode);
aStruct3d->SetTransformation (myTransformation);
aStruct3d->SetClipPlanes (myClipPlanes);
{
for (PrsMgr_Presentations::Iterator aPrsIter (myPresentations); aPrsIter.More(); aPrsIter.Next())
{
- const PrsMgr_ModedPresentation& aModedPrs = aPrsIter.Value();
- if (aModedPrs.Presentation()->MustBeUpdated())
+ const Handle(PrsMgr_Presentation)& aModedPrs = aPrsIter.Value();
+ if (aModedPrs->MustBeUpdated())
{
if (theToIncludeHidden)
{
return Standard_True;
}
- Handle(PrsMgr_PresentationManager) aPrsMgr = aModedPrs.Presentation()->PresentationManager();
- if (aPrsMgr->IsDisplayed (this, aModedPrs.Mode())
- || aPrsMgr->IsHighlighted(this, aModedPrs.Mode()))
+ Handle(PrsMgr_PresentationManager) aPrsMgr = aModedPrs->PresentationManager();
+ if (aPrsMgr->IsDisplayed (this, aModedPrs->Mode())
+ || aPrsMgr->IsHighlighted(this, aModedPrs->Mode()))
{
return Standard_True;
}
Standard_Boolean hasUpdates = Standard_False;
for (PrsMgr_Presentations::Iterator aPrsIter (myPresentations); aPrsIter.More(); aPrsIter.Next())
{
- const PrsMgr_ModedPresentation& aModedPrs = aPrsIter.Value();
- if (aModedPrs.Presentation()->MustBeUpdated())
+ const Handle(PrsMgr_Presentation)& aModedPrs = aPrsIter.Value();
+ if (aModedPrs->MustBeUpdated())
{
- Handle(PrsMgr_PresentationManager) aPrsMgr = aModedPrs.Presentation()->PresentationManager();
+ Handle(PrsMgr_PresentationManager) aPrsMgr = aModedPrs->PresentationManager();
if (theToIncludeHidden
- || aPrsMgr->IsDisplayed (this, aModedPrs.Mode())
- || aPrsMgr->IsHighlighted(this, aModedPrs.Mode()))
+ || aPrsMgr->IsDisplayed (this, aModedPrs->Mode())
+ || aPrsMgr->IsHighlighted(this, aModedPrs->Mode()))
{
hasUpdates = Standard_True;
- aPrsMgr->Update (this, aModedPrs.Mode());
+ aPrsMgr->Update (this, aModedPrs->Mode());
}
}
}
{
for (PrsMgr_Presentations::Iterator aPrsIter (myPresentations); aPrsIter.More();)
{
- if (aPrsIter.Value().Mode() == theMode)
+ if (aPrsIter.Value()->Mode() == theMode)
{
- Handle(PrsMgr_PresentationManager) aPrsMgr = aPrsIter.Value().Presentation()->PresentationManager();
+ Handle(PrsMgr_PresentationManager) aPrsMgr = aPrsIter.Value()->PresentationManager();
if (aPrsMgr->IsDisplayed (this, theMode)
|| aPrsMgr->IsHighlighted(this, theMode))
{
aPrsMgr->Update (this, theMode);
- aPrsIter.Value().Presentation()->SetUpdateStatus (Standard_False);
+ aPrsIter.Value()->SetUpdateStatus (Standard_False);
}
else
{
- SetToUpdate (aPrsIter.Value().Mode());
+ SetToUpdate (aPrsIter.Value()->Mode());
}
}
else if (theToClearOther)
for (PrsMgr_Presentations::Iterator aPrsIter (myPresentations); aPrsIter.More(); aPrsIter.Next())
{
if (theMode == -1
- || aPrsIter.Value().Mode() == theMode)
+ || aPrsIter.Value()->Mode() == theMode)
{
- aPrsIter.ChangeValue().Presentation()->SetUpdateStatus(Standard_True);
+ aPrsIter.ChangeValue()->SetUpdateStatus (Standard_True);
}
}
}
TColStd_MapOfInteger MI(myPresentations.Length());
for (PrsMgr_Presentations::Iterator aPrsIter (myPresentations); aPrsIter.More(); aPrsIter.Next())
{
- const PrsMgr_ModedPresentation& aModedPrs = aPrsIter.Value();
- if (aModedPrs.Presentation()->MustBeUpdated()
- && MI.Add (aModedPrs.Mode()))
+ const Handle(PrsMgr_Presentation)& aModedPrs = aPrsIter.Value();
+ if (aModedPrs->MustBeUpdated()
+ && MI.Add (aModedPrs->Mode()))
{
- theOutList.Append (aModedPrs.Mode());
+ theOutList.Append (aModedPrs->Mode());
}
}
}
myTypeOfPresentation3d = theType;
for (PrsMgr_Presentations::Iterator aPrsIter (myPresentations); aPrsIter.More(); aPrsIter.Next())
{
- const Handle(PrsMgr_Presentation)& aPrs = aPrsIter.Value().Presentation();
- aPrs->Presentation()->SetVisual (myTypeOfPresentation3d == PrsMgr_TOP_ProjectorDependant
- ? Graphic3d_TOS_COMPUTED
- : Graphic3d_TOS_ALL);
+ const Handle(PrsMgr_Presentation)& aPrs = aPrsIter.Value();
+ aPrs->SetVisual (myTypeOfPresentation3d == PrsMgr_TOP_ProjectorDependant
+ ? Graphic3d_TOS_COMPUTED
+ : Graphic3d_TOS_ALL);
}
}
for (PrsMgr_Presentations::Iterator aPrsIter (myPresentations); aPrsIter.More(); aPrsIter.Next())
{
- aPrsIter.ChangeValue().Presentation()->SetTransformation (myTransformation);
+ aPrsIter.ChangeValue()->SetTransformation (myTransformation);
}
for (PrsMgr_ListOfPresentableObjectsIter aChildIter (myChildren); aChildIter.More(); aChildIter.Next())
{
for (PrsMgr_Presentations::Iterator aPrsIter (myPresentations); aPrsIter.More(); aPrsIter.Next())
{
- const Handle(PrsMgr_Presentation)& aPrs3d = aPrsIter.Value().Presentation();
- if (!aPrs3d.IsNull()
- && !aPrs3d->Presentation().IsNull())
- {
- aPrs3d->Presentation()->ReCompute();
- }
+ const Handle(PrsMgr_Presentation)& aPrs3d = aPrsIter.Value();
+ aPrs3d->ReCompute();
}
}
myTransformPersistence = theTrsfPers;
for (PrsMgr_Presentations::Iterator aPrsIter (myPresentations); aPrsIter.More(); aPrsIter.Next())
{
- const Handle(PrsMgr_Presentation)& aPrs3d = aPrsIter.Value().Presentation();
- if (!aPrs3d.IsNull()
- && !aPrs3d->Presentation().IsNull())
- {
- aPrs3d->Presentation()->SetTransformPersistence (myTransformPersistence);
- aPrs3d->Presentation()->ReCompute();
- }
+ const Handle(PrsMgr_Presentation)& aPrs3d = aPrsIter.Value();
+ aPrs3d->SetTransformPersistence (myTransformPersistence);
+ aPrs3d->ReCompute();
}
}
myDrawer->SetZLayer (theLayerId);
for (PrsMgr_Presentations::Iterator aPrsIter (myPresentations); aPrsIter.More(); aPrsIter.Next())
{
- const PrsMgr_ModedPresentation& aModedPrs = aPrsIter.Value();
- if (aModedPrs.Presentation().IsNull()
- || aModedPrs.Presentation()->Presentation().IsNull())
- {
- continue;
- }
-
- aModedPrs.Presentation()->Presentation()->SetZLayer (theLayerId);
+ const Handle(PrsMgr_Presentation)& aModedPrs = aPrsIter.Value();
+ aModedPrs->SetZLayer (theLayerId);
}
}
{
for (PrsMgr_Presentations::Iterator aPrsIter (myPresentations); aPrsIter.More(); aPrsIter.Next())
{
- const PrsMgr_ModedPresentation& aModedPrs = aPrsIter.Value();
- if (!aModedPrs.Presentation().IsNull()
- && !aModedPrs.Presentation()->Presentation().IsNull())
- {
- aModedPrs.Presentation()->Presentation()->SetClipPlanes (myClipPlanes);
- }
+ const Handle(PrsMgr_Presentation)& aModedPrs = aPrsIter.Value();
+ aModedPrs->SetClipPlanes (myClipPlanes);
}
}
myInfiniteState = theFlag;
for (PrsMgr_Presentations::Iterator aPrsIter (myPresentations); aPrsIter.More(); aPrsIter.Next())
{
- const PrsMgr_ModedPresentation& aModedPrs = aPrsIter.Value();
- if (!aModedPrs.Presentation().IsNull()
- && !aModedPrs.Presentation()->Presentation().IsNull())
- {
- aModedPrs.Presentation()->Presentation()->SetInfiniteState (theFlag);
- }
+ const Handle(PrsMgr_Presentation)& aModedPrs = aPrsIter.Value();
+ aModedPrs->SetInfiniteState (theFlag);
}
}
myIsMutable = theIsMutable;
for (PrsMgr_Presentations::Iterator aPrsIter (myPresentations); aPrsIter.More(); aPrsIter.Next())
{
- const PrsMgr_ModedPresentation& aModedPrs = aPrsIter.Value();
- if (!aModedPrs.Presentation().IsNull()
- && !aModedPrs.Presentation()->Presentation().IsNull())
- {
- aModedPrs.Presentation()->Presentation()->SetMutable (theIsMutable);
- }
+ const Handle(PrsMgr_Presentation)& aModedPrs = aPrsIter.Value();
+ aModedPrs->SetMutable (theIsMutable);
}
}
{
for (PrsMgr_Presentations::Iterator aPrsIter (myPresentations); aPrsIter.More(); aPrsIter.Next())
{
- const Handle(PrsMgr_Presentation)& aPrs3d = aPrsIter.ChangeValue().Presentation();
- if (aPrs3d.IsNull()
- || aPrs3d->Presentation().IsNull())
- {
- continue;
- }
-
- for (Graphic3d_SequenceOfGroup::Iterator aGroupIter (aPrs3d->Presentation()->Groups()); aGroupIter.More(); aGroupIter.Next())
+ const Handle(PrsMgr_Presentation)& aPrs3d = aPrsIter.ChangeValue();
+ for (Graphic3d_SequenceOfGroup::Iterator aGroupIter (aPrs3d->Groups()); aGroupIter.More(); aGroupIter.Next())
{
if (!aGroupIter.Value().IsNull())
{
for (PrsMgr_Presentations::Iterator aPrsIter (myPresentations); aPrsIter.More(); aPrsIter.Next())
{
- const Handle(PrsMgr_Presentation)& aPrs3d = aPrsIter.ChangeValue().Presentation();
- if (aPrs3d.IsNull()
- || aPrs3d->Presentation().IsNull())
- {
- continue;
- }
-
- for (Graphic3d_SequenceOfGroup::Iterator aGroupIter (aPrs3d->Presentation()->Groups()); aGroupIter.More(); aGroupIter.Next())
+ const Handle(PrsMgr_Presentation)& aPrs3d = aPrsIter.ChangeValue();
+ for (Graphic3d_SequenceOfGroup::Iterator aGroupIter (aPrs3d->Groups()); aGroupIter.More(); aGroupIter.Next())
{
if (!aGroupIter.Value().IsNull())
{
{
if (!myPresentations.IsEmpty())
{
- const Handle(PrsMgr_Presentation)& aPrs3d = myPresentations.First().Presentation();
- const Handle(Graphic3d_Structure)& aStruct = aPrs3d->Presentation();
- const Graphic3d_BndBox3d& aBndBox = aStruct->CStructure()->BoundingBox();
+ const Handle(PrsMgr_Presentation)& aPrs3d = myPresentations.First();
+ const Graphic3d_BndBox3d& aBndBox = aPrs3d->CStructure()->BoundingBox();
if (aBndBox.IsValid())
{
theBndBox.Update (aBndBox.CornerMin().x(), aBndBox.CornerMin().y(), aBndBox.CornerMin().z(),
return;
}
- for (Standard_Integer aPrsIter = 1; aPrsIter <= myPresentations.Length(); ++aPrsIter)
+ for (PrsMgr_Presentations::Iterator aPrsIter (myPresentations); aPrsIter.More(); aPrsIter.Next())
{
- if (myPresentations (aPrsIter).Mode() == myDrawer->DisplayMode())
+ const Handle(PrsMgr_Presentation)& aPrs3d = aPrsIter.ChangeValue();
+ if (aPrs3d->Mode() == myDrawer->DisplayMode())
{
- const Handle(PrsMgr_Presentation)& aPrs3d = myPresentations (aPrsIter).Presentation();
- const Handle(Graphic3d_Structure)& aStruct = aPrs3d->Presentation();
- const Graphic3d_BndBox3d& aBndBox = aStruct->CStructure()->BoundingBox();
+ const Graphic3d_BndBox3d& aBndBox = aPrs3d->CStructure()->BoundingBox();
if (aBndBox.IsValid())
{
theBndBox.Update (aBndBox.CornerMin().x(), aBndBox.CornerMin().y(), aBndBox.CornerMin().z(),
#include <PrsMgr_ListOfPresentableObjects.hxx>
#include <PrsMgr_Presentation.hxx>
#include <PrsMgr_Presentations.hxx>
-#include <PrsMgr_PresentationManager3d.hxx>
#include <PrsMgr_TypeOfPresentation3d.hxx>
#include <TColStd_ListOfInteger.hxx>
+class PrsMgr_PresentationManager;
+typedef PrsMgr_PresentationManager PrsMgr_PresentationManager3d;
+
//! A framework to supply the Graphic3d structure of the object to be presented.
//! On the first display request, this structure is created by calling the appropriate algorithm and retaining this framework for further display.
//! This abstract framework is inherited in Application Interactive Services (AIS), notably by AIS_InteractiveObject.
#include <Geom_Transformation.hxx>
#include <Graphic3d_DataStructureManager.hxx>
-#include <Graphic3d_Structure.hxx>
#include <Precision.hxx>
#include <Prs3d_Drawer.hxx>
-#include <Prs3d_Presentation.hxx>
#include <Prs3d_Projector.hxx>
-#include <PrsMgr_ModedPresentation.hxx>
#include <PrsMgr_PresentableObject.hxx>
#include <PrsMgr_PresentationManager.hxx>
-#include <PrsMgr_Prs.hxx>
#include <Quantity_Color.hxx>
-#include <Standard_Type.hxx>
#include <Graphic3d_CView.hxx>
-IMPLEMENT_STANDARD_RTTIEXT(PrsMgr_Presentation, Standard_Transient)
+IMPLEMENT_STANDARD_RTTIEXT(PrsMgr_Presentation, Graphic3d_Structure)
namespace
{
State_Visible
};
- static BeforeHighlightState StructureState(const Handle(Prs3d_Presentation)& theStructure)
+ static BeforeHighlightState StructureState (const Graphic3d_Structure* theStructure)
{
return !theStructure->IsDisplayed() ?
State_Empty : !theStructure->IsVisible() ?
//purpose :
//=======================================================================
PrsMgr_Presentation::PrsMgr_Presentation (const Handle(PrsMgr_PresentationManager3d)& thePrsMgr,
- const Handle(PrsMgr_PresentableObject)& thePrsObject)
-: myPresentationManager (thePrsMgr),
- myPresentableObject (thePrsObject.operator->()),
- myMustBeUpdated (Standard_False),
- myBeforeHighlightState (State_Empty)
+ const Handle(PrsMgr_PresentableObject)& thePrsObject,
+ const Standard_Integer theMode)
+: Graphic3d_Structure (thePrsMgr->StructureManager()),
+ myPresentationManager (thePrsMgr),
+ myPresentableObject (thePrsObject.get()),
+ myBeforeHighlightState (State_Empty),
+ myMode (theMode),
+ myMustBeUpdated (Standard_False)
{
- myStructure = new PrsMgr_Prs (thePrsMgr->StructureManager(),
- this, thePrsObject->TypeOfPresentation3d());
- myStructure->SetOwner (myPresentableObject);
- myStructure->SetMutable (myPresentableObject->IsMutable());
+ if (thePrsObject->TypeOfPresentation3d() == PrsMgr_TOP_ProjectorDependant)
+ {
+ SetVisual (Graphic3d_TOS_COMPUTED);
+ }
+ SetOwner (myPresentableObject);
+ SetMutable (myPresentableObject->IsMutable());
}
//=======================================================================
//=======================================================================
void PrsMgr_Presentation::display (const Standard_Boolean theIsHighlight)
{
- if (!myStructure->IsDisplayed())
+ if (!base_type::IsDisplayed())
{
- myStructure->SetIsForHighlight (theIsHighlight);
- myStructure->Display();
+ base_type::SetIsForHighlight (theIsHighlight);
+ base_type::Display();
}
- else if (!myStructure->IsVisible())
+ else if (!base_type::IsVisible())
{
- SetVisible (Standard_True);
- myStructure->SetIsForHighlight (theIsHighlight);
+ base_type::SetVisible (Standard_True);
+ base_type::SetIsForHighlight (theIsHighlight);
}
}
//=======================================================================
void PrsMgr_Presentation::Erase()
{
- if (myStructure.IsNull())
+ if (IsDeleted())
{
return;
}
// Erase structure from structure manager
- myStructure->Erase();
- myStructure->Clear();
+ base_type::Erase();
+ base_type::Clear();
// Disconnect other structures
- myStructure->DisconnectAll (Graphic3d_TOC_DESCENDANT);
+ base_type::DisconnectAll (Graphic3d_TOC_DESCENDANT);
// Clear groups and remove graphic structure
- myStructure.Nullify();
-}
-
-//=======================================================================
-//function : SetVisible
-//purpose :
-//=======================================================================
-void PrsMgr_Presentation::SetVisible (const Standard_Boolean theValue)
-{
- myStructure->SetVisible (theValue);
+ base_type::Remove();
}
//=======================================================================
{
if (!IsHighlighted())
{
- myBeforeHighlightState = StructureState (myStructure);
+ myBeforeHighlightState = StructureState (this);
}
display (Standard_True);
- myStructure->Highlight (theStyle);
+ base_type::Highlight (theStyle);
}
//=======================================================================
//function : Unhighlight
//purpose :
//=======================================================================
-void PrsMgr_Presentation::Unhighlight() const
+void PrsMgr_Presentation::Unhighlight()
{
- myStructure->UnHighlight();
+ base_type::UnHighlight();
switch (myBeforeHighlightState)
{
- case State_Visible:
- return;
- case State_Hidden:
- myStructure->SetVisible (Standard_False);
- break;
- case State_Empty:
- myStructure->Erase();
- break;
+ case State_Visible:
+ return;
+ case State_Hidden:
+ base_type::SetVisible (Standard_False);
+ break;
+ case State_Empty:
+ base_type::Erase();
+ break;
}
}
//function : Clear
//purpose :
//=======================================================================
-void PrsMgr_Presentation::Clear()
+void PrsMgr_Presentation::Clear (const Standard_Boolean theWithDestruction)
{
// This modification remove the contain of the structure:
// Consequence:
// 2. The speed for animation is constant
//myPresentableObject = NULL;
SetUpdateStatus (Standard_True);
- if (myStructure.IsNull())
+ if (IsDeleted())
{
return;
}
- myStructure->Clear (Standard_True);
- // myStructure->Clear(Standard_False);
- myStructure->RemoveAll();
+ base_type::Clear (theWithDestruction);
+ base_type::DisconnectAll (Graphic3d_TOC_DESCENDANT);
}
//=======================================================================
-//function : IsDisplayed
-//purpose :
-//=======================================================================
-Standard_Boolean PrsMgr_Presentation::IsDisplayed() const
-{
- return myStructure->IsDisplayed()
- && myStructure->IsVisible();
-}
-
-//=======================================================================
-//function : IsHighlighted
-//purpose :
-//=======================================================================
-Standard_Boolean PrsMgr_Presentation::IsHighlighted() const
-{
- return myStructure->IsHighlighted();
-}
-
-//=======================================================================
-//function : DisplayPriority
-//purpose :
-//=======================================================================
-Standard_Integer PrsMgr_Presentation::DisplayPriority() const
-{
- return myStructure->DisplayPriority();
-}
-
-//=======================================================================
-//function : SetDisplayPriority
-//purpose :
-//=======================================================================
-void PrsMgr_Presentation::SetDisplayPriority (const Standard_Integer theNewPrior)
-{
- myStructure->SetDisplayPriority (theNewPrior);
-}
-
-//=======================================================================
-//function : Connect
+//function : Compute
//purpose :
//=======================================================================
-void PrsMgr_Presentation::Connect (const Handle(PrsMgr_Presentation)& theOther) const
+void PrsMgr_Presentation::Compute()
{
- myStructure->Connect (theOther->Presentation());
-}
+ Standard_Integer aDispMode = 0;
+ for (PrsMgr_Presentations::Iterator aPrsIter (myPresentableObject->myPresentations); aPrsIter.More(); aPrsIter.Next())
+ {
+ const Handle(PrsMgr_Presentation)& aModedPresentation = aPrsIter.Value();
+ if (aModedPresentation == this)
+ {
+ aDispMode = aModedPresentation->Mode();
+ break;
+ }
+ }
-//=======================================================================
-//function : SetTransformation
-//purpose :
-//=======================================================================
-void PrsMgr_Presentation::SetTransformation (const Handle(Geom_Transformation)& theTrsf) const
-{
- myStructure->SetTransformation (theTrsf);
+ myPresentableObject->Compute (myPresentationManager, this, aDispMode);
}
//=======================================================================
//=======================================================================
Handle(Graphic3d_Structure) PrsMgr_Presentation::Compute (const Handle(Graphic3d_DataStructureManager)& theProjector)
{
- Handle(Prs3d_Presentation) aPrs = new Prs3d_Presentation (myPresentationManager->StructureManager());
+ Handle(Graphic3d_Structure) aPrs = new Graphic3d_Structure (myPresentationManager->StructureManager());
myPresentableObject->Compute (Projector (theProjector), aPrs);
return aPrs;
}
-//=======================================================================
-//function : Compute
-//purpose :
-//=======================================================================
-void PrsMgr_Presentation::Compute (const Handle(Graphic3d_Structure)& theStructure)
-{
- Standard_Integer aDispMode = 0;
- Standard_Integer aPresentationsNumber = myPresentableObject->myPresentations.Length();
- for (Standard_Integer anIter = 1; anIter <= aPresentationsNumber; ++anIter)
- {
- const PrsMgr_ModedPresentation& aModedPresentation = myPresentableObject->myPresentations.Value (anIter);
- if (aModedPresentation.Presentation().operator->() == this)
- {
- aDispMode = aModedPresentation.Mode();
- break;
- }
- }
-
- Handle(Prs3d_Presentation) aPrs3d = Handle(Prs3d_Presentation)::DownCast (theStructure);
- myPresentableObject->Compute (myPresentationManager, aPrs3d, aDispMode);
-}
-
//=======================================================================
//function : Compute
//purpose :
//=======================================================================
void PrsMgr_Presentation::Compute (const Handle(Graphic3d_DataStructureManager)& theProjector,
- const Handle(Graphic3d_Structure)& theStructToFill)
+ Handle(Graphic3d_Structure)& theStructToFill)
{
theStructToFill->Clear();
- Handle(Prs3d_Presentation) aPrs (Handle(Prs3d_Presentation)::DownCast (theStructToFill));
+ Handle(Prs3d_Presentation) aPrs = theStructToFill;
myPresentableObject->Compute (Projector (theProjector), aPrs);
}
//purpose :
//=======================================================================
void PrsMgr_Presentation::Compute (const Handle(Graphic3d_DataStructureManager)& theProjector,
- const Handle(Geom_Transformation)& theTrsf,
- const Handle(Graphic3d_Structure)& theStructToFill)
+ const Handle(Geom_Transformation)& theTrsf,
+ Handle(Graphic3d_Structure)& theStructToFill)
{
// recompute HLR after transformation in all the case
- Handle(Prs3d_Presentation) aPrs = Handle(Prs3d_Presentation)::DownCast (theStructToFill);
+ Handle(Graphic3d_Structure) aPrs = theStructToFill;
theStructToFill->Clear();
myPresentableObject->Compute (Projector (theProjector), theTrsf, aPrs);
}
{
Erase();
}
-
-//=======================================================================
-//function : SetZLayer
-//purpose :
-//=======================================================================
-void PrsMgr_Presentation::SetZLayer (Graphic3d_ZLayerId theLayerId)
-{
- myStructure->SetZLayer (theLayerId);
-}
-
-//=======================================================================
-//function : GetZLayer
-//purpose :
-//=======================================================================
-Graphic3d_ZLayerId PrsMgr_Presentation::GetZLayer() const
-{
- return myStructure->GetZLayer();
-}
#ifndef _PrsMgr_Presentation_HeaderFile
#define _PrsMgr_Presentation_HeaderFile
-#include <Graphic3d_ZLayerId.hxx>
-#include <Standard.hxx>
-#include <Standard_Boolean.hxx>
-#include <Standard_Integer.hxx>
-#include <Standard_Transient.hxx>
-#include <Standard_Type.hxx>
#include <Aspect_TypeOfHighlightMethod.hxx>
+#include <Prs3d_Presentation.hxx>
class PrsMgr_PresentationManager;
-class PrsMgr_Prs;
class PrsMgr_PresentableObject;
class Quantity_Color;
class Geom_Transformation;
-class Prs3d_Presentation;
class Prs3d_Drawer;
class Graphic3d_Structure;
class Graphic3d_DataStructureManager;
class Prs3d_Projector;
-DEFINE_STANDARD_HANDLE(PrsMgr_Presentation, Standard_Transient)
+DEFINE_STANDARD_HANDLE(PrsMgr_Presentation, Graphic3d_Structure)
-class PrsMgr_Presentation : public Standard_Transient
+class PrsMgr_Presentation : public Graphic3d_Structure
{
- DEFINE_STANDARD_RTTIEXT(PrsMgr_Presentation, Standard_Transient)
+ DEFINE_STANDARD_RTTIEXT(PrsMgr_Presentation, Graphic3d_Structure)
friend class PrsMgr_PresentationManager;
friend class PrsMgr_PresentableObject;
- friend class PrsMgr_Prs;
public:
//! Destructor
Standard_EXPORT ~PrsMgr_Presentation();
- const Handle(Prs3d_Presentation)& Presentation() const { return myStructure; }
+ Standard_DEPRECATED("Dummy to simplify porting - returns self")
+ Prs3d_Presentation* Presentation() { return this; }
//! returns the PresentationManager in which the presentation has been created.
const Handle(PrsMgr_PresentationManager)& PresentationManager() const { return myPresentationManager; }
Standard_Boolean MustBeUpdated() const { return myMustBeUpdated; }
-private:
+ //! Return display mode index.
+ Standard_Integer Mode() const { return myMode; }
- Standard_EXPORT PrsMgr_Presentation(const Handle(PrsMgr_PresentationManager)& thePresentationManager, const Handle(PrsMgr_PresentableObject)& thePresentableObject);
-
- Standard_EXPORT void Display();
-
- //! Displays myStructure.
- Standard_EXPORT void display (const Standard_Boolean theIsHighlight);
-
- Standard_EXPORT void Erase();
-
- Standard_EXPORT void SetVisible (const Standard_Boolean theValue);
-
+ //! Display structure.
+ Standard_EXPORT virtual void Display() Standard_OVERRIDE;
+
+ //! Remove structure.
+ Standard_EXPORT virtual void Erase() Standard_OVERRIDE;
+
+ //! Highlight structure.
Standard_EXPORT void Highlight (const Handle(Prs3d_Drawer)& theStyle);
-
- Standard_EXPORT void Unhighlight() const;
-
- Standard_EXPORT Standard_Boolean IsHighlighted() const;
-
- Standard_EXPORT Standard_Boolean IsDisplayed() const;
-
- Standard_EXPORT Standard_Integer DisplayPriority() const;
-
- Standard_EXPORT void SetDisplayPriority (const Standard_Integer aNewPrior);
-
- //! Set Z layer ID for the presentation
- Standard_EXPORT void SetZLayer (const Graphic3d_ZLayerId theLayerId);
-
- //! Get Z layer ID for the presentation
- Standard_EXPORT Graphic3d_ZLayerId GetZLayer() const;
-
+
+ //! Unhighlight structure.
+ Standard_EXPORT void Unhighlight();
+
+ //! Return TRUE if structure has been displayed and in no hidden state.
+ virtual Standard_Boolean IsDisplayed() const Standard_OVERRIDE
+ {
+ return base_type::IsDisplayed()
+ && base_type::IsVisible();
+ }
+
//! removes the whole content of the presentation.
//! Does not remove the other connected presentations.
- Standard_EXPORT void Clear();
-
- Standard_EXPORT void Connect (const Handle(PrsMgr_Presentation)& theOther) const;
-
- Standard_EXPORT void SetTransformation (const Handle(Geom_Transformation)& theTrsf) const;
-
- Standard_EXPORT void Compute (const Handle(Graphic3d_Structure)& theStructure);
-
- Standard_EXPORT Handle(Graphic3d_Structure) Compute (const Handle(Graphic3d_DataStructureManager)& theProjector);
-
- Standard_EXPORT Handle(Graphic3d_Structure) Compute (const Handle(Graphic3d_DataStructureManager)& theProjector, const Handle(Geom_Transformation)& theTrsf);
-
- Standard_EXPORT void Compute (const Handle(Graphic3d_DataStructureManager)& theProjector, const Handle(Graphic3d_Structure)& theGivenStruct);
-
- Standard_EXPORT void Compute (const Handle(Graphic3d_DataStructureManager)& theProjector, const Handle(Geom_Transformation)& theTrsf, const Handle(Graphic3d_Structure)& theGivenStruct);
-
+ Standard_EXPORT virtual void Clear (const Standard_Boolean theWithDestruction = Standard_True) Standard_OVERRIDE;
+
+ //! Compute structure using presentation manager.
+ Standard_EXPORT virtual void Compute() Standard_OVERRIDE;
+
+protected:
+
+ //! Main constructor.
+ Standard_EXPORT PrsMgr_Presentation (const Handle(PrsMgr_PresentationManager)& thePresentationManager,
+ const Handle(PrsMgr_PresentableObject)& thePresentableObject,
+ const Standard_Integer theMode);
+
+ //! Displays myStructure.
+ Standard_EXPORT void display (const Standard_Boolean theIsHighlight);
+
+ Standard_EXPORT virtual Handle(Graphic3d_Structure) Compute (const Handle(Graphic3d_DataStructureManager)& theProjector) Standard_OVERRIDE;
+
+ Standard_EXPORT virtual Handle(Graphic3d_Structure) Compute (const Handle(Graphic3d_DataStructureManager)& theProjector,
+ const Handle(Geom_Transformation)& theTrsf) Standard_OVERRIDE;
+
+ Standard_EXPORT virtual void Compute (const Handle(Graphic3d_DataStructureManager)& theProjector,
+ Handle(Graphic3d_Structure)& theGivenStruct) Standard_OVERRIDE;
+
+ Standard_EXPORT virtual void Compute (const Handle(Graphic3d_DataStructureManager)& theProjector,
+ const Handle(Geom_Transformation)& theTrsf,
+ Handle(Graphic3d_Structure)& theGivenStruct) Standard_OVERRIDE;
+
Standard_EXPORT static Handle(Prs3d_Projector) Projector (const Handle(Graphic3d_DataStructureManager)& theProjector);
protected:
Handle(PrsMgr_PresentationManager) myPresentationManager;
- Handle(Prs3d_Presentation) myStructure;
PrsMgr_PresentableObject* myPresentableObject;
- Standard_Boolean myMustBeUpdated;
Standard_Integer myBeforeHighlightState;
+ Standard_Integer myMode;
+ Standard_Boolean myMustBeUpdated;
};
#include <Prs3d_Drawer.hxx>
#include <Prs3d_Presentation.hxx>
#include <Prs3d_PresentationShadow.hxx>
-#include <PrsMgr_ModedPresentation.hxx>
#include <PrsMgr_PresentableObject.hxx>
#include <PrsMgr_Presentation.hxx>
#include <PrsMgr_Presentations.hxx>
if (myImmediateModeOn > 0)
{
- AddToImmediateList (aPrs->Presentation());
+ AddToImmediateList (aPrs);
}
else
{
}
PrsMgr_Presentations& aPrsList = thePrsObj->Presentations();
- for (PrsMgr_Presentations::Iterator anIt (aPrsList); anIt.More();)
+ for (PrsMgr_Presentations::Iterator aPrsIter (aPrsList); aPrsIter.More();)
{
- const PrsMgr_ModedPresentation& aModedPrs = anIt.Value();
- if (aModedPrs.Presentation().IsNull())
+ const Handle(PrsMgr_Presentation)& aPrs = aPrsIter.Value();
+ if (aPrs.IsNull())
{
- anIt.Next();
+ aPrsIter.Next();
continue;
}
- const Handle(PrsMgr_PresentationManager)& aPrsMgr = aModedPrs.Presentation()->PresentationManager();
- if ((theMode == aModedPrs.Mode() || theMode == -1)
+ const Handle(PrsMgr_PresentationManager)& aPrsMgr = aPrs->PresentationManager();
+ if ((theMode == aPrs->Mode() || theMode == -1)
&& (this == aPrsMgr))
{
- aModedPrs.Presentation()->Erase();
+ aPrs->Erase();
- aPrsList.Remove (anIt);
+ aPrsList.Remove (aPrsIter);
if (theMode != -1)
{
}
else
{
- anIt.Next();
+ aPrsIter.Next();
}
}
}
}
const PrsMgr_Presentations& aPrsList = thePrsObj->Presentations();
- for (Standard_Integer aPrsIter = 1; aPrsIter <= aPrsList.Length(); ++aPrsIter)
+ for (PrsMgr_Presentations::Iterator aPrsIter (aPrsList); aPrsIter.More(); aPrsIter.Next())
{
- const PrsMgr_ModedPresentation& aModedPrs = aPrsList.Value (aPrsIter);
- const Handle(PrsMgr_Presentation)& aPrs = aModedPrs.Presentation();
- const Handle(PrsMgr_PresentationManager)& aPrsMgr = aPrs->PresentationManager();
+ const Handle(PrsMgr_Presentation)& aPrs = aPrsIter.Value();
+ const Handle(PrsMgr_PresentationManager)& aPrsMgr = aPrs->PresentationManager();
if (this == aPrsMgr
&& aPrs->IsHighlighted())
{
if (!aShadowPrs.IsNull() && aView->IsComputed (aShadowPrs->ParentId(), aViewDepPrs))
{
aShadowPrs.Nullify();
- aShadowPrs = new Prs3d_PresentationShadow (myStructureManager,
- Handle(Prs3d_Presentation)::DownCast (aViewDepPrs));
+ aShadowPrs = new Prs3d_PresentationShadow (myStructureManager, aViewDepPrs);
aShadowPrs->SetZLayer (aViewDepPrs->CStructure()->ZLayer());
aShadowPrs->SetClipPlanes (aViewDepPrs->ClipPlanes());
aShadowPrs->CStructure()->IsForHighlight = 1;
return Standard_False;
const PrsMgr_Presentations& aPrsList = thePrsObj->Presentations();
- for (Standard_Integer aPrsIter = 1; aPrsIter <= aPrsList.Length(); ++aPrsIter)
+ for (PrsMgr_Presentations::Iterator aPrsIter (aPrsList); aPrsIter.More(); aPrsIter.Next())
{
- const PrsMgr_ModedPresentation& aModedPrs = aPrsList.Value (aPrsIter);
- const Handle(PrsMgr_PresentationManager)& aPrsMgr = aModedPrs.Presentation()->PresentationManager();
- if (theMode == aModedPrs.Mode()
+ const Handle(PrsMgr_Presentation)& aPrs = aPrsIter.Value();
+ const Handle(PrsMgr_PresentationManager)& aPrsMgr = aPrs->PresentationManager();
+ if (theMode == aPrs->Mode()
&& this == aPrsMgr)
{
return Standard_True;
const Handle(PrsMgr_PresentableObject)& theSelObj) const
{
const PrsMgr_Presentations& aPrsList = thePrsObj->Presentations();
- for (Standard_Integer aPrsIter = 1; aPrsIter <= aPrsList.Length(); ++aPrsIter)
+ for (PrsMgr_Presentations::Iterator aPrsIter (aPrsList); aPrsIter.More(); aPrsIter.Next())
{
- const PrsMgr_ModedPresentation& aModedPrs = aPrsList.Value (aPrsIter);
- const Handle(PrsMgr_PresentationManager)& aPrsMgr = aModedPrs.Presentation()->PresentationManager();
- if (theMode == aModedPrs.Mode()
+ const Handle(PrsMgr_Presentation)& aPrs = aPrsIter.Value();
+ const Handle(PrsMgr_PresentationManager)& aPrsMgr = aPrs->PresentationManager();
+ if (theMode == aPrs->Mode()
&& this == aPrsMgr)
{
- return aModedPrs.Presentation();
+ return aPrs;
}
}
return Handle(PrsMgr_Presentation)();
}
- Handle(PrsMgr_Presentation) aPrs = new PrsMgr_Presentation (this, thePrsObj);
+ Handle(PrsMgr_Presentation) aPrs = new PrsMgr_Presentation (this, thePrsObj, theMode);
aPrs->SetZLayer (thePrsObj->ZLayer());
- aPrs->Presentation()->CStructure()->ViewAffinity = myStructureManager->ObjectAffinity (!theSelObj.IsNull() ? theSelObj : thePrsObj);
- thePrsObj->Presentations().Append (PrsMgr_ModedPresentation (aPrs, theMode));
+ aPrs->CStructure()->ViewAffinity = myStructureManager->ObjectAffinity (!theSelObj.IsNull() ? theSelObj : thePrsObj);
+ thePrsObj->Presentations().Append (aPrs);
thePrsObj->Fill (this, aPrs, theMode);
// set layer index accordingly to object's presentations
const Standard_Integer theMode)
{
PrsMgr_Presentations& aPrsList = thePrsObj->Presentations();
- for (Standard_Integer aPrsIter = 1; aPrsIter <= aPrsList.Length(); ++aPrsIter)
+ for (PrsMgr_Presentations::Iterator aPrsIter (aPrsList); aPrsIter.More(); aPrsIter.Next())
{
- const PrsMgr_ModedPresentation& aModedPrs = aPrsList.Value (aPrsIter);
- const Handle(PrsMgr_PresentationManager)& aPrsMgr = aModedPrs.Presentation()->PresentationManager();
- if (theMode == aPrsList (aPrsIter).Mode()
+ const Handle(PrsMgr_Presentation)& aPrs = aPrsIter.Value();
+ const Handle(PrsMgr_PresentationManager)& aPrsMgr = aPrs->PresentationManager();
+ if (theMode == aPrs->Mode()
&& this == aPrsMgr)
{
aPrsList.Remove (aPrsIter);
{
Handle(PrsMgr_Presentation) aPrs = Presentation (thePrsObject, theMode, Standard_True);
Handle(PrsMgr_Presentation) aPrsOther = Presentation (theOtherObject, theOtherMode, Standard_True);
- aPrs->Connect (aPrsOther);
+ aPrs->Connect (aPrsOther.get(), Graphic3d_TOC_DESCENDANT);
}
// =======================================================================
if (myImmediateModeOn > 0)
{
- Handle(Prs3d_PresentationShadow) aShadow = new Prs3d_PresentationShadow (myStructureManager, aPrs->Presentation());
+ Handle(Prs3d_PresentationShadow) aShadow = new Prs3d_PresentationShadow (myStructureManager, aPrs);
aShadow->SetZLayer (theImmediateStructLayerId);
- aShadow->SetClipPlanes (aPrs->Presentation()->ClipPlanes());
+ aShadow->SetClipPlanes (aPrs->ClipPlanes());
aShadow->CStructure()->IsForHighlight = 1;
aShadow->Highlight (theStyle);
AddToImmediateList (aShadow);
}
Handle(Geom_Transformation) aTrsf = theObj->LocalTransformationGeom();
- const Standard_Integer aParentId = aPrs->Presentation()->CStructure()->Id;
+ const Standard_Integer aParentId = aPrs->CStructure()->Id;
updatePrsTransformation (myImmediateList, aParentId, aTrsf);
if (!myViewDependentImmediateList.IsEmpty())
#include <Standard_Integer.hxx>
#include <Standard_Type.hxx>
+class Graphic3d_Structure;
+typedef Graphic3d_Structure Prs3d_Presentation;
+
class Geom_Transformation;
class Prs3d_Drawer;
-class Prs3d_Presentation;
-class PrsMgr_PresentableObject;
class PrsMgr_Presentation;
+class PrsMgr_PresentableObject;
class Standard_NoSuchObject;
class V3d_Viewer;
#ifndef PrsMgr_Presentations_HeaderFile
#define PrsMgr_Presentations_HeaderFile
-#include <PrsMgr_ModedPresentation.hxx>
+#include <Standard_Type.hxx>
#include <NCollection_Sequence.hxx>
-typedef NCollection_Sequence<PrsMgr_ModedPresentation> PrsMgr_Presentations;
-
+class PrsMgr_Presentation;
+typedef NCollection_Sequence<Handle(PrsMgr_Presentation)> PrsMgr_Presentations;
#endif
+++ /dev/null
-// Copyright (c) 1998-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.
-
-#include <PrsMgr_Prs.hxx>
-
-#include <Geom_Transformation.hxx>
-#include <gp_Trsf.hxx>
-#include <Graphic3d_DataStructureManager.hxx>
-#include <Graphic3d_Structure.hxx>
-#include <Graphic3d_StructureManager.hxx>
-#include <Precision.hxx>
-#include <PrsMgr_Presentation.hxx>
-#include <Standard_Type.hxx>
-
-IMPLEMENT_STANDARD_RTTIEXT(PrsMgr_Prs,Prs3d_Presentation)
-
-PrsMgr_Prs::PrsMgr_Prs (const Handle(Graphic3d_StructureManager)& theStructManager,
- PrsMgr_Presentation* thePrs,
- PrsMgr_TypeOfPresentation3d theTypeOfPresentation)
-: Prs3d_Presentation (theStructManager),
- myPresentation3d (thePrs)
-{
- if (theTypeOfPresentation == PrsMgr_TOP_ProjectorDependant)
- SetVisual(Graphic3d_TOS_COMPUTED);
-}
-
-//=======================================================================
-//function : Compute
-//purpose :
-//=======================================================================
-
-void PrsMgr_Prs::Compute()
-{
- myPresentation3d->Compute (this);
-}
-
-//=======================================================================
-//function : Compute
-//purpose :
-//=======================================================================
-
-Handle(Graphic3d_Structure) PrsMgr_Prs::Compute(const Handle(Graphic3d_DataStructureManager)& aProjector) {
- return myPresentation3d->Compute(aProjector);
-}
-//=======================================================================
-//function : Compute
-//purpose :
-//=======================================================================
-
-Handle(Graphic3d_Structure) PrsMgr_Prs::Compute (const Handle(Graphic3d_DataStructureManager)& theProjector,
- const Handle(Geom_Transformation)& theTrsf)
-{
- return myPresentation3d->Compute (theProjector, theTrsf);
-}
-
-//=======================================================================
-//function : Compute
-//purpose :
-//=======================================================================
-
-void PrsMgr_Prs::Compute(const Handle(Graphic3d_DataStructureManager)& aProjector,
- Handle(Graphic3d_Structure)& aGivenStruct)
-{
- myPresentation3d->Compute(aProjector,aGivenStruct);
-}
-
-
-//=======================================================================
-//function : Compute
-//purpose :
-//=======================================================================
-
-void PrsMgr_Prs::Compute (const Handle(Graphic3d_DataStructureManager)& theProjector,
- const Handle(Geom_Transformation)& theTrsf,
- Handle(Graphic3d_Structure)& theGivenStruct)
-{
- myPresentation3d->Compute (theProjector, theTrsf, theGivenStruct);
-}
+++ /dev/null
-// Created on: 1995-01-31
-// Created by: Mister rmi
-// 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 _PrsMgr_Prs_HeaderFile
-#define _PrsMgr_Prs_HeaderFile
-
-#include <Prs3d_Presentation.hxx>
-#include <PrsMgr_TypeOfPresentation3d.hxx>
-#include <TColStd_Array2OfReal.hxx>
-
-class Graphic3d_StructureManager;
-class Graphic3d_Structure;
-class Graphic3d_DataStructureManager;
-class PrsMgr_Presentation;
-
-DEFINE_STANDARD_HANDLE(PrsMgr_Prs, Prs3d_Presentation)
-
-class PrsMgr_Prs : public Prs3d_Presentation
-{
- DEFINE_STANDARD_RTTIEXT(PrsMgr_Prs, Prs3d_Presentation)
-public:
-
- Standard_EXPORT PrsMgr_Prs (const Handle(Graphic3d_StructureManager)& theStructManager,
- PrsMgr_Presentation* thePresentation,
- PrsMgr_TypeOfPresentation3d theTypeOfPresentation3d);
-
- Standard_EXPORT virtual void Compute() Standard_OVERRIDE;
-
- Standard_EXPORT virtual Handle(Graphic3d_Structure) Compute (const Handle(Graphic3d_DataStructureManager)& aProjector) Standard_OVERRIDE;
-
- //! the "degenerated" Structure is displayed with
- //! a transformation defined by <AMatrix>
- //! which is not a Pure Translation.
- //! We have to take in account this Transformation
- //! in the computation of hidden line removal...
- //! returns a filled Graphic Structure.
- Standard_EXPORT virtual Handle(Graphic3d_Structure) Compute (const Handle(Graphic3d_DataStructureManager)& theProjector,
- const Handle(Geom_Transformation)& theTrsf) Standard_OVERRIDE;
-
- //! No need to return a structure, just to fill
- //! <ComputedStruct> ....
- Standard_EXPORT virtual void Compute (const Handle(Graphic3d_DataStructureManager)& aProjector, Handle(Graphic3d_Structure)& ComputedStruct) Standard_OVERRIDE;
-
- //! No Need to return a Structure, just to
- //! Fill <aStructure>. The Trsf has to be taken in account
- //! in the computation (Rotation Part....)
- Standard_EXPORT virtual void Compute (const Handle(Graphic3d_DataStructureManager)& theProjector,
- const Handle(Geom_Transformation)& theTrsf,
- Handle(Graphic3d_Structure)& theStructure) Standard_OVERRIDE;
-
-private:
-
- PrsMgr_Presentation* myPresentation3d;
-
-};
-
-#endif // _PrsMgr_Prs_HeaderFile
#ifndef _QABugs_PresentableObject_HeaderFile
#define _QABugs_PresentableObject_HeaderFile
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
#include <AIS_InteractiveObject.hxx>
-#include <PrsMgr_TypeOfPresentation3d.hxx>
-#include <SelectMgr_Selection.hxx>
-#include <Standard_Integer.hxx>
-#include <PrsMgr_PresentationManager3d.hxx>
-class Prs3d_Presentation;
-
-class QABugs_PresentableObject;
DEFINE_STANDARD_HANDLE(QABugs_PresentableObject, AIS_InteractiveObject)
-
class QABugs_PresentableObject : public AIS_InteractiveObject
{
-
+ DEFINE_STANDARD_RTTIEXT(QABugs_PresentableObject, AIS_InteractiveObject)
public:
-
Standard_EXPORT QABugs_PresentableObject(const PrsMgr_TypeOfPresentation3d aTypeOfPresentation3d = PrsMgr_TOP_AllView);
-
-
-
- DEFINE_STANDARD_RTTIEXT(QABugs_PresentableObject,AIS_InteractiveObject)
-
protected:
-
Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& aSelection, const Standard_Integer aMode) Standard_OVERRIDE;
Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager3d)& aPresentationManager, const Handle(Prs3d_Presentation)& aPresentation, const Standard_Integer aMode = 0) Standard_OVERRIDE;
-
-
-private:
-
-
-
-
};
-
-
-
-
-
-
#endif // _QABugs_PresentableObject_HeaderFile
#include <SelectMgr_SequenceOfOwner.hxx>
class SelectMgr_EntityOwner;
-class Prs3d_Presentation;
class Standard_NotImplemented;
class SelectMgr_SelectionManager;
#ifndef _StdPrs_Curve_HeaderFile
#define _StdPrs_Curve_HeaderFile
-#include <Standard.hxx>
-#include <Standard_DefineAlloc.hxx>
-#include <Standard_Handle.hxx>
-
#include <Prs3d_Root.hxx>
#include <Prs3d_Drawer.hxx>
-#include <Standard_Boolean.hxx>
-#include <Standard_Real.hxx>
#include <TColgp_SequenceOfPnt.hxx>
-#include <Standard_Integer.hxx>
-class Prs3d_Presentation;
-class Adaptor3d_Curve;
+class Adaptor3d_Curve;
//! A framework to define display of lines, arcs of circles
//! and conic sections.
#ifndef _StdPrs_DeflectionCurve_HeaderFile
#define _StdPrs_DeflectionCurve_HeaderFile
-#include <Standard.hxx>
-#include <Standard_DefineAlloc.hxx>
-#include <Standard_Handle.hxx>
-
#include <Prs3d_Root.hxx>
#include <Prs3d_Drawer.hxx>
-#include <Standard_Boolean.hxx>
-#include <Standard_Real.hxx>
#include <TColgp_SequenceOfPnt.hxx>
-class Prs3d_Presentation;
class Adaptor3d_Curve;
-
//! A framework to provide display of any curve with
//! respect to the maximal chordal deviation defined in
//! the Prs3d_Drawer attributes manager.
#ifndef _StdPrs_HLRPolyShape_HeaderFile
#define _StdPrs_HLRPolyShape_HeaderFile
-#include <Standard.hxx>
-#include <Standard_DefineAlloc.hxx>
-#include <Standard_Handle.hxx>
-
#include <Prs3d_Root.hxx>
#include <Prs3d_Drawer.hxx>
-class Prs3d_Presentation;
+
class TopoDS_Shape;
class Prs3d_Projector;
-
//! Instantiates Prs3d_PolyHLRShape to define a
//! display of a shape where hidden and visible lines are
//! identified with respect to a given projection.
#ifndef _StdPrs_Plane_HeaderFile
#define _StdPrs_Plane_HeaderFile
-#include <Standard.hxx>
-#include <Standard_DefineAlloc.hxx>
-#include <Standard_Handle.hxx>
-
#include <Prs3d_Root.hxx>
#include <Prs3d_Drawer.hxx>
-#include <Standard_Boolean.hxx>
-class Prs3d_Presentation;
class Adaptor3d_Surface;
-
//! A framework to display infinite planes.
class StdPrs_Plane : public Prs3d_Root
{
#ifndef _StdPrs_PoleCurve_HeaderFile
#define _StdPrs_PoleCurve_HeaderFile
-#include <Standard.hxx>
-#include <Standard_DefineAlloc.hxx>
-#include <Standard_Handle.hxx>
-
#include <Prs3d_Root.hxx>
#include <Prs3d_Drawer.hxx>
-#include <Standard_Boolean.hxx>
-#include <Standard_Integer.hxx>
-class Prs3d_Presentation;
class Adaptor3d_Curve;
-
//! A framework to provide display of Bezier or BSpline curves
//! (by drawing a broken line linking the poles of the curve).
class StdPrs_PoleCurve : public Prs3d_Root
#include <Prs3d_Root.hxx>
#include <Prs3d_Drawer.hxx>
#include <StdPrs_Volume.hxx>
-#include <Standard_Boolean.hxx>
class Graphic3d_ArrayOfSegments;
class Graphic3d_ArrayOfTriangles;
-class Prs3d_Presentation;
class TopoDS_Shape;
class gp_Pnt2d;
class BRep_Builder;
#ifndef _StdPrs_ShadedSurface_HeaderFile
#define _StdPrs_ShadedSurface_HeaderFile
-#include <Standard.hxx>
-#include <Standard_DefineAlloc.hxx>
-#include <Standard_Handle.hxx>
-
#include <Prs3d_Root.hxx>
#include <Prs3d_Drawer.hxx>
-class Prs3d_Presentation;
-class Adaptor3d_Surface;
+class Adaptor3d_Surface;
//! Computes the shading presentation of surfaces.
//! Draws a surface by drawing the isoparametric curves with respect to
#ifndef _StdPrs_WFDeflectionRestrictedFace_HeaderFile
#define _StdPrs_WFDeflectionRestrictedFace_HeaderFile
-#include <Standard.hxx>
-#include <Standard_DefineAlloc.hxx>
-#include <Standard_Handle.hxx>
-
#include <Prs3d_Root.hxx>
#include <Prs3d_Drawer.hxx>
-#include <Standard_Boolean.hxx>
-#include <Standard_Integer.hxx>
#include <Prs3d_NListOfSequenceOfPnt.hxx>
-class Prs3d_Presentation;
class BRepAdaptor_HSurface;
class Bnd_Box;
-
//! A framework to provide display of U and V
//! isoparameters of faces, while allowing you to impose
//! a deflection on them.
#ifndef _StdPrs_WFDeflectionSurface_HeaderFile
#define _StdPrs_WFDeflectionSurface_HeaderFile
-#include <Standard.hxx>
-#include <Standard_DefineAlloc.hxx>
-#include <Standard_Handle.hxx>
-
#include <Prs3d_Root.hxx>
#include <Prs3d_Drawer.hxx>
-class Prs3d_Presentation;
-class Adaptor3d_HSurface;
+class Adaptor3d_HSurface;
//! Draws a surface by drawing the isoparametric curves with respect to
//! a maximal chordial deviation.
#ifndef _StdPrs_WFPoleSurface_HeaderFile
#define _StdPrs_WFPoleSurface_HeaderFile
-#include <Standard.hxx>
-#include <Standard_DefineAlloc.hxx>
-#include <Standard_Handle.hxx>
-
#include <Prs3d_Root.hxx>
#include <Prs3d_Drawer.hxx>
-class Prs3d_Presentation;
-class Adaptor3d_Surface;
+class Adaptor3d_Surface;
//! Computes the presentation of surfaces by drawing a
//! double network of lines linking the poles of the surface
#ifndef _StdPrs_WFSurface_HeaderFile
#define _StdPrs_WFSurface_HeaderFile
-#include <Standard.hxx>
-#include <Standard_DefineAlloc.hxx>
-#include <Standard_Handle.hxx>
-
#include <Prs3d_Root.hxx>
#include <Prs3d_Drawer.hxx>
-class Prs3d_Presentation;
-class Adaptor3d_HSurface;
+class Adaptor3d_HSurface;
//! Computes the wireframe presentation of surfaces
//! by displaying a given number of U and/or V isoparametric
#ifndef _StdSelect_Shape_HeaderFile
#define _StdSelect_Shape_HeaderFile
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
#include <TopoDS_Shape.hxx>
#include <Prs3d_Drawer.hxx>
#include <PrsMgr_PresentableObject.hxx>
-#include <PrsMgr_PresentationManager3d.hxx>
-#include <Standard_Integer.hxx>
class TopoDS_Shape;
-class Prs3d_Presentation;
-class Prs3d_Projector;
-class Geom_Transformation;
//! Presentable shape only for purpose of display for BRepOwner...
class StdSelect_Shape : public PrsMgr_PresentableObject
Bnd_Box aBox;
for (PrsMgr_Presentations::Iterator aPrsIter (theObj->Presentations()); aPrsIter.More(); aPrsIter.Next())
{
- if (aPrsIter.Value().Mode() != theDispMode)
+ if (aPrsIter.Value()->Mode() != theDispMode)
continue;
- aBox = aPrsIter.Value().Presentation()->Presentation()->MinMaxValues();
+ aBox = aPrsIter.Value()->MinMaxValues();
}
gp_Pnt aMin = aBox.CornerMin();
gp_Pnt aMax = aBox.CornerMax();
Standard_Boolean toMapStyles = myToSyncStyles;
for (PrsMgr_Presentations::Iterator aPrsIter (myPresentations); aPrsIter.More(); aPrsIter.Next())
{
- if (aPrsIter.Value().Presentation()->Presentation() != thePrs
- && !aPrsIter.Value().Presentation()->MustBeUpdated())
+ if (aPrsIter.Value() != thePrs
+ && !aPrsIter.Value()->MustBeUpdated())
{
toMapStyles = Standard_False;
break;