AGX Dynamics  2.38.0.2
GenericConstraintData.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2024. Algoryx Simulation AB.
3 
4 All AGX source code, intellectual property, documentation, sample code,
5 tutorials, scene files and technical white papers, are copyrighted, proprietary
6 and confidential material of Algoryx Simulation AB. You may not download, read,
7 store, distribute, publish, copy or otherwise disseminate, use or expose this
8 material unless having a written signed agreement with Algoryx Simulation AB, or having been
9 advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10 valid commercial license from Algoryx Simulation AB.
11 
12 Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13 from using this software, unless otherwise stated in written agreements with
14 Algoryx Simulation AB.
15 */
16 
17 #pragma once
18 
20 
21 namespace agx
22 {
28  {
29  public:
34 
41  void setJacobian( UInt row, const Vec3& spatial, const Vec3& rotational );
42 
49  void addJacobian( UInt row, const Vec3& spatial, const Vec3& rotational );
50 
54  const Vec3Vector& getJacobian() const;
55 
59  void reset( UInt numRows );
60 
61  private:
62  Vec3Vector m_jacobian;
63  };
64 
70  {
71  public:
73 
74  public:
79 
85  void setViolation( UInt row, Real violation );
86 
90  const RealVector& getViolation() const;
91 
97  void setVelocity( UInt row, Real velocity );
98 
102  const RealVector& getVelocity() const;
103 
111  void setBound( UInt row, RangeReal range );
112 
116  const BoundsVector& getBounds() const;
117 
123  void setIsImpacting( Bool isImpacting );
124 
128  Bool getIsImpacting() const;
129 
133  void prepare( UInt numRows, const ConstraintRigidBodyContainer& bodies );
134 
141  GenericConstraintBodyData* getBodyData( const RigidBody* rb ) const;
142 
160  GenericConstraintBodyData* getBodyDataAt( size_t index ) const;
161 
162  private:
164 
165  private:
166  const ConstraintRigidBodyContainer* m_bodies;
167  RealVector m_violation;
168  RealVector m_velocity;
169  BoundsVector m_bounds;
170  Bool m_isImpacting;
171  BodyDataContainer m_bodyData;
172  };
173 }
agx::UInt
uint64_t UInt
Definition: Integer.h:27
agx::Real
double Real
Definition: Real.h:42
agx::Vector< RigidBody * >
agx::RigidBody
The rigid body class, combining a geometric model and a frame of reference.
Definition: RigidBody.h:51
ConstraintImplementation.h
agx::VectorPOD< Vec3 >
agx
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
Definition: AddedMassInteraction.h:22
AGXPHYSICS_EXPORT
#define AGXPHYSICS_EXPORT
agx::GenericConstraintBodyData
Constraint body data used with GenericElementaryConstraint containing the per body Jacobian data.
Definition: GenericConstraintData.h:27
agx::Bool
bool Bool
Definition: Integer.h:40
agx::Range< Real >
agx::Vec3T< Real >
agx::GenericConstraintData
Constraint data used with GenericElementaryConstraint containing data such as; constraint violation,...
Definition: GenericConstraintData.h:69