AGX Dynamics 2.38.0.2
Loading...
Searching...
No Matches
BeamModel.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#pragma once
18
21
22#include <agxCollide/Geometry.h>
23
24namespace agxModel
25{
33
65 {
66 public:
74
79
90 agx::Real beamSegmentLength ) const;
91
107 void setMomentOfInertiaScale( agx::Vec3 momentOfInertiaScale );
108
113
119 void setPolarMomentOfInertiaScale( agx::Real polarMomentOfInertiaScale );
120
125
126 public:
136 virtual agx::Vec3 getMomentOfInertia() const final;
137
146 virtual agx::Vec3 calculateMomentOfInertia() const = 0;
147
152 virtual agx::Real getCrossSectionArea() const = 0;
153
158 virtual agx::Vec2 getMaxHeightWidth() const = 0;
159
169 virtual agxCollide::GeometryRef getSegmentGeometry( agx::Real segmentLength ) const = 0;
170
177 virtual agx::String validate() const = 0;
178
179
184 bool loadLibraryProperties(const agx::String& name);
185
186
191 static agx::StringVector getAvailableLibraryProperties();
192
193
194
195 public:
197
199
200 virtual void store( agxStream::OutputArchive& out ) const override;
201 virtual void restore( agxStream::InputArchive& in ) override;
202
203 protected:
204 BeamModel();
205 BeamModel( const BeamModel& ) = delete;
206 BeamModel( BeamModelProperties* properties );
207 virtual ~BeamModel();
208
210
211 private:
212 BeamModelPropertiesRef m_properties;
213 agx::Vec3 m_momentOfInertiaScale;
214 };
215
242 {
243 public:
255 agx::Real height,
256 agx::Real flangeThickness,
257 agx::Real webThickness,
258 BeamModelProperties* properties = nullptr );
259
264
269
274
279
284
285 public:
287
289
297 virtual agx::Vec3 calculateMomentOfInertia() const override;
298
302 virtual agx::Real getCrossSectionArea() const override;
303
307 virtual agx::Vec2 getMaxHeightWidth() const override;
308
312 virtual agxCollide::GeometryRef getSegmentGeometry( agx::Real segmentLength ) const override;
313
320 virtual agx::String validate() const override;
321
322 protected:
323 IBeam();
324 virtual ~IBeam();
325
327
328 private:
329 agx::Real m_width;
330 agx::Real m_height;
331 agx::Real m_flangeThickness;
332 agx::Real m_webThickness;
333 };
334
358 {
359 public:
368 RectangularBeam( agx::Real width, agx::Real height, BeamModelProperties* properties = nullptr );
369
374
379
380 public:
382
384
394 virtual agx::Vec3 calculateMomentOfInertia() const override;
395
399 virtual agx::Real getCrossSectionArea() const override;
400
404 virtual agx::Vec2 getMaxHeightWidth() const override;
405
410 virtual agxCollide::GeometryRef getSegmentGeometry( agx::Real segmentLength ) const override;
411
416 virtual agx::String validate() const override;
417
418 protected:
420 virtual ~RectangularBeam();
421
423
424 private:
425 agx::Real m_width;
426 agx::Real m_height;
427 };
428
446 {
447 public:
455 CircularBeam( agx::Real radius, BeamModelProperties* properties = nullptr );
456
461
462 public:
464
466
474 virtual agx::Vec3 calculateMomentOfInertia() const override;
475
479 virtual agx::Real getCrossSectionArea() const override;
480
484 virtual agx::Vec2 getMaxHeightWidth() const override;
485
489 virtual agxCollide::GeometryRef getSegmentGeometry( agx::Real segmentLength ) const override;
490
494 virtual agx::String validate() const override;
495
496 protected:
497 CircularBeam();
498 virtual ~CircularBeam();
499
501
502 private:
503 agx::Real m_radius;
504 };
505
530 {
531 public:
544 agx::Real height,
545 agx::Real thickness,
546 BeamModelProperties* properties = nullptr );
547
552
557
562
567
572
573 public:
575
577
585 virtual agx::Vec3 calculateMomentOfInertia() const override;
586
590 virtual agx::Real getCrossSectionArea() const override;
591
595 virtual agx::Vec2 getMaxHeightWidth() const override;
596
600 virtual agxCollide::GeometryRef getSegmentGeometry( agx::Real segmentLength ) const override;
601
607 virtual agx::String validate() const override;
608
609 protected:
611 virtual ~HollowRectangularBeam();
612
614
615 private:
616 agx::Real m_width;
617 agx::Real m_height;
618 agx::Real m_thickness;
619 };
620
625 {
626 public:
636 agx::Real thickness,
637 BeamModelProperties* properties = nullptr );
638
643
648
653
654 public:
656
658
666 virtual agx::Vec3 calculateMomentOfInertia() const override;
667
671 virtual agx::Real getCrossSectionArea() const override;
672
676 virtual agx::Vec2 getMaxHeightWidth() const override;
677
681 virtual agxCollide::GeometryRef getSegmentGeometry( agx::Real segmentLength ) const override;
682
687 virtual agx::String validate() const override;
688
689 protected:
691 virtual ~HollowCircularBeam();
692
694
695 private:
696 agx::Real m_radius;
697 agx::Real m_thickness;
698 };
699
705 {
706 public:
711 GenericBeamModel( BeamModelProperties* properties = nullptr );
712
713 public:
715
716
720 virtual agx::Vec3 calculateMomentOfInertia() const override;
721
726 virtual agx::Real getCrossSectionArea() const override;
727
732 virtual agx::Vec2 getMaxHeightWidth() const override;
733
738 virtual agxCollide::GeometryRef getSegmentGeometry( agx::Real segmentLength ) const override;
739
744 virtual agx::String validate() const override;
745
746 protected:
747 virtual ~GenericBeamModel();
748
750 };
751}
#define AGX_DECLARE_POINTER_TYPES(type)
Definition Referenced.h:254
#define AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE(T)
Use this in a pure abstract Serializable class to add the required methods Important: Use full namesp...
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
#define AGXMODEL_EXPORT
Bulk beam model properties present in all agxModel::BeamModel instances, which in turn propagates the...
Beam model interface requiring moment of inertia (area moment in x, y and polar moment in z),...
Definition BeamModel.h:65
agx::Real getPolarMomentOfInertiaScale() const
void setMomentOfInertiaScale(agx::Vec3 momentOfInertiaScale)
Scale of the calculated moment of inertia of this model, default scale (1, 1, 1).
void setPolarMomentOfInertiaScale(agx::Real polarMomentOfInertiaScale)
Assign new polar moment of inertia scale.
agx::Vec3 getMomentOfInertiaScale() const
BeamModelProperties * getProperties() const
virtual agx::Vec3 getMomentOfInertia() const final
Moment of inertia of the beam model, where: About x (up): Lateral About y (right): Vertical About z (...
BeamStiffnessDamping calculateStiffnessDamping(agx::UInt numBeamSegments, agx::Real beamSegmentLength) const
Calculates stiffness dependent on moment of inertia, cross section area, beam segment length and numb...
void setProperties(BeamModelProperties *properties)
Assign properties instance, a new default will be created if properties is nullptr.
Circular cross section beam model with a given radius.
Definition BeamModel.h:446
agx::Real getRadius() const
CircularBeam(agx::Real radius, BeamModelProperties *properties=nullptr)
Construct a circular cross section beam model with a given radius and optional beam model properties.
Generic beam model throwing exceptions for non-implemented virtual methods.
Definition BeamModel.h:705
GenericBeamModel(BeamModelProperties *properties=nullptr)
Construct given optional model properties.
Hollow circular cross section beam model with a given (outer) radius and thickness.
Definition BeamModel.h:625
agx::Real getRadius() const
agx::Real getThickness() const
agx::Real getHollowRadius() const
HollowCircularBeam(agx::Real radius, agx::Real thickness, BeamModelProperties *properties=nullptr)
Construct a hollow circular cross section beam model given (outer) radius and thickness.
Hollow rectangular cross section beam model with a given width, height and thickness.
Definition BeamModel.h:530
agx::Real getHollowHeight() const
HollowRectangularBeam(agx::Real width, agx::Real height, agx::Real thickness, BeamModelProperties *properties=nullptr)
Construct a hollow rectangular cross section beam model given width, height, thickness and optional b...
agx::Real getHollowWidth() const
agx::Real getThickness() const
I-beam model with a given width, height, flange thickness and web thickness.
Definition BeamModel.h:242
agx::Real getWebHeight() const
agx::Real getWidth() const
IBeam(agx::Real width, agx::Real height, agx::Real flangeThickness, agx::Real webThickness, BeamModelProperties *properties=nullptr)
Construct an I-beam model given width, height, flange thickness, web thickness and optional propertie...
agx::Real getWebThickness() const
agx::Real getFlangeThickness() const
agx::Real getHeight() const
Rectangular cross section beam model with a given width and height.
Definition BeamModel.h:358
RectangularBeam(agx::Real width, agx::Real height, BeamModelProperties *properties=nullptr)
Construct a rectangular beam model with a given width, height and optional beam model properties.
agx::Real getWidth() const
agx::Real getHeight() const
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
Base class providing referencing counted objects.
Definition Referenced.h:120
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition macros.h:97
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition macros.h:96
This namespace consists of a set of classes for handling geometric intersection tests including boole...
Contain classes for higher level modeling primitives, such as Tree, Terrain etc.
Definition FlowUnit.h:37
This namespace contain classes for streaming classes into archives, ASCII, binary for storage (serial...
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
Stiffness and damping data for constraints related to beam models.