AGX Dynamics  2.35.0.1
GenericConstraintData.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2022. 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 
19 #include <agx/agx_vector_types.h>
20 #include <agx/Logger.h>
21 #include <agx/Range.h>
22 
23 namespace agx
24 {
30  {
31  public:
33 
34  public:
40 
46  void setViolation( agx::UInt row, agx::Real violation );
47 
51  const RealVector& getViolation() const;
52 
58  void setVelocity( agx::UInt row, agx::Real velocity );
59 
63  const agx::RealVector& getVelocity() const;
64 
72  void setBound( agx::UInt row, agx::RangeReal range );
73 
77  const BoundsVector& getBounds() const;
78 
84  void setIsImpacting( agx::Bool isImpacting );
85 
90 
94  void reset();
95 
96  private:
97  agx::RealVector m_violation;
98  agx::RealVector m_velocity;
99  BoundsVector m_bounds;
100  agx::Bool m_isImpacting;
101  };
102 
108  {
109  public:
115 
122  void setJacobian( agx::UInt row, const agx::Vec3& spatial, const agx::Vec3& rotational );
123 
127  const agx::Vec3Vector& getJacobian() const;
128 
132  void reset();
133 
134  private:
135  agx::Vec3Vector m_jacobian;
136  };
137 }
#define AGXPHYSICS_EXPORT
Constraint body data used with GenericElementaryConstraint containing the per body Jacobian data.
GenericConstraintBodyData(agx::UInt numRows)
Construct given number of rows in the elementary constraint.
void reset()
Resets all vectors to (0, 0, 0).
const agx::Vec3Vector & getJacobian() const
void setJacobian(agx::UInt row, const agx::Vec3 &spatial, const agx::Vec3 &rotational)
Assign Jacobian for given row as spatial and rotation vectors.
Constraint data used with GenericElementaryConstraint containing data such as; constraint violation,...
void setVelocity(agx::UInt row, agx::Real velocity)
Assign velocity for given row in the elementary constraint.
agx::Bool getIsImpacting() const
void setIsImpacting(agx::Bool isImpacting)
Assign impacting state of the elementary constraint.
void setViolation(agx::UInt row, agx::Real violation)
Assign violation for given row in the elementary constraint.
void setBound(agx::UInt row, agx::RangeReal range)
Assign bound for given row in the elementary constraint.
void reset()
Resets all values to default.
GenericConstraintData(agx::UInt numRows)
Construct given number of rows in the elementary constraint.
const RealVector & getViolation() const
const BoundsVector & getBounds() const
const agx::RealVector & getVelocity() const
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
bool Bool
Definition: Integer.h:48
uint32_t UInt
Definition: Integer.h:34
double Real
Definition: Real.h:42