0022792: Globally defined symbol PI conflicts with VTK definition (Intel compiler)
[occt.git] / src / Prs3d / Prs3d_ArrowAspect.cxx
CommitLineData
7fd59977 1#define IMP120100 //GG 01/01/00 Add SetColor() methods
2
3#include <Prs3d_ArrowAspect.ixx>
4
5Prs3d_ArrowAspect::Prs3d_ArrowAspect ()
c6541a0c 6 : myAngle(M_PI/180.*10), myLength(1.) {
7fd59977 7#ifdef IMP120100
8 myArrowAspect =
9 new Graphic3d_AspectLine3d (
10 Quantity_Color(Quantity_NOC_WHITE), Aspect_TOL_SOLID, 1.0);
11#endif
12}
13
14
15Prs3d_ArrowAspect::Prs3d_ArrowAspect (const Quantity_PlaneAngle anAngle,
16 const Quantity_Length aLength)
17 : myAngle(anAngle), myLength(aLength) {
18#ifdef IMP120100
19 myArrowAspect =
20 new Graphic3d_AspectLine3d (
21 Quantity_Color(Quantity_NOC_WHITE), Aspect_TOL_SOLID, 1.0);
22#endif
23}
24
25void Prs3d_ArrowAspect::SetAngle ( const Quantity_PlaneAngle anAngle) {
26 Prs3d_InvalidAngle_Raise_if ( anAngle <= 0. ||
c6541a0c 27 anAngle >= M_PI /2. , "");
7fd59977 28 myAngle = anAngle;
29}
30Quantity_PlaneAngle Prs3d_ArrowAspect::Angle () const
31{
32return myAngle;
33}
34
35void Prs3d_ArrowAspect::SetLength ( const Quantity_Length aLength)
36{
37 myLength = aLength;
38}
39Quantity_Length Prs3d_ArrowAspect::Length () const
40{
41return myLength;
42}
43
44void Prs3d_ArrowAspect::Print (Standard_OStream& s) const {
45
46 s << "ArrowAspect: Length: " << myLength << " Angle: " << myAngle;
47
48}
49
50#ifdef IMP120100
51void Prs3d_ArrowAspect::SetColor(const Quantity_Color &aColor) {
52 myArrowAspect->SetColor(aColor);
53}
54
55void Prs3d_ArrowAspect::SetColor(const Quantity_NameOfColor aColor) {
56 SetColor(Quantity_Color(aColor));
57}
58
59Handle(Graphic3d_AspectLine3d) Prs3d_ArrowAspect::Aspect() const {
60 return myArrowAspect;
61}
62#endif