FEDEM Model Database  R8.0
Source code of the FEDEM model database
FmSticker.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_STICKER_H
9 #define FM_STICKER_H
10 
11 #include "vpmDB/FmIsRenderedBase.H"
13 
14 
16 {
18 
19 public:
20  FmSticker(const FaVec3& pos = FaVec3());
21 
22  void placeAtPoint(const FaVec3& point) { myPosition.setValue(point); }
23  const FaVec3& getPoint() const { return myPosition.getValue(); }
24 
26 
27  bool connect(FmBase* parent);
29  virtual bool disconnect();
30 
31  static bool readAndConnect(std::istream& is, std::ostream& os = std::cout);
32  virtual std::ostream& writeFMF(std::ostream& os = std::cout);
33  virtual bool clone(FmBase* obj, int depth);
34  virtual const char* getUITypeName() const { return "Sticker"; }
35 
36 #ifdef USE_INVENTOR
37  virtual FaDOF getObjDegOfFreedom() const;
38 #endif
39 
40 protected:
41  virtual ~FmSticker();
42 
43  virtual bool cloneLocal(FmBase* obj, int depth);
44 
47 
49 };
50 
51 #endif
bool setValue(const ValueT &newData, bool checkChanged=true)
Assigns a new value to the field.
Definition: FFaField.H:66
const ValueT & getValue() const
Returns a const reference to myData.
Definition: FFaField.H:56
Type * getPointer() const
Returns the type-casted pointer this reference points to.
Definition: FFaReference.H:234
Definition: FmIsRenderedBase.H:15
Class for point vectors in 3D space.
Definition: FFaVec3.H:40
Base parent class for the model data structure entries.
Definition: FmBase.H:37
virtual bool connect()
Inserts this object into the model database.
Definition: FmBase.H:92
Definition: FmIsPositionedBase.H:31
Definition: FmIsRenderedBase.H:23
virtual FaDOF getObjDegOfFreedom() const
Definition: FmIsRenderedBase.H:46
virtual bool clone(FmBase *, int)
Copies the fields of another object into *this.
Definition: FmBase.H:109
Definition: FmSticker.H:16
Fmd_DB_HEADER_INIT()
FmSticker(const FaVec3 &pos=FaVec3())
Definition: FmSticker.C:26
FmIsPositionedBase * getStuckObject() const
Definition: FmSticker.H:25
FFaReference< FmIsPositionedBase > myOwner
Definition: FmSticker.H:45
virtual bool cloneLocal(FmBase *obj, int depth)
Clones the data fields of *obj into *this.
Definition: FmSticker.C:112
virtual const char * getUITypeName() const
Returns the type name of this object for use in the GUI.
Definition: FmSticker.H:34
virtual std::ostream & writeFMF(std::ostream &os=std::cout)
Writes out this object in the model database file format.
Definition: FmSticker.C:80
virtual bool disconnect()
Removes this object from the model database.
Definition: FmSticker.C:65
static bool readAndConnect(std::istream &is, std::ostream &os=std::cout)
Definition: FmSticker.C:89
FFaField< FFaReferenceBase * > myOwnerField
Definition: FmSticker.H:46
const FaVec3 & getPoint() const
Definition: FmSticker.H:23
FFaField< FaVec3 > myPosition
Definition: FmSticker.H:48
void placeAtPoint(const FaVec3 &point)
Definition: FmSticker.H:22
virtual ~FmSticker()
Definition: FmSticker.C:42