0031990: Coding, Draw Harness - Replace C-like pointers to function in Draw_SaveAndRe...
[occt.git] / src / DrawTrSurf / DrawTrSurf_Curve.hxx
CommitLineData
42cf5bc1 1// Created on: 1992-05-21
2// Created by: Jean Claude VAUTHIER
3// Copyright (c) 1992-1999 Matra Datavision
4// Copyright (c) 1999-2014 OPEN CASCADE SAS
5//
6// This file is part of Open CASCADE Technology software library.
7//
8// This library is free software; you can redistribute it and/or modify it under
9// the terms of the GNU Lesser General Public License version 2.1 as published
10// by the Free Software Foundation, with special exception defined in the file
11// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12// distribution for complete text of the license and disclaimer of any warranty.
13//
14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
16
17#ifndef _DrawTrSurf_Curve_HeaderFile
18#define _DrawTrSurf_Curve_HeaderFile
19
42cf5bc1 20#include <Draw_Color.hxx>
42cf5bc1 21#include <DrawTrSurf_Drawable.hxx>
42cf5bc1 22#include <Draw_Interpretor.hxx>
a13df0fe 23
42cf5bc1 24class Geom_Curve;
25class Draw_Color;
26class Draw_Display;
42cf5bc1 27
42cf5bc1 28DEFINE_STANDARD_HANDLE(DrawTrSurf_Curve, DrawTrSurf_Drawable)
29
42cf5bc1 30//! This class defines a drawable curve in 3d space.
31class DrawTrSurf_Curve : public DrawTrSurf_Drawable
32{
a13df0fe 33 DEFINE_STANDARD_RTTIEXT(DrawTrSurf_Curve, DrawTrSurf_Drawable)
34 Draw_Drawable3D_FACTORY
42cf5bc1 35public:
36
42cf5bc1 37 //! creates a drawable curve from a curve of package Geom.
a13df0fe 38 Standard_EXPORT DrawTrSurf_Curve (const Handle(Geom_Curve)& C, const Standard_Boolean DispOrigin = Standard_True);
42cf5bc1 39
a13df0fe 40 Standard_EXPORT DrawTrSurf_Curve (const Handle(Geom_Curve)& C,
41 const Draw_Color& aColor, const Standard_Integer Discret, const Standard_Real Deflection,
42 const Standard_Integer DrawMode,
43 const Standard_Boolean DispOrigin = Standard_True, const Standard_Boolean DispCurvRadius = Standard_False,
44 const Standard_Real RadiusMax = 1.0e3, const Standard_Real RatioOfRadius = 0.1);
42cf5bc1 45
a13df0fe 46 Standard_EXPORT virtual void DrawOn (Draw_Display& dis) const Standard_OVERRIDE;
42cf5bc1 47
a13df0fe 48 Handle(Geom_Curve) GetCurve() const { return curv; }
42cf5bc1 49
a13df0fe 50 void SetColor (const Draw_Color& theColor) { look = theColor; }
42cf5bc1 51
a13df0fe 52 Standard_Boolean DisplayOrigin() const { return disporigin; }
42cf5bc1 53
a13df0fe 54 void DisplayOrigin (const Standard_Boolean V) { disporigin = V; }
42cf5bc1 55
a13df0fe 56 void ShowCurvature() { dispcurvradius = Standard_True; }
42cf5bc1 57
a13df0fe 58 void ClearCurvature() { dispcurvradius = Standard_False; }
42cf5bc1 59
a13df0fe 60 void SetRadiusMax (const Standard_Real theRadius) { radiusmax = theRadius; }
42cf5bc1 61
a13df0fe 62 void SetRadiusRatio (const Standard_Real theRatio) { radiusratio = theRatio; }
42cf5bc1 63
a13df0fe 64 Draw_Color Color() const { return look; }
42cf5bc1 65
a13df0fe 66 Standard_Real RadiusMax() const { return radiusmax; }
42cf5bc1 67
a13df0fe 68 Standard_Real RadiusRatio() const { return radiusratio; }
69
70 //! For variable copy.
71 Standard_EXPORT virtual Handle(Draw_Drawable3D) Copy() const Standard_OVERRIDE;
42cf5bc1 72
a13df0fe 73 //! For variable dump.
74 Standard_EXPORT virtual void Dump (Standard_OStream& S) const Standard_OVERRIDE;
42cf5bc1 75
a13df0fe 76 //! Save drawable into stream.
77 Standard_EXPORT virtual void Save (Standard_OStream& theStream) const Standard_OVERRIDE;
42cf5bc1 78
a13df0fe 79 //! For variable whatis command. Set as a result the type of the variable.
80 Standard_EXPORT virtual void Whatis (Draw_Interpretor& I) const Standard_OVERRIDE;
42cf5bc1 81
a13df0fe 82protected:
42cf5bc1 83
a13df0fe 84 Handle(Geom_Curve) curv;
85 Draw_Color look;
86 Standard_Boolean disporigin;
87 Standard_Boolean dispcurvradius;
88 Standard_Real radiusmax;
89 Standard_Real radiusratio;
42cf5bc1 90
a13df0fe 91};
42cf5bc1 92
93#endif // _DrawTrSurf_Curve_HeaderFile