0023634: Eliminate Polyline and Polygon usage in drawers
[occt.git] / src / Prs3d / Prs3d_PlaneSet.cxx
CommitLineData
b311480e 1// Created on: 1993-10-20
2// Created by: Isabelle VERDURON
3// Copyright (c) 1993-1999 Matra Datavision
4// Copyright (c) 1999-2012 OPEN CASCADE SAS
5//
6// The content of this file is subject to the Open CASCADE Technology Public
7// License Version 6.5 (the "License"). You may not use the content of this file
8// except in compliance with the License. Please obtain a copy of the License
9// at http://www.opencascade.org and read it completely before using this file.
10//
11// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13//
14// The Original Code and all software distributed under the License is
15// distributed on an "AS IS" basis, without warranty of any kind, and the
16// Initial Developer hereby disclaims all such warranties, including without
17// limitation, any warranties of merchantability, fitness for a particular
18// purpose or non-infringement. Please see the License for the specific terms
19// and conditions governing the rights and limitations under the License.
20
7fd59977 21
22
23#include <Prs3d_PlaneSet.ixx>
24#include <gp_Dir.hxx>
25#include <gp_Pnt.hxx>
26#include <gp_Ax1.hxx>
27#include <gp_Dir.hxx>
28
29Prs3d_PlaneSet::Prs3d_PlaneSet(const Standard_Real Xdir,
30 const Standard_Real Ydir,
31 const Standard_Real Zdir,
32 const Standard_Real Xloc,
33 const Standard_Real Yloc,
34 const Standard_Real Zloc,
35 const Quantity_Length anOffset)
36
37 : myPlane(gp_Pln(gp_Pnt(Xloc,Yloc,Zloc),gp_Dir(Xdir,Ydir,Zdir))),
38 myOffset(anOffset) {
39}
40
41
42void Prs3d_PlaneSet::SetDirection(const Standard_Real X,
43 const Standard_Real Y,
44 const Standard_Real Z) {
45
46 myPlane = gp_Pln(myPlane.Location(),gp_Dir(X,Y,Z));
47}
48
49void Prs3d_PlaneSet::SetLocation(const Standard_Real X,
50 const Standard_Real Y,
51 const Standard_Real Z) {
52
53 myPlane.SetLocation(gp_Pnt(X,Y,Z));
54}
55
56void Prs3d_PlaneSet::SetOffset(const Quantity_Length anOffset) {
57
58 myOffset = anOffset;
59}
60
61gp_Pln Prs3d_PlaneSet::Plane() const {
62
63 return myPlane;
64
65}
66Quantity_Length Prs3d_PlaneSet::Offset () const {
67
68 return myOffset;
69
70}
71
72void Prs3d_PlaneSet::Location(Quantity_Length& X,Quantity_Length& Y,Quantity_Length& Z) const {
73
74 myPlane.Location().Coord(X,Y,Z);
75}
76
77void Prs3d_PlaneSet::Direction(Quantity_Length& X,Quantity_Length& Y,Quantity_Length& Z) const {
78
79 myPlane.Axis().Direction().Coord(X,Y,Z);
80}
81