step/stepcore
rigidbody.h
Go to the documentation of this file.
void applyForce(const Vector2d &force, const Vector2d &position)
Apply force (and torque) to the body at given position (in World coordinates)
Definition: rigidbody.cc:170
void setVariables(const double *position, const double *velocity, const double *positionVariance, const double *velocityVariance)
Set positions, velocities and (possibly) its variances using values in arrays and also reset accelera...
Definition: rigidbody.cc:250
ObjectErrors * createObjectErrors()
Definition: rigidbody.h:265
Vector2d velocityWorld(const Vector2d &worldPoint) const
Get velocity of given (world) point on the body.
Definition: rigidbody.cc:189
Offset of body angle in variables array.
Definition: rigidbody.h:151
Offset of body position in variables array.
Definition: rigidbody.h:150
Definition: rigidbody.h:325
void setPositionVariance(const Vector2d &positionVariance)
Set position variance.
Definition: rigidbody.h:54
void setMomentumVariance(const Vector2d &momentumVariance)
Set momentum variance (will modify velocity variance)
Definition: rigidbody.cc:123
void setAngularMomentumVariance(double angularMomentumVariance)
Set angular momentum variance (will modify angularVelocity variance)
Definition: rigidbody.cc:135
const Vector2d & position() const
Get position of the center of mass of the body.
Definition: rigidbody.h:160
void applyForceVariance(const Vector2d &force, const Vector2d &position, const Vector2d &forceVariance, const Vector2d &positionVariance)
Apply force (and torque) variance to the body at given position (in World coordinates) ...
Definition: rigidbody.cc:177
Vector2d pointWorldToLocal(const Vector2d &p) const
Translate world coordinates to local coordinates on body.
Definition: rigidbody.cc:209
Vector2d vectorLocalToWorld(const Vector2d &v) const
Translate local vector on body to world vector.
Definition: rigidbody.cc:217
Item, Body, Force and Tool interfaces, World class.
void setAngularVelocity(double angularVelocity)
Set angular velocity of the body.
Definition: rigidbody.h:181
double angularAccelerationVariance() const
Get angularAcceleration variance.
Definition: rigidbody.cc:111
void resetForce(bool resetVariance)
Reset force accomulator and (possibly) its variance to zero.
Definition: rigidbody.cc:302
void setAngularMomentum(double angularMomentum)
Set angular momentum of the body (will modify only angularVelocity)
Definition: rigidbody.h:225
Disk(Vector2d position=Vector2d::Zero(), double angle=0, Vector2d velocity=Vector2d::Zero(), double angularVelocity=0, double mass=1, double inertia=1, double radius=0.5)
Constructs Disk.
Definition: rigidbody.h:290
Vector2d pointLocalToWorld(const Vector2d &p) const
Translate local coordinates on body to world coordinates.
Definition: rigidbody.cc:201
void getVariables(double *position, double *velocity, double *positionVariance, double *velocityVariance)
Copy positions, velocities and (possibly) its variances to arrays.
Definition: rigidbody.cc:233
void addForce(const double *force, const double *forceVariance)
Add force and (possibly) its variance to force accomulator.
Definition: rigidbody.cc:289
Vector2d accelerationVariance() const
Get acceleration variance.
double _angularVelocityVariance
Definition: rigidbody.h:130
const Vector2d & velocity() const
Get velocity of the center of mass of the body.
Definition: rigidbody.h:170
Vector2d velocityLocal(const Vector2d &localPoint) const
Get velocity of given (local) point on the body.
Definition: rigidbody.cc:195
void getAccelerations(double *acceleration, double *accelerationVariance)
Copy acceleration (forces left-multiplied by inverse mass) and (possibly) its variances to arrays...
Definition: rigidbody.cc:273
Vector2d acceleration() const
Get acceleration of the center of mass of the body.
Definition: rigidbody.h:184
void setMomentum(const Vector2d &momentum)
Set momentum of the body (will modify only velocity)
Definition: rigidbody.h:220
void setKineticEnergyVariance(double kineticEnergyVariance)
Set kinetic energy variance (will modify velocity variance)
Definition: rigidbody.cc:150
Object, MetaObject and MetaProperty classes.
void setVelocityVariance(const Vector2d &velocityVariance)
Set velocity variance.
Definition: rigidbody.h:65
void setAngularVelocityVariance(double angularVelocityVariance)
Set angularVelocity variance.
Definition: rigidbody.h:71
RigidBody(Vector2d position=Vector2d::Zero(), double angle=0, Vector2d velocity=Vector2d::Zero(), double angularVelocity=0, double mass=1, double inertia=1)
Constructs RigidBody.
Definition: rigidbody.cc:163
double angularAcceleration() const
Get angular acceleration of the body.
Definition: rigidbody.h:187
BasePolygon(Vector2d position=Vector2d::Zero(), double angle=0, Vector2d velocity=Vector2d::Zero(), double angularVelocity=0, double mass=1, double inertia=1)
Constructs BasePolygon.
Definition: rigidbody.h:313
Eigen::DynamicSparseMatrix< double, Eigen::RowMajor > DynSparseRowMatrix
Definition: types.h:38
std::vector< Vector2d, Eigen::aligned_allocator< Vector2d > > Vector2dList
Definition: types.h:117
int variablesCount()
Get count of dynamic variables (not including velocities)
Definition: rigidbody.h:250
void setKineticEnergy(double kineticEnergy)
Set kinetic energy of the body (will modify only velocity and (possibly) angularVelocity) ...
Definition: rigidbody.cc:329
void applyTorqueVariance(double torqueVariance)
Apply torque (but no force) variancee to the body.
Definition: rigidbody.h:96
Vector2d vectorWorldToLocal(const Vector2d &v) const
Translate world vector to local vector on body.
Definition: rigidbody.cc:225
void setPosition(const Vector2d &position)
Set position of the center of mass of the body.
Definition: rigidbody.h:162
Box(Vector2d position=Vector2d::Zero(), double angle=0, Vector2d velocity=Vector2d::Zero(), double angularVelocity=0, double mass=1, double inertia=1, Vector2d size=Vector2d(1, 1))
Constructs Box.
Definition: rigidbody.cc:341
void getInverseMass(VectorXd *inverseMass, DynSparseRowMatrix *variance, int offset)
Get inverse mass and (possibly) its variance matrixes.
Definition: rigidbody.cc:313
RigidBodyErrors * rigidBodyErrors()
Get (and possibly create) RigidBodyErrors object.
Definition: rigidbody.h:261
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:16:43 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:16:43 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.