Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:36

0001 // Created on: 1993-03-10
0002 // Created by: JCV
0003 // Copyright (c) 1993-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _Geom_CartesianPoint_HeaderFile
0018 #define _Geom_CartesianPoint_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 
0022 #include <gp_Pnt.hxx>
0023 #include <Geom_Point.hxx>
0024 #include <Standard_Real.hxx>
0025 class gp_Trsf;
0026 class Geom_Geometry;
0027 
0028 
0029 class Geom_CartesianPoint;
0030 DEFINE_STANDARD_HANDLE(Geom_CartesianPoint, Geom_Point)
0031 
0032 //! Describes a point in 3D space. A
0033 //! Geom_CartesianPoint is defined by a gp_Pnt point,
0034 //! with its three Cartesian coordinates X, Y and Z.
0035 class Geom_CartesianPoint : public Geom_Point
0036 {
0037 
0038 public:
0039 
0040   
0041   //! Returns a transient copy of P.
0042   Standard_EXPORT Geom_CartesianPoint(const gp_Pnt& P);
0043   
0044   //! Constructs a point defined by its three Cartesian coordinates X, Y and Z.
0045   Standard_EXPORT Geom_CartesianPoint(const Standard_Real X, const Standard_Real Y, const Standard_Real Z);
0046   
0047   //! Assigns the coordinates X, Y and Z to this point.
0048   Standard_EXPORT void SetCoord (const Standard_Real X, const Standard_Real Y, const Standard_Real Z);
0049   
0050   //! Set <me> to P.X(), P.Y(), P.Z() coordinates.
0051   Standard_EXPORT void SetPnt (const gp_Pnt& P);
0052   
0053   //! Changes the X coordinate of me.
0054   Standard_EXPORT void SetX (const Standard_Real X);
0055   
0056   //! Changes the Y coordinate of me.
0057   Standard_EXPORT void SetY (const Standard_Real Y);
0058   
0059   //! Changes the Z coordinate of me.
0060   Standard_EXPORT void SetZ (const Standard_Real Z);
0061   
0062   //! Returns the coordinates of <me>.
0063   Standard_EXPORT void Coord (Standard_Real& X, Standard_Real& Y, Standard_Real& Z) const Standard_OVERRIDE;
0064   
0065 
0066   //! Returns a non transient cartesian point with
0067   //! the same coordinates as <me>.
0068   Standard_EXPORT gp_Pnt Pnt() const Standard_OVERRIDE;
0069   
0070   //! Returns the X coordinate of <me>.
0071   Standard_EXPORT Standard_Real X() const Standard_OVERRIDE;
0072   
0073   //! Returns the Y coordinate of <me>.
0074   Standard_EXPORT Standard_Real Y() const Standard_OVERRIDE;
0075   
0076   //! Returns the Z coordinate of <me>.
0077   Standard_EXPORT Standard_Real Z() const Standard_OVERRIDE;
0078   
0079   //! Applies the transformation T to this point.
0080   Standard_EXPORT void Transform (const gp_Trsf& T) Standard_OVERRIDE;
0081   
0082   //! Creates a new object which is a copy of this point.
0083   Standard_EXPORT Handle(Geom_Geometry) Copy() const Standard_OVERRIDE;
0084 
0085 
0086 
0087 
0088   DEFINE_STANDARD_RTTIEXT(Geom_CartesianPoint,Geom_Point)
0089 
0090 protected:
0091 
0092 
0093 
0094 
0095 private:
0096 
0097 
0098   gp_Pnt gpPnt;
0099 
0100 
0101 };
0102 
0103 
0104 
0105 
0106 
0107 
0108 
0109 #endif // _Geom_CartesianPoint_HeaderFile