AGX Dynamics 2.38.0.2
Loading...
Searching...
No Matches
GeometryAttributeAccessors.h
Go to the documentation of this file.
1/*
2Copyright 2007-2024. Algoryx Simulation AB.
3
4All AGX source code, intellectual property, documentation, sample code,
5tutorials, scene files and technical white papers, are copyrighted, proprietary
6and confidential material of Algoryx Simulation AB. You may not download, read,
7store, distribute, publish, copy or otherwise disseminate, use or expose this
8material unless having a written signed agreement with Algoryx Simulation AB, or having been
9advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10valid commercial license from Algoryx Simulation AB.
11
12Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13from using this software, unless otherwise stated in written agreements with
14Algoryx Simulation AB.
15*/
16
17#ifndef AGXFMI2_GEOMETRYATTRIBUTEACCESSORS_H
18#define AGXFMI2_GEOMETRYATTRIBUTEACCESSORS_H
19
22#include <agx/Solver.h>
23#include <agxData/Attribute.h>
24
25extern "C"
26{
27 #include <FMI2/fmi2Functions.h>
28}
29
30namespace agxCollide {
31 class Geometry;
32}
33
34namespace agxFMI2
35{
36 namespace Export
37 {
39 // INPUT VARIABLES
41
42 // Generic agx::Vec3 attribute
43 class AGXFMI_EXPORT GeometryVec3AttributeInputVariable : public InputVariable_Real
44 {
45 public:
47
48 public:
49 GeometryVec3AttributeInputVariable(agxCollide::Geometry *geometry, AttributeT *attribute, agx::UInt component, bool causalityName = false);
50 virtual fmi2Status set(agx::Real value) override;
51
52 void setDirectionalDerivativeInput(agx::MobilitySolver *solver, agx::Real value);
53
54 protected:
56
57 private:
58 using InputVariable_Real::get;
59 agx::Real get();
60
61 private:
63 agx::ref_ptr<AttributeT> m_attribute;
64 agx::UInt m_component;
65 };
66
67
68 // Surface Velocity
70 {
71 public:
72 GeometrySurfaceVelocityInputVariable(agxCollide::Geometry *geometry, agx::UInt component, bool causalityName = false) : GeometryVec3AttributeInputVariable(geometry, agx::Physics::GeometryModel::surfaceVelocityAttribute, component, causalityName) {}
73
74 protected:
76 };
77
79 // OUTPUT VARIABLES
81
82 // Generic agx::Vec3 attribute
83
84 class AGXFMI_EXPORT GeometryVec3AttributeOutputVariable : public OutputVariable_Real
85 {
86 public:
88
89 public:
90 GeometryVec3AttributeOutputVariable(agxCollide::Geometry* geometry, AttributeT *attribute, agx::UInt component, bool causalityName = false);
91 virtual fmi2Status get(agx::Real& value) override;
92 agx::Real getDirectionalDerivativeOutput(agx::MobilitySolver *solver, agx::MobilitySolver *referenceSolver);
93
94 protected:
96
97 private:
98 agx::Real get(agx::MobilitySolver *solver);
99
100 private:
101 agx::Physics::GeometryRef m_geometry;
102 agx::ref_ptr<AttributeT> m_attribute;
103 agx::UInt m_component;
104 };
105
107 {
108 public:
109 GeometrySurfaceVelocityOutputVariable(agxCollide::Geometry *geometry, agx::UInt component, bool causalityName = false) : GeometryVec3AttributeOutputVariable(geometry, agx::Physics::GeometryModel::surfaceVelocityAttribute, component, causalityName) {}
110
111 protected:
113 };
114 }
115}
116
117#endif /* AGXFMI2_GEOMETRYATTRIBUTEACCESSORS_H */
#define AGXFMI_EXPORT
The geometry representation used by the collision detection engine.
Definition Geometry.h:92
Only use as member allocated variable.
Definition Value.h:285
GeometrySurfaceVelocityInputVariable(agxCollide::Geometry *geometry, agx::UInt component, bool causalityName=false)
GeometrySurfaceVelocityOutputVariable(agxCollide::Geometry *geometry, agx::UInt component, bool causalityName=false)
void setDirectionalDerivativeInput(agx::MobilitySolver *solver, agx::Real value)
GeometryVec3AttributeInputVariable(agxCollide::Geometry *geometry, AttributeT *attribute, agx::UInt component, bool causalityName=false)
virtual fmi2Status set(agx::Real value) override
GeometryVec3AttributeOutputVariable(agxCollide::Geometry *geometry, AttributeT *attribute, agx::UInt component, bool causalityName=false)
agx::Real getDirectionalDerivativeOutput(agx::MobilitySolver *solver, agx::MobilitySolver *referenceSolver)
virtual fmi2Status get(agx::Real &value) override
Smart pointer for handling referenced counted objects.
Definition ref_ptr.h:30
This namespace consists of a set of classes for handling geometric intersection tests including boole...
This namespace contains functionality for using AGX together with version 2 of the Functional Mockup ...
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
uint64_t UInt
Definition Integer.h:27
double Real
Definition Real.h:42