step/stepcore
#include <softbody.h>
Protected Attributes | |
QString | _borderParticleNames |
SoftBodyParticleList | _borderParticles |
bool | _showInternalItems |
Protected Attributes inherited from StepCore::Object | |
QString | _name |
Additional Inherited Members | |
Protected Member Functions inherited from StepCore::Item | |
virtual ObjectErrors * | createObjectErrors () |
Detailed Description
SoftBody - a group of several SoftBodyParticle and SoftBodySprings.
Definition at line 65 of file softbody.h.
Constructor & Destructor Documentation
|
inline |
Constructs a SoftBody.
Definition at line 71 of file softbody.h.
Member Function Documentation
|
inline |
Get acceleration of the center of mass.
Definition at line 110 of file softbody.h.
void StepCore::SoftBody::addItems | ( | const ItemList & | items | ) |
Adds all items to ItemGroup.
Definition at line 149 of file softbody.cc.
|
inline |
Get angular acceleration of the body.
Definition at line 113 of file softbody.h.
double StepCore::SoftBody::angularMomentum | ( | ) | const |
Get the angular momentum of the body.
Definition at line 239 of file softbody.cc.
double StepCore::SoftBody::angularVelocity | ( | ) | const |
Get the angular velicity of the body.
Definition at line 256 of file softbody.cc.
QString StepCore::SoftBody::borderParticleNames | ( | ) | const |
Definition at line 327 of file softbody.cc.
const SoftBodyParticleList & StepCore::SoftBody::borderParticles | ( | ) |
Get ordered list of particles on the border of the body.
Definition at line 311 of file softbody.cc.
ItemList StepCore::SoftBody::createSoftBodyItems | ( | const Vector2d & | position, |
const Vector2d & | size, | ||
const Vector2i & | split, | ||
double | bodyMass, | ||
double | youngModulus, | ||
double | bodyDamping | ||
) |
Creates paricles and springs inside soft body.
- Parameters
-
position Position of the center of the body size Size of the edge of the body split Split count of the edge of the body bodyMass Total mass of the body youngModulus Young's modulus of the body bodyDamping Damping of the body
- Returns
- List of particles and springs
Vector2d StepCore::SoftBody::force | ( | ) | const |
Get the force acting on the body.
Definition at line 282 of file softbody.cc.
double StepCore::SoftBody::inertia | ( | ) | const |
Get the inrtia of the body.
Definition at line 224 of file softbody.cc.
double StepCore::SoftBody::mass | ( | ) | const |
Get total body mass.
Definition at line 157 of file softbody.cc.
Vector2d StepCore::SoftBody::position | ( | ) | const |
Get the position of the center of mass.
Definition at line 171 of file softbody.cc.
void StepCore::SoftBody::setAngularMomentum | ( | double | angularMomentum | ) |
Set the angular momentum of the body.
Definition at line 277 of file softbody.cc.
void StepCore::SoftBody::setAngularVelocity | ( | double | angularVelocity | ) |
Set the angular velicity of the body.
Definition at line 261 of file softbody.cc.
void StepCore::SoftBody::setBorderParticleNames | ( | const QString & | borderParticleNames | ) |
Definition at line 338 of file softbody.cc.
void StepCore::SoftBody::setPosition | ( | const Vector2d | position | ) |
Set the position of the center of mass.
Definition at line 185 of file softbody.cc.
|
inline |
Set status of drawing of internal items.
Definition at line 129 of file softbody.h.
void StepCore::SoftBody::setVelocity | ( | const Vector2d | velocity | ) |
Set the velocity of the center of mass.
Definition at line 212 of file softbody.cc.
|
virtual |
Set/change pointer to World in which this object lives.
Reimplemented from StepCore::Item.
Definition at line 356 of file softbody.cc.
|
inline |
Get status of drawing of internal items.
Definition at line 127 of file softbody.h.
double StepCore::SoftBody::torque | ( | ) | const |
Get the torque acting on the body.
Definition at line 296 of file softbody.cc.
Vector2d StepCore::SoftBody::velocity | ( | ) | const |
Get the velocity of the center of mass.
Definition at line 197 of file softbody.cc.
void StepCore::SoftBody::worldItemRemoved | ( | Item * | item | ) |
Definition at line 344 of file softbody.cc.
Member Data Documentation
|
protected |
Definition at line 143 of file softbody.h.
|
protected |
Definition at line 142 of file softbody.h.
|
protected |
Definition at line 144 of file softbody.h.
The documentation for this class was generated from the following files:
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.