AGX Dynamics 2.42.1.1
Loading...
Searching...
No Matches
DipoleMagneticField.h
Go to the documentation of this file.
1/*
2Copyright 2007-2025. 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#pragma once
18
19namespace agxSensor
20{
22
30 {
31 public:
38 DipoleMagneticField( const agx::Vec3& magneticMoment =
39 agx::Vec3( 2.69e19, -7.65e22, 1.5e22 ),
40 const agx::Vec3& center =
41 agx::Vec3( -1.9e-10, 20.79e3, -6.369e6 ) );
42
47 void setMagneticMoment( const agx::Vec3& magneticMoment );
48
53
58 void setCenter( const agx::Vec3& center );
59
63 const agx::Vec3& getCenter() const;
64
71 virtual agx::Vec3 calculateMagneticField( const agx::Vec3& position ) const override;
72
74
75 public:
77
79
80 private:
81 agx::Vec3 m_magneticMoment;
82 agx::Vec3 m_center;
83 };
84}
85
86
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:254
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
Definition: Serializable.h:207
#define AGXSENSOR_EXPORT
A magnetic field as produced by a magnetic dipole.
virtual agx::Vec3 calculateMagneticField(const agx::Vec3 &position) const override
Calculates and returns the magnetic field at the given position in world coordinates.
const agx::Vec3 & getCenter() const
void setMagneticMoment(const agx::Vec3 &magneticMoment)
Set the dipole's magnetic moment.
void setCenter(const agx::Vec3 &center)
Set the center of the dipole.
const agx::Vec3 & getMagneticMoment() const
DipoleMagneticField(const agx::Vec3 &magneticMoment=agx::Vec3(2.69e19, -7.65e22, 1.5e22), const agx::Vec3 &center=agx::Vec3(-1.9e-10, 20.79e3, -6.369e6))
Constructs a magnetic dipole positioned at the given center and using the specified magneticMoment.
Base type for the specification of the magnetic field in a sensor environment.
Definition: MagneticField.h:33
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition: macros.h:89
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition: macros.h:88
The agxSensor namespace contains components to model real-time sensors connected to the physics of AG...
The agx namespace contains the dynamics/math part of the AGX Dynamics API.