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

step/stepcore

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

#include <motor.h>

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

Public Member Functions

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

Protected Attributes

Object * _body
 
Vector2d _localPosition
 
RigidBody * _r
 
double _torqueValue
 
- Protected Attributes inherited from StepCore::Object
QString _name
 

Additional Inherited Members

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

Detailed Description

Circular motor: applies a torque to the body.

Definition at line 87 of file motor.h.

Constructor & Destructor Documentation

StepCore::CircularMotor::CircularMotor ( Object *  body = 0,
const Vector2d &  localPosition = Vector2d::Zero(),
double  torqueValue = 0 
)
explicit

Constructs CircularMotor.

Definition at line 102 of file motor.cc.

Member Function Documentation

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

Get pointer to the body.

Definition at line 99 of file motor.h.

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

Calculate force.

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

Implements StepCore::Force.

Definition at line 109 of file motor.cc.

Vector2d StepCore::CircularMotor::localPosition ( ) const

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

Definition at line 127 of file motor.cc.

Vector2d StepCore::CircularMotor::position ( ) const

Position of the motor.

Definition at line 133 of file motor.cc.

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

Set pointer to the connected body.

Definition at line 114 of file motor.cc.

void StepCore::CircularMotor::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 108 of file motor.h.

void StepCore::CircularMotor::setTorqueValue ( const double  torqueValue)
inline

Set torque value.

Definition at line 118 of file motor.h.

double StepCore::CircularMotor::torqueValue ( ) const
inline

Get torque value.

Definition at line 116 of file motor.h.

Member Data Documentation

Object* StepCore::CircularMotor::_body
protected

Definition at line 124 of file motor.h.

Vector2d StepCore::CircularMotor::_localPosition
protected

Definition at line 125 of file motor.h.

RigidBody* StepCore::CircularMotor::_r
protected

Definition at line 128 of file motor.h.

double StepCore::CircularMotor::_torqueValue
protected

Definition at line 126 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