Commit de2f77dc authored by Inge Wallin's avatar Inge Wallin

Refactor: Make Joint inherit Item.

This gets rid of multiple inheritance in the actual Joint classes
parent e90f5725
......@@ -67,11 +67,12 @@ Legend
* SoftBodySpring
* Joint{world.h}
[]
* Anchor(Item, Joint) Fixes the position of a body
* Pin(Item, Joint) Fixes the position of a a given point of a body
* Stick(Item, Joint) Fixed distance between two points on particles or rigid bodies
* Joint
[]
* Anchor Fixes the position of a body
* Pin Fixes the position of a a given point of a body to another body
* Stick Fixed distance between two points on particles or rigid bodies
* Rope Maximum distance between two points on particles or rigid bodies
* Tool Utilities for control or information retrieval
* Note(ItemGroup, Tool) Textual Note
......
......@@ -25,8 +25,10 @@
#define STEPCORE_JOINT_H
// stdc++
#include <vector> // XXX: Replace if Qt is enabled.
// Stepcore
#include "types.h"
#include "item.h"
......@@ -82,7 +84,7 @@ private:
/** \ingroup joints
* \brief Interface for joints
*/
class Joint
class Joint : public Item
{
STEPCORE_OBJECT(Joint)
......
......@@ -35,7 +35,7 @@ class RigidBody;
/** \ingroup joints
* \brief Fixes position of the body
*/
class Anchor: public Item, public Joint
class Anchor : public Joint
{
STEPCORE_OBJECT(Anchor)
......@@ -76,7 +76,7 @@ protected:
/** \ingroup joints
* \brief Fixes position of a given point on the body
*/
class Pin: public Item, public Joint
class Pin : public Joint
{
STEPCORE_OBJECT(Pin)
......@@ -118,7 +118,7 @@ protected:
/** \ingroup joints
* \brief Massless stick: fixed distance between two points on particles or rigid bodies
*/
class Stick: public Item, public Joint
class Stick : public Joint
{
STEPCORE_OBJECT(Stick)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment