• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

step/stepcore

  • StepCore
  • Stick
Public Member Functions | Protected Attributes | List of all members
StepCore::Stick Class Reference
Rigid joints

#include <joint.h>

Inheritance diagram for StepCore::Stick:
Inheritance graph
[legend]

Public Member Functions

 Stick (double restLength=1, Object *body1=0, Object *body2=0, const Vector2d &localPosition1=Vector2d::Zero(), const Vector2d &localPosition2=Vector2d::Zero())
 
Object * body1 () const
 
Object * body2 () const
 
int constraintsCount ()
 
void getConstraintsInfo (ConstraintsInfo *info, int offset)
 
Vector2d localPosition1 () const
 
Vector2d localPosition2 () const
 
Particle * particle1 () const
 
Particle * particle2 () const
 
Vector2d position1 () const
 
Vector2d position2 () const
 
double restLength () const
 
RigidBody * rigidBody1 () const
 
RigidBody * rigidBody2 () const
 
void setBody1 (Object *body1)
 
void setBody2 (Object *body2)
 
void setLocalPosition1 (const Vector2d &localPosition1)
 
void setLocalPosition2 (const Vector2d &localPosition2)
 
void setRestLength (double restLength)
 
Vector2d velocity1 () const
 
Vector2d velocity2 () const
 
- Public Member Functions inherited from StepCore::Item
 Item (const QString &name=QString())
 
 Item (const Item &item)
 
virtual ~Item ()
 
Color color () const
 
void deleteObjectErrors ()
 
ItemGroup * group () const
 
ObjectErrors * objectErrors ()
 
Item & operator= (const Item &item)
 
void setColor (Color color)
 
virtual void setGroup (ItemGroup *group)
 
virtual void setWorld (World *world)
 
ObjectErrors * tryGetObjectErrors () const
 
World * world () const
 
virtual void worldItemRemoved (Item *item STEPCORE_UNUSED)
 
- Public Member Functions inherited from StepCore::Object
 Object (const QString &name=QString())
 
virtual ~Object ()
 
const QString & name () const
 
void setName (const QString &name)
 
- Public Member Functions inherited from StepCore::Joint
virtual ~Joint ()
 

Protected Attributes

Object * _body1
 
Object * _body2
 
Vector2d _localPosition1
 
Vector2d _localPosition2
 
Particle * _p1
 
Particle * _p2
 
RigidBody * _r1
 
RigidBody * _r2
 
double _restLength
 
- Protected Attributes inherited from StepCore::Object
QString _name
 

Additional Inherited Members

- Protected Member Functions inherited from StepCore::Item
virtual ObjectErrors * createObjectErrors ()
 

Detailed Description

Massless stick: fixed distance between two points on particles or rigid bodies.

Definition at line 120 of file joint.h.

Constructor & Destructor Documentation

StepCore::Stick::Stick ( double  restLength = 1,
Object *  body1 = 0,
Object *  body2 = 0,
const Vector2d &  localPosition1 = Vector2d::Zero(),
const Vector2d &  localPosition2 = Vector2d::Zero() 
)
explicit

Constructs Stick.

Definition at line 199 of file joint.cc.

Member Function Documentation

Object* StepCore::Stick::body1 ( ) const
inline

Get pointer to the first connected body.

Definition at line 137 of file joint.h.

Object* StepCore::Stick::body2 ( ) const
inline

Get pointer to the second connected body.

Definition at line 142 of file joint.h.

int StepCore::Stick::constraintsCount ( )
virtual

Get count of constraints.

Implements StepCore::Joint.

Definition at line 276 of file joint.cc.

void StepCore::Stick::getConstraintsInfo ( ConstraintsInfo *  info,
int  offset 
)
virtual

Fill the part of constraints information structure starting at offset.

Implements StepCore::Joint.

Reimplemented in StepCore::Rope.

Definition at line 284 of file joint.cc.

Vector2d StepCore::Stick::localPosition1 ( ) const
inline

Local position of the first end of the stick on the body or in the world (if the end is not connected)

Definition at line 148 of file joint.h.

Vector2d StepCore::Stick::localPosition2 ( ) const
inline

Local position of the second end of the stick on the body or in the world (if the end is not connected)

Definition at line 155 of file joint.h.

Particle* StepCore::Stick::particle1 ( ) const
inline

Get first connected Particle.

Definition at line 171 of file joint.h.

Particle* StepCore::Stick::particle2 ( ) const
inline

Get second connected Particle.

Definition at line 173 of file joint.h.

Vector2d StepCore::Stick::position1 ( ) const

Position of the first end of the stick.

Definition at line 248 of file joint.cc.

Vector2d StepCore::Stick::position2 ( ) const

Position of the second end of the stick.

Definition at line 255 of file joint.cc.

double StepCore::Stick::restLength ( ) const
inline

Get the restLength of the stick.

Definition at line 132 of file joint.h.

RigidBody* StepCore::Stick::rigidBody1 ( ) const
inline

Get first connected RigidBody.

Definition at line 175 of file joint.h.

RigidBody* StepCore::Stick::rigidBody2 ( ) const
inline

Get second connected RigidBody.

Definition at line 177 of file joint.h.

void StepCore::Stick::setBody1 ( Object *  body1)

Set pointer to the first connected body.

Definition at line 208 of file joint.cc.

void StepCore::Stick::setBody2 ( Object *  body2)

Set pointer to the second connected body.

Definition at line 228 of file joint.cc.

void StepCore::Stick::setLocalPosition1 ( const Vector2d &  localPosition1)
inline

Set local position of the first end of the stick on the body or in the world (if the end is not connected)

Definition at line 151 of file joint.h.

void StepCore::Stick::setLocalPosition2 ( const Vector2d &  localPosition2)
inline

Set local position of the second end of the stick on the body or in the world (if the end is not connected)

Definition at line 158 of file joint.h.

void StepCore::Stick::setRestLength ( double  restLength)
inline

Set the restLength of the stick.

Definition at line 134 of file joint.h.

Vector2d StepCore::Stick::velocity1 ( ) const

Velocity of the first end of the stick.

Definition at line 262 of file joint.cc.

Vector2d StepCore::Stick::velocity2 ( ) const

Velocity of the second end of the stick.

Definition at line 269 of file joint.cc.

Member Data Documentation

Object* StepCore::Stick::_body1
protected

Definition at line 184 of file joint.h.

Object* StepCore::Stick::_body2
protected

Definition at line 185 of file joint.h.

Vector2d StepCore::Stick::_localPosition1
protected

Definition at line 186 of file joint.h.

Vector2d StepCore::Stick::_localPosition2
protected

Definition at line 187 of file joint.h.

Particle* StepCore::Stick::_p1
protected

Definition at line 189 of file joint.h.

Particle* StepCore::Stick::_p2
protected

Definition at line 190 of file joint.h.

RigidBody* StepCore::Stick::_r1
protected

Definition at line 191 of file joint.h.

RigidBody* StepCore::Stick::_r2
protected

Definition at line 192 of file joint.h.

double StepCore::Stick::_restLength
protected

Definition at line 183 of file joint.h.


The documentation for this class was generated from the following files:
  • joint.h
  • joint.cc
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:43:06 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

step/stepcore

Skip menu "step/stepcore"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal