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

step/stepcore

  • StepCore
  • LinearMotor
Public Member Functions | Protected Attributes | List of all members
StepCore::LinearMotor Class Reference
Physical forces

#include <motor.h>

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

Public Member Functions

 LinearMotor (Object *body=0, const Vector2d &localPosition=Vector2d::Zero(), Vector2d forceValue=Vector2d::Zero())
 
Object * body () const
 
void calcForce (bool calcVariances)
 
const Vector2d & forceValue () const
 
const Vector2d & localPosition () const
 
Vector2d position () const
 
void setBody (Object *body)
 
void setForceValue (const Vector2d &forceValue)
 
void setLocalPosition (const Vector2d &localPosition)
 
- 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::Force
virtual ~Force ()
 

Protected Attributes

Object * _body
 
Vector2d _forceValue
 
Vector2d _localPosition
 
Particle * _p
 
RigidBody * _r
 
- Protected Attributes inherited from StepCore::Object
QString _name
 

Additional Inherited Members

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

Detailed Description

Linear motor: applies a force at given position on the body.

Definition at line 41 of file motor.h.

Constructor & Destructor Documentation

StepCore::LinearMotor::LinearMotor ( Object *  body = 0,
const Vector2d &  localPosition = Vector2d::Zero(),
Vector2d  forceValue = Vector2d::Zero() 
)
explicit

Constructs LinearMotor.

Member Function Documentation

Object* StepCore::LinearMotor::body ( ) const
inline

Get pointer to the body.

Definition at line 53 of file motor.h.

void StepCore::LinearMotor::calcForce ( bool  calcVariances)
virtual

Calculate force.

Bodies can be accessed through this->world()->bodies()

Implements StepCore::Force.

Definition at line 48 of file motor.cc.

const Vector2d& StepCore::LinearMotor::forceValue ( ) const
inline

Get force value.

Definition at line 68 of file motor.h.

const Vector2d& StepCore::LinearMotor::localPosition ( ) const
inline

Local position of the motor on the body or in the world (if the motor is not connected)

Definition at line 59 of file motor.h.

Vector2d StepCore::LinearMotor::position ( ) const

Position of the motor.

Definition at line 76 of file motor.cc.

void StepCore::LinearMotor::setBody ( Object *  body)

Set pointer to the connected body.

Definition at line 56 of file motor.cc.

void StepCore::LinearMotor::setForceValue ( const Vector2d &  forceValue)
inline

Set force value.

Definition at line 70 of file motor.h.

void StepCore::LinearMotor::setLocalPosition ( const Vector2d &  localPosition)
inline

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

Definition at line 62 of file motor.h.

Member Data Documentation

Object* StepCore::LinearMotor::_body
protected

Definition at line 76 of file motor.h.

Vector2d StepCore::LinearMotor::_forceValue
protected

Definition at line 78 of file motor.h.

Vector2d StepCore::LinearMotor::_localPosition
protected

Definition at line 77 of file motor.h.

Particle* StepCore::LinearMotor::_p
protected

Definition at line 80 of file motor.h.

RigidBody* StepCore::LinearMotor::_r
protected

Definition at line 81 of file motor.h.


The documentation for this class was generated from the following files:
  • motor.h
  • motor.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