PageRenderTime 42ms CodeModel.GetById 30ms app.highlight 9ms RepoModel.GetById 0ms app.codeStats 0ms

/opencascade-6.5.1/ros/inc/gp_Hypr.hxx

https://github.com/jehc/MondocosmOS
C++ Header | 299 lines | 103 code | 59 blank | 137 comment | 1 complexity | 6dcdb154a0f19495508735785e4c45bf MD5 | raw file
  1// This file is generated by WOK (CPPExt).
  2// Please do not edit this file; modify original file instead.
  3// The copyright and license terms as defined for the original file apply to 
  4// this header file considered to be the "object code" form of the original source.
  5
  6#ifndef _gp_Hypr_HeaderFile
  7#define _gp_Hypr_HeaderFile
  8
  9#ifndef _Standard_HeaderFile
 10#include <Standard.hxx>
 11#endif
 12#ifndef _Standard_Macro_HeaderFile
 13#include <Standard_Macro.hxx>
 14#endif
 15
 16#ifndef _gp_Ax2_HeaderFile
 17#include <gp_Ax2.hxx>
 18#endif
 19#ifndef _Standard_Real_HeaderFile
 20#include <Standard_Real.hxx>
 21#endif
 22#ifndef _Standard_Storable_HeaderFile
 23#include <Standard_Storable.hxx>
 24#endif
 25#ifndef _gp_Ax1_HeaderFile
 26#include <gp_Ax1.hxx>
 27#endif
 28#ifndef _gp_Pnt_HeaderFile
 29#include <gp_Pnt.hxx>
 30#endif
 31#ifndef _Standard_PrimitiveTypes_HeaderFile
 32#include <Standard_PrimitiveTypes.hxx>
 33#endif
 34class Standard_ConstructionError;
 35class Standard_DomainError;
 36class gp_Ax2;
 37class gp_Ax1;
 38class gp_Pnt;
 39class gp_Trsf;
 40class gp_Vec;
 41
 42
 43Standard_EXPORT const Handle(Standard_Type)& STANDARD_TYPE(gp_Hypr);
 44
 45//! Describes a branch of a hyperbola in 3D space. <br>
 46//! A hyperbola is defined by its major and minor radii and <br>
 47//! positioned in space with a coordinate system (a gp_Ax2 <br>
 48//! object) of which: <br>
 49//! -   the origin is the center of the hyperbola, <br>
 50//! -   the "X Direction" defines the major axis of the <br>
 51//!   hyperbola, and <br>
 52//! - the "Y Direction" defines the minor axis of the hyperbola. <br>
 53//! The origin, "X Direction" and "Y Direction" of this <br>
 54//! coordinate system together define the plane of the <br>
 55//! hyperbola. This coordinate system is the "local <br>
 56//! coordinate system" of the hyperbola. In this coordinate <br>
 57//! system, the equation of the hyperbola is: <br>
 58//! X*X/(MajorRadius**2)-Y*Y/(MinorRadius**2) = 1.0 <br>
 59//! The branch of the hyperbola described is the one located <br>
 60//! on the positive side of the major axis. <br>
 61//! The "main Direction" of the local coordinate system is a <br>
 62//! normal vector to the plane of the hyperbola. This vector <br>
 63//! gives an implicit orientation to the hyperbola. We refer to <br>
 64//! the "main Axis" of the local coordinate system as the <br>
 65//! "Axis" of the hyperbola. <br>
 66//! The following schema shows the plane of the hyperbola, <br>
 67//! and in it, the respective positions of the three branches of <br>
 68//! hyperbolas constructed with the functions OtherBranch, <br>
 69//! ConjugateBranch1, and ConjugateBranch2: <br>
 70class gp_Hypr  {
 71
 72public:
 73  void* operator new(size_t,void* anAddress) 
 74  {
 75    return anAddress;
 76  }
 77  void* operator new(size_t size) 
 78  {
 79    return Standard::Allocate(size); 
 80  }
 81  void  operator delete(void *anAddress) 
 82  {
 83    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
 84  }
 85
 86  //! Creates of an indefinite hyperbola. <br>
 87      gp_Hypr();
 88  //! Creates a hyperbola with radii MajorRadius and <br>
 89//!   MinorRadius, positioned in the space by the <br>
 90//!   coordinate system A2 such that: <br>
 91//!   -   the origin of A2 is the center of the hyperbola, <br>
 92//!   -   the "X Direction" of A2 defines the major axis of <br>
 93//!    the hyperbola, that is, the major radius <br>
 94//!    MajorRadius is measured along this axis, and <br>
 95//!   -   the "Y Direction" of A2 defines the minor axis of <br>
 96//!    the hyperbola, that is, the minor radius <br>
 97//!    MinorRadius is measured along this axis. <br>
 98//! Note: This class does not prevent the creation of a <br>
 99//! hyperbola where: <br>
100//! -   MajorAxis is equal to MinorAxis, or <br>
101//! -   MajorAxis is less than MinorAxis. <br>
102//! Exceptions <br>
103//! Standard_ConstructionError if MajorAxis or MinorAxis is negative. <br>
104//!     Raises ConstructionError if MajorRadius < 0.0 or MinorRadius < 0.0 <br>//! Raised if MajorRadius < 0.0 or MinorRadius < 0.0 <br>
105      gp_Hypr(const gp_Ax2& A2,const Standard_Real MajorRadius,const Standard_Real MinorRadius);
106  //! Modifies this hyperbola, by redefining its local coordinate <br>
107//! system so that: <br>
108//! -   its origin and "main Direction" become those of the <br>
109//!   axis A1 (the "X Direction" and "Y Direction" are then <br>
110//!   recomputed in the same way as for any gp_Ax2). <br>
111//! Raises ConstructionError if the direction of A1 is parallel to the direction of <br>
112//!  the "XAxis" of the hyperbola. <br>
113        void SetAxis(const gp_Ax1& A1) ;
114  //! Modifies this hyperbola, by redefining its local coordinate <br>
115//! system so that its origin becomes P. <br>
116        void SetLocation(const gp_Pnt& P) ;
117  
118//! Modifies the major  radius of this hyperbola. <br>
119//! Exceptions <br>
120//! Standard_ConstructionError if MajorRadius is negative. <br>
121        void SetMajorRadius(const Standard_Real MajorRadius) ;
122  
123//! Modifies the minor  radius of this hyperbola. <br>
124//! Exceptions <br>
125//! Standard_ConstructionError if MinorRadius is negative. <br>
126        void SetMinorRadius(const Standard_Real MinorRadius) ;
127  //! Modifies this hyperbola, by redefining its local coordinate <br>
128//! system so that it becomes A2. <br>
129        void SetPosition(const gp_Ax2& A2) ;
130  
131//!  In the local coordinate system of the hyperbola the equation of <br>
132//!  the hyperbola is (X*X)/(A*A) - (Y*Y)/(B*B) = 1.0 and the <br>
133//!  equation of the first asymptote is Y = (B/A)*X <br>
134//!  where A is the major radius and B is the minor radius. Raises ConstructionError if MajorRadius = 0.0 <br>
135        gp_Ax1 Asymptote1() const;
136  
137//!  In the local coordinate system of the hyperbola the equation of <br>
138//!  the hyperbola is (X*X)/(A*A) - (Y*Y)/(B*B) = 1.0 and the <br>
139//!  equation of the first asymptote is Y = -(B/A)*X. <br>
140//!  where A is the major radius and B is the minor radius. Raises ConstructionError if MajorRadius = 0.0 <br>
141        gp_Ax1 Asymptote2() const;
142  //! Returns the axis passing through the center, <br>
143//! and normal to the plane of this hyperbola. <br>
144       const gp_Ax1& Axis() const;
145  
146//!  Computes the branch of hyperbola which is on the positive side of the <br>
147//!  "YAxis" of <me>. <br>
148        gp_Hypr ConjugateBranch1() const;
149  
150//!  Computes the branch of hyperbola which is on the negative side of the <br>
151//!  "YAxis" of <me>. <br>
152        gp_Hypr ConjugateBranch2() const;
153  
154//!  This directrix is the line normal to the XAxis of the hyperbola <br>
155//!  in the local plane (Z = 0) at a distance d = MajorRadius / e <br>
156//!  from the center of the hyperbola, where e is the eccentricity of <br>
157//!  the hyperbola. <br>
158//!  This line is parallel to the "YAxis". The intersection point <br>
159//!  between the directrix1 and the "XAxis" is the "Location" point <br>
160//!  of the directrix1. This point is on the positive side of the <br>
161//!  "XAxis". <br>
162        gp_Ax1 Directrix1() const;
163  
164//!  This line is obtained by the symmetrical transformation <br>
165//!  of "Directrix1" with respect to the "YAxis" of the hyperbola. <br>
166        gp_Ax1 Directrix2() const;
167  
168//!  Returns the excentricity of the hyperbola (e > 1). <br>
169//!  If f is the distance between the location of the hyperbola <br>
170//!  and the Focus1 then the eccentricity e = f / MajorRadius. Raises DomainError if MajorRadius = 0.0 <br>
171        Standard_Real Eccentricity() const;
172  
173//!  Computes the focal distance. It is the distance between the <br>
174//!  the two focus of the hyperbola. <br>
175        Standard_Real Focal() const;
176  
177//!  Returns the first focus of the hyperbola. This focus is on the <br>
178//!  positive side of the "XAxis" of the hyperbola. <br>
179        gp_Pnt Focus1() const;
180  
181//!  Returns the second focus of the hyperbola. This focus is on the <br>
182//!  negative side of the "XAxis" of the hyperbola. <br>
183        gp_Pnt Focus2() const;
184  
185//!  Returns  the location point of the hyperbola. It is the <br>
186//!  intersection point between the "XAxis" and the "YAxis". <br>
187       const gp_Pnt& Location() const;
188  
189//!  Returns the major radius of the hyperbola. It is the radius <br>
190//!  on the "XAxis" of the hyperbola. <br>
191        Standard_Real MajorRadius() const;
192  
193//!  Returns the minor radius of the hyperbola. It is the radius <br>
194//!  on the "YAxis" of the hyperbola. <br>
195        Standard_Real MinorRadius() const;
196  
197//!  Returns the branch of hyperbola obtained by doing the <br>
198//!  symmetrical transformation of <me> with respect to the <br>
199//!  "YAxis"  of <me>. <br>
200        gp_Hypr OtherBranch() const;
201  
202//!  Returns p = (e * e - 1) * MajorRadius where e is the <br>
203//!  eccentricity of the hyperbola. <br>
204//! Raises DomainError if MajorRadius = 0.0 <br>
205        Standard_Real Parameter() const;
206  //! Returns the coordinate system of the hyperbola. <br>
207       const gp_Ax2& Position() const;
208  //! Computes an axis, whose <br>
209//! -   the origin is the center of this hyperbola, and <br>
210//! -   the unit vector is the "X Direction" <br>
211//!   of the local coordinate system of this hyperbola. <br>
212//! These axes are, the major axis (the "X <br>
213//! Axis") and  of this hyperboReturns the "XAxis" of the hyperbola. <br>
214        gp_Ax1 XAxis() const;
215  //!      Computes an axis, whose <br>
216//! -   the origin is the center of this hyperbola, and <br>
217//! -   the unit vector is the "Y Direction" <br>
218//!   of the local coordinate system of this hyperbola. <br>
219//! These axes are the minor axis (the "Y Axis") of this hyperbola <br>
220        gp_Ax1 YAxis() const;
221  
222  Standard_EXPORT     void Mirror(const gp_Pnt& P) ;
223  
224//!  Performs the symmetrical transformation of an hyperbola with <br>
225//!  respect  to the point P which is the center of the symmetry. <br>
226  Standard_EXPORT     gp_Hypr Mirrored(const gp_Pnt& P) const;
227  
228  Standard_EXPORT     void Mirror(const gp_Ax1& A1) ;
229  
230//!  Performs the symmetrical transformation of an hyperbola with <br>
231//!  respect to an axis placement which is the axis of the symmetry. <br>
232  Standard_EXPORT     gp_Hypr Mirrored(const gp_Ax1& A1) const;
233  
234  Standard_EXPORT     void Mirror(const gp_Ax2& A2) ;
235  
236//!  Performs the symmetrical transformation of an hyperbola with <br>
237//!  respect to a plane. The axis placement A2 locates the plane <br>
238//!  of the symmetry (Location, XDirection, YDirection). <br>
239  Standard_EXPORT     gp_Hypr Mirrored(const gp_Ax2& A2) const;
240  
241        void Rotate(const gp_Ax1& A1,const Standard_Real Ang) ;
242  
243//!  Rotates an hyperbola. A1 is the axis of the rotation. <br>
244//!  Ang is the angular value of the rotation in radians. <br>
245        gp_Hypr Rotated(const gp_Ax1& A1,const Standard_Real Ang) const;
246  
247        void Scale(const gp_Pnt& P,const Standard_Real S) ;
248  
249//!  Scales an hyperbola. S is the scaling value. <br>
250        gp_Hypr Scaled(const gp_Pnt& P,const Standard_Real S) const;
251  
252        void Transform(const gp_Trsf& T) ;
253  
254//!  Transforms an hyperbola with the transformation T from <br>
255//!  class Trsf. <br>
256        gp_Hypr Transformed(const gp_Trsf& T) const;
257  
258        void Translate(const gp_Vec& V) ;
259  
260//!  Translates an hyperbola in the direction of the vector V. <br>
261//!  The magnitude of the translation is the vector's magnitude. <br>
262        gp_Hypr Translated(const gp_Vec& V) const;
263  
264        void Translate(const gp_Pnt& P1,const gp_Pnt& P2) ;
265  
266//!  Translates an hyperbola from the point P1 to the point P2. <br>
267        gp_Hypr Translated(const gp_Pnt& P1,const gp_Pnt& P2) const;
268    const gp_Ax2& _CSFDB_Getgp_Hyprpos() const { return pos; }
269    Standard_Real _CSFDB_Getgp_HyprmajorRadius() const { return majorRadius; }
270    void _CSFDB_Setgp_HyprmajorRadius(const Standard_Real p) { majorRadius = p; }
271    Standard_Real _CSFDB_Getgp_HyprminorRadius() const { return minorRadius; }
272    void _CSFDB_Setgp_HyprminorRadius(const Standard_Real p) { minorRadius = p; }
273
274
275
276protected:
277
278
279
280
281private: 
282
283
284gp_Ax2 pos;
285Standard_Real majorRadius;
286Standard_Real minorRadius;
287
288
289};
290
291
292#include <gp_Hypr.lxx>
293
294
295
296// other Inline functions and methods (like "C++: function call" methods)
297
298
299#endif