Warnings on vc14 were eliminated
[occt.git] / src / Blend / Blend_Point.lxx
1 // Copyright (c) 1995-1999 Matra Datavision
2 // Copyright (c) 1999-2014 OPEN CASCADE SAS
3 //
4 // This file is part of Open CASCADE Technology software library.
5 //
6 // This library is free software; you can redistribute it and/or modify it under
7 // the terms of the GNU Lesser General Public License version 2.1 as published
8 // by the Free Software Foundation, with special exception defined in the file
9 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
10 // distribution for complete text of the license and disclaimer of any warranty.
11 //
12 // Alternatively, this file may be used under the terms of Open CASCADE
13 // commercial license or contractual agreement.
14
15 #include <Standard_DomainError.hxx>
16 #include <gp_Vec2d.hxx>
17
18 inline void Blend_Point::SetParameter(const Standard_Real Param)
19 {
20   prm = Param;
21 }
22
23 inline const gp_Pnt& Blend_Point::PointOnS1 () const
24 {
25   return pt1;
26 }
27
28 inline const gp_Pnt& Blend_Point::PointOnS2 () const
29 {
30   return pt2;
31 }
32
33 inline Standard_Real Blend_Point::Parameter () const
34 {
35   return prm;
36 }
37
38 inline void Blend_Point::ParametersOnS1 (Standard_Real& U1,
39                                          Standard_Real& V1) const
40 {
41   if (!hass1) {throw Standard_DomainError();}
42   U1 = u1;
43   V1 = v1;
44 }
45
46 inline void Blend_Point::ParametersOnS2 (Standard_Real& U2,
47                                          Standard_Real& V2) const
48 {
49   if (!hass2) {throw Standard_DomainError();}
50   U2 = u2;
51   V2 = v2;
52 }
53
54 inline Standard_Boolean Blend_Point::IsTangencyPoint () const
55 {
56   return istgt;
57 }
58
59
60 inline const gp_Vec& Blend_Point::TangentOnS1 () const
61 {
62   if (istgt) {throw Standard_DomainError();}
63   return tg1;
64 }
65
66 inline const gp_Vec& Blend_Point::TangentOnS2 () const
67 {
68   if (istgt) {throw Standard_DomainError();}
69   return tg2;
70 }
71
72 inline gp_Vec2d Blend_Point::Tangent2dOnS1 () const
73 {
74   if (istgt || !hass1) {throw Standard_DomainError();}
75   return gp_Vec2d(utg12d,vtg12d);
76 }
77
78 inline gp_Vec2d Blend_Point::Tangent2dOnS2 () const
79 {
80   if (istgt || !hass2) {throw Standard_DomainError();}
81   return gp_Vec2d(utg22d,vtg22d);
82 }
83
84 inline const gp_Pnt& Blend_Point::PointOnS () const
85 {
86   return pt1;
87 }
88
89 inline const gp_Pnt& Blend_Point::PointOnC () const
90 {
91   return pt2;
92 }
93
94 inline void Blend_Point::ParametersOnS (Standard_Real& U1,
95                                         Standard_Real& V1) const
96 {
97   if (!hass1) {throw Standard_DomainError();}
98   U1 = u1;
99   V1 = v1;
100 }
101
102 inline Standard_Real Blend_Point::ParameterOnC () const
103 {
104   if (!hasc2) {throw Standard_DomainError();}
105   return pc2;
106 }
107
108 inline const gp_Vec& Blend_Point::TangentOnS () const
109 {
110   if (istgt || !hass1) {throw Standard_DomainError();}
111   return tg1;
112 }
113
114 inline const gp_Vec& Blend_Point::TangentOnC () const
115 {
116   if (istgt) {throw Standard_DomainError();}
117   return tg2;
118 }
119
120 inline gp_Vec2d Blend_Point::Tangent2d () const
121 {
122   if (istgt || !hass1) {throw Standard_DomainError();}
123   return gp_Vec2d(utg12d,vtg12d);
124 }
125
126
127 inline const gp_Pnt& Blend_Point::PointOnC1 () const
128 {
129   return pt1;
130 }
131
132 inline const gp_Pnt& Blend_Point::PointOnC2 () const
133 {
134   return pt2;
135 }
136
137 inline Standard_Real Blend_Point::ParameterOnC1 () const
138 {
139   if (!hasc1) {throw Standard_DomainError();}
140   return pc1;
141 }
142
143 inline Standard_Real Blend_Point::ParameterOnC2 () const
144 {
145   if (!hasc2) {throw Standard_DomainError();}
146   return pc2;
147 }
148
149 inline const gp_Vec& Blend_Point::TangentOnC1 () const
150 {
151   if (istgt || !hass1) {throw Standard_DomainError();}
152   return tg1;
153 }
154
155 inline const gp_Vec& Blend_Point::TangentOnC2 () const
156 {
157   if (istgt) {throw Standard_DomainError();}
158   return tg2;
159 }