FEDEM Model Database  R8.0
Source code of the FEDEM model database
FmRefPlane.H
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: 2023 SAP SE
2 //
3 // SPDX-License-Identifier: Apache-2.0
4 //
5 // This file is part of FEDEM - https://openfedem.org
7 
8 #ifndef FM_REF_PLANE_H
9 #define FM_REF_PLANE_H
10 
12 #include "vpmDB/FmColor.H"
13 
14 class FmTriad;
15 
16 
18 {
20 
21 public:
22  FmRefPlane();
23 
24  static bool readAndConnect(std::istream& is, std::ostream& os = std::cout);
25  virtual std::ostream& writeFMF(std::ostream& os = std::cout);
26  virtual bool clone(FmBase* obj, int depth);
27 
28  virtual bool isTranslatable() const { return true; }
29  virtual char isRotatable() const { return true; }
30 
31  const FmColor& getRGBColor() const { return myRGBColor.getValue(); }
32  bool setRGBColor(const FmColor& col);
33 
34  double getTransparency() const { return myTransparency.getValue(); }
35  bool setTransparency(double var);
36 
37  double getHeight() const { return myHeight.getValue(); }
38  double getWidth() const { return myWidth.getValue(); }
39 
40  void setHeight(double height);
41  void setWidth(double width);
42 
43  bool attach(FmBase* attachObject);
44 
45  virtual const char* getUITypeName() const { return "Reference plane"; }
46  virtual std::string getLinkIDString(bool) const { return "Gnd (Ref plane)"; }
47 
48 protected:
49  virtual ~FmRefPlane();
50 
51  virtual bool cloneLocal(FmBase* obj, int depth);
52 
53  bool attachTriad(FmTriad* attachTr, bool updateViz = true);
54 
55 private:
60 };
61 
62 #endif
const ValueT & getValue() const
Returns a const reference to myData.
Definition: FFaField.H:56
Base parent class for the model data structure entries.
Definition: FmBase.H:37
Representation of a RGB color by floats in range [0.0,1.0].
Definition: FmColor.H:24
Definition: FmIsPositionedBase.H:31
Definition: FmRefPlane.H:18
FFaField< double > myHeight
Definition: FmRefPlane.H:57
void setWidth(double width)
Definition: FmRefPlane.C:78
Fmd_DB_HEADER_INIT()
const FmColor & getRGBColor() const
Definition: FmRefPlane.H:31
FFaField< double > myWidth
Definition: FmRefPlane.H:56
double getTransparency() const
Definition: FmRefPlane.H:34
bool setTransparency(double var)
Definition: FmRefPlane.C:57
FmRefPlane()
Definition: FmRefPlane.C:24
virtual bool isTranslatable() const
Definition: FmRefPlane.H:28
void setHeight(double height)
Definition: FmRefPlane.C:69
bool setRGBColor(const FmColor &col)
Definition: FmRefPlane.C:45
virtual std::string getLinkIDString(bool) const
Definition: FmRefPlane.H:46
double getHeight() const
Definition: FmRefPlane.H:37
virtual bool cloneLocal(FmBase *obj, int depth)
Clones the data fields of *obj into *this.
Definition: FmRefPlane.C:118
bool attach(FmBase *attachObject)
Definition: FmRefPlane.C:128
virtual ~FmRefPlane()
Definition: FmRefPlane.C:39
virtual const char * getUITypeName() const
Returns the type name of this object for use in the GUI.
Definition: FmRefPlane.H:45
virtual char isRotatable() const
Definition: FmRefPlane.H:29
FFaField< FmColor > myRGBColor
Definition: FmRefPlane.H:58
static bool readAndConnect(std::istream &is, std::ostream &os=std::cout)
Definition: FmRefPlane.C:96
FFaField< double > myTransparency
Definition: FmRefPlane.H:59
double getWidth() const
Definition: FmRefPlane.H:38
virtual std::ostream & writeFMF(std::ostream &os=std::cout)
Writes out this object in the model database file format.
Definition: FmRefPlane.C:87
bool attachTriad(FmTriad *attachTr, bool updateViz=true)
Definition: FmRefPlane.C:228
virtual bool clone(FmBase *, int)
Copies the fields of another object into *this.
Definition: FmBase.H:109
Definition: FmTriad.H:48