|
||||
File indexing completed on 2025-01-18 10:03:33
0001 // Created on: 1993-03-24 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 _Geom2d_Vector_HeaderFile 0018 #define _Geom2d_Vector_HeaderFile 0019 0020 #include <Standard.hxx> 0021 0022 #include <gp_Vec2d.hxx> 0023 #include <Geom2d_Geometry.hxx> 0024 #include <Standard_Real.hxx> 0025 0026 0027 class Geom2d_Vector; 0028 DEFINE_STANDARD_HANDLE(Geom2d_Vector, Geom2d_Geometry) 0029 0030 //! The abstract class Vector describes the common 0031 //! behavior of vectors in 2D space. 0032 //! The Geom2d package provides two concrete 0033 //! classes of vectors: Geom2d_Direction (unit vector) 0034 //! and Geom2d_VectorWithMagnitude. 0035 class Geom2d_Vector : public Geom2d_Geometry 0036 { 0037 0038 public: 0039 0040 0041 //! Reverses the vector <me>. 0042 Standard_EXPORT void Reverse(); 0043 0044 //! Returns a copy of <me> reversed. 0045 Standard_NODISCARD Standard_EXPORT Handle(Geom2d_Vector) Reversed() const; 0046 0047 //! Computes the angular value, in radians, between this 0048 //! vector and vector Other. The result is a value 0049 //! between -Pi and Pi. The orientation is from this 0050 //! vector to vector Other. 0051 //! Raises VectorWithNullMagnitude if one of the two vectors is a vector with 0052 //! null magnitude because the angular value is indefinite. 0053 Standard_EXPORT Standard_Real Angle (const Handle(Geom2d_Vector)& Other) const; 0054 0055 //! Returns the coordinates of <me>. 0056 Standard_EXPORT void Coord (Standard_Real& X, Standard_Real& Y) const; 0057 0058 //! Returns the Magnitude of <me>. 0059 Standard_EXPORT virtual Standard_Real Magnitude() const = 0; 0060 0061 //! Returns the square magnitude of <me>. 0062 Standard_EXPORT virtual Standard_Real SquareMagnitude() const = 0; 0063 0064 //! Returns the X coordinate of <me>. 0065 Standard_EXPORT Standard_Real X() const; 0066 0067 //! Returns the Y coordinate of <me>. 0068 Standard_EXPORT Standard_Real Y() const; 0069 0070 //! Cross product of <me> with the vector <Other>. 0071 Standard_EXPORT virtual Standard_Real Crossed (const Handle(Geom2d_Vector)& Other) const = 0; 0072 0073 //! Returns the scalar product of 2 Vectors. 0074 Standard_EXPORT Standard_Real Dot (const Handle(Geom2d_Vector)& Other) const; 0075 0076 //! Returns a non persistent copy of <me>. 0077 Standard_EXPORT gp_Vec2d Vec2d() const; 0078 0079 0080 0081 0082 DEFINE_STANDARD_RTTIEXT(Geom2d_Vector,Geom2d_Geometry) 0083 0084 protected: 0085 0086 0087 gp_Vec2d gpVec2d; 0088 0089 0090 private: 0091 0092 0093 0094 0095 }; 0096 0097 0098 0099 0100 0101 0102 0103 #endif // _Geom2d_Vector_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |