FEDEM Model Database  R8.0
Source code of the FEDEM model database
FmAssemblyBase.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_ASSEMBLY_BASE_H
9 #define FM_ASSEMBLY_BASE_H
10 
11 #include "vpmDB/FmSubAssembly.H"
14 
15 
17 {
18 protected:
19  FmAssemblyBase(bool isDummy = false);
20  virtual ~FmAssemblyBase() {}
21 
22 public:
24 
25  void setLocalCS(const FaMat34& cs, bool updateLoc = true);
26  void setGlobalCS(const FaMat34& cs, bool updateLoc = true);
27 
28  FaMat34 toGlobal(const FaMat34& m) const;
29  FaMat34 toLocal(const FaMat34& m) const;
30  FaMat33 toGlobal(const FaMat33& m) const;
31  FaMat33 toLocal(const FaMat33& m) const;
32  FaVec3 toGlobal(const FaVec3& v, bool directionOnly = false) const;
33  FaVec3 toLocal(const FaVec3& v, bool directionOnly = false) const;
34 
35  void setLocation(const FFa3DLocation& loc);
36  const FFa3DLocation& getLocation() const { return myLocation.getValue(); }
37 
38  virtual void updateLocation(char updateWhat = 'A');
39  virtual double getMass(FaVec3& CoG, bool includeSubAss = true) const;
40  virtual FmBase* duplicate() const;
42 
43  bool isMovable() const;
44 
45  double getTotalLength() const;
46  double getTotalMass(double* pLength = NULL) const;
47  FaVec3 getGlobalCoG(bool includeSubAss = true) const;
48  FaVec3 getExtents() const;
49 
50 protected:
53 };
54 
55 #endif
Representation of object locations in 3D space.
Position matrices in 3D space.
Base class for all sub-assembly objects.
Class representing an object location in 3D space. This class is used to hold data describing the loc...
Definition: FFa3DLocation.H:34
const ValueT & getValue() const
Returns a const reference to myData.
Definition: FFaField.H:56
Class for point transformations in 3D space.
Definition: FFaMat33.H:27
Class for positions in 3D space.
Definition: FFaMat34.H:32
Class for point vectors in 3D space.
Definition: FFaVec3.H:40
Definition: FmAssemblyBase.H:17
void setGlobalCS(const FaMat34 &cs, bool updateLoc=true)
Definition: FmAssemblyBase.C:50
FaMat34 toLocal(const FaMat34 &m) const
Definition: FmAssemblyBase.C:70
FFaField< FaMat34 > myCS
Definition: FmAssemblyBase.H:51
FmAssemblyBase(bool isDummy=false)
Definition: FmAssemblyBase.C:16
bool isMovable() const
Definition: FmAssemblyBase.C:176
FaMat34 toGlobal(const FaMat34 &m) const
Definition: FmAssemblyBase.C:60
virtual ~FmAssemblyBase()
Definition: FmAssemblyBase.H:20
virtual FmBase * duplicate() const
Returns a connected copy of this object.
Definition: FmAssemblyBase.C:330
FmAssemblyBase * getPositionedParent() const
Definition: FmAssemblyBase.C:25
FaVec3 getGlobalCoG(bool includeSubAss=true) const
Definition: FmAssemblyBase.C:267
void setLocation(const FFa3DLocation &loc)
Definition: FmAssemblyBase.C:136
void setLocalCS(const FaMat34 &cs, bool updateLoc=true)
Definition: FmAssemblyBase.C:31
FaVec3 getExtents() const
Definition: FmAssemblyBase.C:307
double getTotalMass(double *pLength=NULL) const
Definition: FmAssemblyBase.C:228
const FFa3DLocation & getLocation() const
Definition: FmAssemblyBase.H:36
virtual double getMass(FaVec3 &CoG, bool includeSubAss=true) const
Returns the total mass of this sub-assembly.
Definition: FmAssemblyBase.C:275
double getTotalLength() const
Definition: FmAssemblyBase.C:214
FFaField< FFa3DLocation > myLocation
Definition: FmAssemblyBase.H:52
virtual void updateLocation(char updateWhat='A')
Updates the location data for positioned sub-assemblies.
Definition: FmAssemblyBase.C:145
Base parent class for the model data structure entries.
Definition: FmBase.H:37
Base class for all sub-assembly objects.
Definition: FmSubAssembly.H:28
FmBase * duplicate() const override
Returns a connected copy of this object.
Definition: FmSubAssembly.H:64