SHAPER  9.13.0
GeomDataAPI_Dir.h
1 // Copyright (C) 2014-2024 CEA, EDF
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19 
20 #ifndef GeomDataAPI_Dir_H_
21 #define GeomDataAPI_Dir_H_
22 
23 #include "GeomDataAPI.h"
24 #include <ModelAPI_Attribute.h>
25 
26 class GeomAPI_Dir;
27 class GeomAPI_XYZ;
28 
35 {
36  public:
38  virtual void setValue(const double theX, const double theY, const double theZ) = 0;
40  virtual void setValue(const std::shared_ptr<GeomAPI_Dir>& theDir) = 0;
41 
43  virtual double x() const = 0;
45  virtual double y() const = 0;
47  virtual double z() const = 0;
49  virtual std::shared_ptr<GeomAPI_Dir> dir() = 0;
51  virtual std::shared_ptr<GeomAPI_XYZ> xyz() = 0;
52 
54  static std::string typeId()
55  {
56  return std::string("Dir");
57  }
58 
60  GEOMDATAAPI_EXPORT virtual std::string attributeType();
61 
62  protected:
64  GEOMDATAAPI_EXPORT GeomDataAPI_Dir();
65  GEOMDATAAPI_EXPORT virtual ~GeomDataAPI_Dir();
66 };
67 
69 typedef std::shared_ptr<GeomDataAPI_Dir> AttributeDirPtr;
70 
71 #endif
3D direction defined by three normalized coordinates
Definition: GeomAPI_Dir.h:34
3 coordinates: they may represent vector or point or something else
Definition: GeomAPI_XYZ.h:32
Attribute that contains 3D direction coordinates.
Definition: GeomDataAPI_Dir.h:35
GeomDataAPI_Dir()
Objects are created for features automatically.
Definition: GeomDataAPI_Dir.cpp:27
virtual std::string attributeType()
Returns the type of this class of attributes, not static method.
Definition: GeomDataAPI_Dir.cpp:22
virtual std::shared_ptr< GeomAPI_Dir > dir()=0
Returns the direction of this attribute.
static std::string typeId()
Returns the type of this class of attributes.
Definition: GeomDataAPI_Dir.h:54
virtual double z() const =0
Returns the Z double value.
virtual double x() const =0
Returns the X double value.
virtual void setValue(const std::shared_ptr< GeomAPI_Dir > &theDir)=0
Defines the direction.
virtual void setValue(const double theX, const double theY, const double theZ)=0
Defines the double value.
virtual std::shared_ptr< GeomAPI_XYZ > xyz()=0
Returns the coordinates of this attribute.
virtual double y() const =0
Returns the Y double value.
Generic attribute of the Object.
Definition: ModelAPI_Attribute.h:34