mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-18 14:27:39 +03:00
0026936: Drawbacks of inlining in new type system in OCCT 7.0 -- automatic
Automatic restore of IMPLEMENT_STANDARD_RTTIEXT macro (upgrade -rtti)
This commit is contained in:
@@ -10,7 +10,6 @@
|
||||
#include <Prs3d_Drawer.hxx>
|
||||
#include <Prs3d_ArrowAspect.hxx>
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE(ISession_Curve,AIS_InteractiveObject)
|
||||
IMPLEMENT_STANDARD_RTTIEXT(ISession_Curve,AIS_InteractiveObject)
|
||||
|
||||
#ifdef _DEBUG
|
||||
|
@@ -20,7 +20,7 @@ class ISession_Curve : public AIS_InteractiveObject
|
||||
public:
|
||||
ISession_Curve(const Handle(Geom_Curve)& aCurve);
|
||||
virtual ~ISession_Curve();
|
||||
DEFINE_STANDARD_RTTI(ISession_Curve,AIS_InteractiveObject)
|
||||
DEFINE_STANDARD_RTTIEXT(ISession_Curve,AIS_InteractiveObject)
|
||||
private:
|
||||
|
||||
Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0) ;
|
||||
|
@@ -78,8 +78,8 @@ static Standard_Boolean fixParam(Standard_Real& theParam)
|
||||
// Purpose : displays a given geometric surface in 3d viewer
|
||||
// (creates a finite face and displays it)
|
||||
//================================================================
|
||||
Handle_AIS_InteractiveObject OCCDemo_Presentation::drawSurface
|
||||
(const Handle_Geom_Surface& theSurface,
|
||||
Handle(AIS_InteractiveObject) OCCDemo_Presentation::drawSurface
|
||||
(const Handle(Geom_Surface)& theSurface,
|
||||
const Quantity_Color& theColor,
|
||||
const Standard_Boolean toDisplay)
|
||||
{
|
||||
@@ -90,7 +90,7 @@ Handle_AIS_InteractiveObject OCCDemo_Presentation::drawSurface
|
||||
fixParam(v1);
|
||||
fixParam(v2);
|
||||
|
||||
Handle_AIS_Shape aGraphicSurface =
|
||||
Handle(AIS_Shape) aGraphicSurface =
|
||||
new AIS_Shape(BRepBuilderAPI_MakeFace (theSurface, u1, u2, v1, v2, Precision::Confusion()));
|
||||
|
||||
getAISContext()->SetMaterial(aGraphicSurface, Graphic3d_NOM_PLASTIC, toDisplay);
|
||||
@@ -111,8 +111,8 @@ Handle_AIS_InteractiveObject OCCDemo_Presentation::drawSurface
|
||||
// Function : DrawCurve
|
||||
// Purpose : displays a given curve 3d
|
||||
//================================================================
|
||||
Handle_AIS_InteractiveObject OCCDemo_Presentation::drawCurve
|
||||
(const Handle_Geom_Curve& theCurve,
|
||||
Handle(AIS_InteractiveObject) OCCDemo_Presentation::drawCurve
|
||||
(const Handle(Geom_Curve)& theCurve,
|
||||
const Quantity_Color& theColor,
|
||||
const Standard_Boolean toDisplay)
|
||||
{
|
||||
@@ -136,8 +136,8 @@ Handle_AIS_InteractiveObject OCCDemo_Presentation::drawCurve
|
||||
// Function : DrawCurve
|
||||
// Purpose : displays a given curve 2d
|
||||
//================================================================
|
||||
Handle_AIS_InteractiveObject OCCDemo_Presentation::drawCurve
|
||||
(const Handle_Geom2d_Curve& theCurve,
|
||||
Handle(AIS_InteractiveObject) OCCDemo_Presentation::drawCurve
|
||||
(const Handle(Geom2d_Curve)& theCurve,
|
||||
const Quantity_Color& theColor,
|
||||
const Standard_Boolean toDisplay,
|
||||
const gp_Ax2& aPosition)
|
||||
@@ -164,7 +164,7 @@ Handle_AIS_InteractiveObject OCCDemo_Presentation::drawCurve
|
||||
// Function : drawPoint
|
||||
// Purpose : displays a given point
|
||||
//================================================================
|
||||
Handle_AIS_Point OCCDemo_Presentation::drawPoint
|
||||
Handle(AIS_Point) OCCDemo_Presentation::drawPoint
|
||||
(const gp_Pnt& aPnt,
|
||||
const Quantity_Color& theColor,
|
||||
const Standard_Boolean toDisplay)
|
||||
@@ -186,7 +186,7 @@ Handle_AIS_Point OCCDemo_Presentation::drawPoint
|
||||
// (segment of line starting at thePnt with the arrow at the end,
|
||||
// the length of segment is the length of the vector)
|
||||
//================================================================
|
||||
Handle_AIS_InteractiveObject OCCDemo_Presentation::drawVector
|
||||
Handle(AIS_InteractiveObject) OCCDemo_Presentation::drawVector
|
||||
(const gp_Pnt& thePnt,
|
||||
const gp_Vec& theVec,
|
||||
const Quantity_Color& theColor,
|
||||
@@ -218,11 +218,11 @@ Handle_AIS_InteractiveObject OCCDemo_Presentation::drawVector
|
||||
}
|
||||
|
||||
|
||||
Handle_AIS_Shape OCCDemo_Presentation::drawShape
|
||||
Handle(AIS_Shape) OCCDemo_Presentation::drawShape
|
||||
(const TopoDS_Shape& theShape,const Quantity_Color& theColor,
|
||||
const Standard_Boolean toDisplay)
|
||||
{
|
||||
Handle_AIS_Shape aGraphicShape = new AIS_Shape(theShape);
|
||||
Handle(AIS_Shape) aGraphicShape = new AIS_Shape(theShape);
|
||||
|
||||
getAISContext()->SetMaterial(aGraphicShape, Graphic3d_NOM_PLASTIC, toDisplay);
|
||||
getAISContext()->SetColor (aGraphicShape, theColor, toDisplay);
|
||||
@@ -238,12 +238,12 @@ Handle_AIS_Shape OCCDemo_Presentation::drawShape
|
||||
return aGraphicShape;
|
||||
}
|
||||
|
||||
Handle_AIS_Shape OCCDemo_Presentation::drawShape
|
||||
Handle(AIS_Shape) OCCDemo_Presentation::drawShape
|
||||
(const TopoDS_Shape& theShape,
|
||||
const Graphic3d_NameOfMaterial theMaterial,
|
||||
const Standard_Boolean toDisplay)
|
||||
{
|
||||
Handle_AIS_Shape aGraphicShape = new AIS_Shape(theShape);
|
||||
Handle(AIS_Shape) aGraphicShape = new AIS_Shape(theShape);
|
||||
|
||||
getAISContext()->SetMaterial(aGraphicShape, theMaterial, toDisplay);
|
||||
if (toDisplay) {
|
||||
@@ -314,12 +314,12 @@ void OCCDemo_Presentation::ResetView()
|
||||
pView->Reset();
|
||||
}
|
||||
*/
|
||||
Handle_AIS_InteractiveContext OCCDemo_Presentation::getAISContext() const
|
||||
Handle(AIS_InteractiveContext) OCCDemo_Presentation::getAISContext() const
|
||||
{
|
||||
return myDoc->GetAISContext();
|
||||
}
|
||||
|
||||
Handle_V3d_Viewer OCCDemo_Presentation::getViewer() const
|
||||
Handle(V3d_Viewer) OCCDemo_Presentation::getViewer() const
|
||||
{
|
||||
return myDoc->GetViewer();
|
||||
}
|
||||
|
@@ -68,52 +68,52 @@ public:
|
||||
protected:
|
||||
// Methods to call from a derivable class
|
||||
void setName (const char* theName) {myName = CString(theName);}
|
||||
Handle_AIS_InteractiveContext getAISContext() const;
|
||||
Handle_V3d_Viewer getViewer() const;
|
||||
Handle(AIS_InteractiveContext) getAISContext() const;
|
||||
Handle(V3d_Viewer) getViewer() const;
|
||||
Standard_CString GetDataDir();
|
||||
|
||||
Standard_Boolean WaitForInput (unsigned long aMilliSeconds);
|
||||
// Waits for a user input or a period of time has been elapsed
|
||||
|
||||
Handle_AIS_InteractiveObject drawSurface (const Handle_Geom_Surface& theSurface,
|
||||
Handle(AIS_InteractiveObject) drawSurface (const Handle(Geom_Surface)& theSurface,
|
||||
const Quantity_Color& theColor = Quantity_Color(Quantity_NOC_LEMONCHIFFON3),
|
||||
const Standard_Boolean toDisplay = Standard_True);
|
||||
// creates a finite face based on the given geometric surface
|
||||
// and displays it in the viewer if toDisplay = Standard_True
|
||||
|
||||
Handle_AIS_InteractiveObject drawCurve (const Handle_Geom_Curve& theCurve,
|
||||
Handle(AIS_InteractiveObject) drawCurve (const Handle(Geom_Curve)& theCurve,
|
||||
const Quantity_Color& theColor = Quantity_Color(Quantity_NOC_RED),
|
||||
const Standard_Boolean toDisplay = Standard_True);
|
||||
// creates an ISession_Curve based on the given geometric curve
|
||||
// and displays it in the viewer if toDisplay = Standard_True
|
||||
|
||||
Handle_AIS_InteractiveObject drawCurve (const Handle_Geom2d_Curve& theCurve,
|
||||
Handle(AIS_InteractiveObject) drawCurve (const Handle(Geom2d_Curve)& theCurve,
|
||||
const Quantity_Color& theColor = Quantity_Color(Quantity_NOC_RED),
|
||||
const Standard_Boolean toDisplay = Standard_True,
|
||||
const gp_Ax2& aPosition = gp::XOY());
|
||||
// converts a given curve to 3d using aPosition and calls the previous method
|
||||
|
||||
Handle_AIS_Point drawPoint (const gp_Pnt& thePnt,
|
||||
Handle(AIS_Point) drawPoint (const gp_Pnt& thePnt,
|
||||
const Quantity_Color& theColor = Quantity_Color(Quantity_NOC_GREEN),
|
||||
const Standard_Boolean toDisplay = Standard_True);
|
||||
// creates a presentation of the given point
|
||||
// and displays it in the viewer if toDisplay = Standard_True
|
||||
|
||||
Handle_AIS_InteractiveObject drawVector (const gp_Pnt& thePnt,
|
||||
Handle(AIS_InteractiveObject) drawVector (const gp_Pnt& thePnt,
|
||||
const gp_Vec& theVec,
|
||||
const Quantity_Color& theColor = Quantity_Color(Quantity_NOC_YELLOW),
|
||||
const Standard_Boolean toDisplay = Standard_True);
|
||||
// creates a presentation of the given vector
|
||||
// and displays it in the viewer if toDisplay = Standard_True
|
||||
|
||||
Handle_AIS_Shape drawShape (const TopoDS_Shape& theShape,
|
||||
Handle(AIS_Shape) drawShape (const TopoDS_Shape& theShape,
|
||||
const Quantity_Color& theColor,
|
||||
const Standard_Boolean toDisplay = Standard_True);
|
||||
// creates a presentation of the given shape
|
||||
// with material PLASTIC and a given color
|
||||
// and displays it in the viewer if toDisplay = Standard_True
|
||||
|
||||
Handle_AIS_Shape drawShape (const TopoDS_Shape& theShape,
|
||||
Handle(AIS_Shape) drawShape (const TopoDS_Shape& theShape,
|
||||
const Graphic3d_NameOfMaterial theMaterial = Graphic3d_NOM_BRASS,
|
||||
const Standard_Boolean toDisplay = Standard_True);
|
||||
// creates a presentation of the given shape with the given material
|
||||
|
@@ -122,7 +122,7 @@ void Tesselate_Presentation::tesselateShape(const TopoDS_Shape& aShape)
|
||||
" TopLoc_Location aLocation;" EOL EOL
|
||||
|
||||
" // takes the triangulation of the face aFace:" EOL
|
||||
" Handle_Poly_Triangulation aTr = BRep_Tool::Triangulation(aFace,aLocation);" EOL EOL
|
||||
" Handle(Poly_Triangulation) aTr = BRep_Tool::Triangulation(aFace,aLocation);" EOL EOL
|
||||
|
||||
" if(!aTr.IsNull()) // if this triangulation is not NULL" EOL
|
||||
" { " EOL
|
||||
@@ -160,7 +160,7 @@ void Tesselate_Presentation::tesselateShape(const TopoDS_Shape& aShape)
|
||||
" if(!aEdge.IsNull()) // if this edge is not NULL" EOL
|
||||
" {" EOL
|
||||
" // takes the polygon associated to the edge aEdge:" EOL
|
||||
" Handle_Poly_PolygonOnTriangulation aPol = " EOL
|
||||
" Handle(Poly_PolygonOnTriangulation) aPol = " EOL
|
||||
" BRep_Tool::PolygonOnTriangulation(aEdge,aTr,aEdge.Location());" EOL EOL
|
||||
|
||||
" if(!aPol.IsNull()) // if this polygon is not NULL" EOL
|
||||
@@ -197,7 +197,7 @@ void Tesselate_Presentation::tesselateShape(const TopoDS_Shape& aShape)
|
||||
Standard_Integer aNumOfNodes = 0;
|
||||
Standard_Integer aNumOfTriangles = 0;
|
||||
|
||||
Handle_AIS_InteractiveObject aShowEdge,aShowFace,aShowShape;
|
||||
Handle(AIS_InteractiveObject) aShowEdge,aShowFace,aShowShape;
|
||||
|
||||
TopExp_Explorer aExpFace,aExpEdge;
|
||||
|
||||
@@ -208,7 +208,7 @@ void Tesselate_Presentation::tesselateShape(const TopoDS_Shape& aShape)
|
||||
TopoDS_Face aFace = TopoDS::Face(aExpFace.Current());
|
||||
TopLoc_Location aLocation;
|
||||
|
||||
Handle_Poly_Triangulation aTr = BRep_Tool::Triangulation(aFace,aLocation);
|
||||
Handle(Poly_Triangulation) aTr = BRep_Tool::Triangulation(aFace,aLocation);
|
||||
|
||||
if(!aTr.IsNull())
|
||||
{
|
||||
@@ -232,7 +232,7 @@ void Tesselate_Presentation::tesselateShape(const TopoDS_Shape& aShape)
|
||||
|
||||
if(!aEdge.IsNull())
|
||||
{
|
||||
Handle_Poly_PolygonOnTriangulation aPol =
|
||||
Handle(Poly_PolygonOnTriangulation) aPol =
|
||||
BRep_Tool::PolygonOnTriangulation(aEdge,aTr,aEdge.Location());
|
||||
|
||||
if(!aPol.IsNull())
|
||||
|
Reference in New Issue
Block a user