AGX Dynamics 2.38.0.2
Loading...
Searching...
No Matches
GenericConstraintData.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
20
21namespace 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
129
133 void prepare( UInt numRows, const ConstraintRigidBodyContainer& bodies );
134
142
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}
#define AGXPHYSICS_EXPORT
Constraint body data used with GenericElementaryConstraint containing the per body Jacobian data.
GenericConstraintBodyData()
Construct given number of rows in the elementary constraint.
void addJacobian(UInt row, const Vec3 &spatial, const Vec3 &rotational)
Add Jacobian for given row as spatial and rotation vectors.
const Vec3Vector & getJacobian() const
void reset(UInt numRows)
Resets all vectors to (0, 0, 0).
void setJacobian(UInt row, const Vec3 &spatial, const Vec3 &rotational)
Assign Jacobian for given row as spatial and rotation vectors.
Constraint data used with GenericElementaryConstraint containing data such as; constraint violation,...
void prepare(UInt numRows, const ConstraintRigidBodyContainer &bodies)
Resets all values to default.
const RealVector & getViolation() const
GenericConstraintBodyData * getBodyData(const RigidBody *rb) const
Access body related data, such as the Jacobian, for a given body rb.
GenericConstraintBodyData * getBodyDataAt(size_t index) const
Access body related data, such as the Jacobian, for a given body index index.
void setViolation(UInt row, Real violation)
Assign violation for given row in the elementary constraint.
void setVelocity(UInt row, Real velocity)
Assign velocity for given row in the elementary constraint.
const BoundsVector & getBounds() const
void setIsImpacting(Bool isImpacting)
Assign impacting state of the elementary constraint.
void setBound(UInt row, RangeReal range)
Assign bound for given row in the elementary constraint.
GenericConstraintData()
Construct given number of rows in the elementary constraint.
const RealVector & getVelocity() const
The rigid body class, combining a geometric model and a frame of reference.
Definition RigidBody.h:52
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
bool Bool
Definition Integer.h:40
uint64_t UInt
Definition Integer.h:27
double Real
Definition Real.h:42