7fd59977 |
1 | // File: DsgPrs_XYZPlanePresentation.cdl |
2 | // Created: Mon Feb 10 14:50:11 1997 |
3 | // Author: Odile Olivier |
4 | // <odl@sacadox.paris1.matra-dtv.fr> |
5 | //Copyright: Matra Datavision 1997 |
6 | |
7 | #include <DsgPrs_XYZPlanePresentation.ixx> |
8 | #include <Prs3d_Root.hxx> |
9 | #include <Prs3d_PlaneAspect.hxx> |
10 | #include <Prs3d_LineAspect.hxx> |
11 | #include <Graphic3d_Group.hxx> |
12 | #include <Graphic3d_Array1OfVertex.hxx> |
13 | |
14 | |
15 | //======================================================================= |
16 | //function : Add |
17 | //purpose : |
18 | //======================================================================= |
19 | |
20 | void DsgPrs_XYZPlanePresentation::Add( |
21 | const Handle(Prs3d_Presentation)& aPresentation, |
22 | const Handle(Prs3d_Drawer)& aDrawer, |
23 | const gp_Pnt& aPt1, |
24 | const gp_Pnt& aPt2, |
25 | const gp_Pnt& aPt3) |
26 | { |
27 | |
28 | |
29 | Handle(Graphic3d_Group) TheGroup = Prs3d_Root::CurrentGroup(aPresentation); |
30 | TheGroup->SetPrimitivesAspect(aDrawer->PlaneAspect()->EdgesAspect()->Aspect()); |
31 | |
32 | Quantity_Length x1,y1,z1,x2,y2,z2,x3,y3,z3; |
33 | |
34 | aPt1.Coord(x1,y1,z1); |
35 | aPt2.Coord(x2,y2,z2); |
36 | aPt3.Coord(x3,y3,z3); |
37 | |
38 | Graphic3d_Array1OfVertex A(1,4); |
39 | A(1).SetCoord(x1,y1,z1); |
40 | A(2).SetCoord(x2,y2,z2); |
41 | A(3).SetCoord(x3,y3,z3); |
42 | A(4).SetCoord(x1,y1,z1); |
43 | |
44 | TheGroup->Polyline(A); |
45 | |
46 | } |