Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-06-05 08:33:57

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 class Geom_CartesianPoint;
0029 DEFINE_STANDARD_HANDLE(Geom_CartesianPoint, Geom_Point)
0030 
0031 //! Describes a point in 3D space. A
0032 //! Geom_CartesianPoint is defined by a gp_Pnt point,
0033 //! with its three Cartesian coordinates X, Y and Z.
0034 class Geom_CartesianPoint : public Geom_Point
0035 {
0036 
0037 public:
0038   //! Returns a transient copy of P.
0039   Standard_EXPORT Geom_CartesianPoint(const gp_Pnt& P);
0040 
0041   //! Constructs a point defined by its three Cartesian coordinates X, Y and Z.
0042   Standard_EXPORT Geom_CartesianPoint(const Standard_Real X,
0043                                       const Standard_Real Y,
0044                                       const Standard_Real Z);
0045 
0046   //! Assigns the coordinates X, Y and Z to this point.
0047   Standard_EXPORT void SetCoord(const Standard_Real X,
0048                                 const Standard_Real Y,
0049                                 const Standard_Real Z);
0050 
0051   //! Set <me> to P.X(), P.Y(), P.Z() coordinates.
0052   Standard_EXPORT void SetPnt(const gp_Pnt& P);
0053 
0054   //! Changes the X coordinate of me.
0055   Standard_EXPORT void SetX(const Standard_Real X);
0056 
0057   //! Changes the Y coordinate of me.
0058   Standard_EXPORT void SetY(const Standard_Real Y);
0059 
0060   //! Changes the Z coordinate of me.
0061   Standard_EXPORT void SetZ(const Standard_Real Z);
0062 
0063   //! Returns the coordinates of <me>.
0064   Standard_EXPORT void Coord(Standard_Real& X,
0065                              Standard_Real& Y,
0066                              Standard_Real& Z) const Standard_OVERRIDE;
0067 
0068   //! Returns a non transient cartesian point with
0069   //! the same coordinates as <me>.
0070   Standard_EXPORT gp_Pnt Pnt() const Standard_OVERRIDE;
0071 
0072   //! Returns the X coordinate of <me>.
0073   Standard_EXPORT Standard_Real X() const Standard_OVERRIDE;
0074 
0075   //! Returns the Y coordinate of <me>.
0076   Standard_EXPORT Standard_Real Y() const Standard_OVERRIDE;
0077 
0078   //! Returns the Z coordinate of <me>.
0079   Standard_EXPORT Standard_Real Z() const Standard_OVERRIDE;
0080 
0081   //! Applies the transformation T to this point.
0082   Standard_EXPORT void Transform(const gp_Trsf& T) Standard_OVERRIDE;
0083 
0084   //! Creates a new object which is a copy of this point.
0085   Standard_EXPORT Handle(Geom_Geometry) Copy() const Standard_OVERRIDE;
0086 
0087   DEFINE_STANDARD_RTTIEXT(Geom_CartesianPoint, Geom_Point)
0088 
0089 protected:
0090 private:
0091   gp_Pnt gpPnt;
0092 };
0093 
0094 #endif // _Geom_CartesianPoint_HeaderFile