VoltAir
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Groups Pages
Public Member Functions | Protected Attributes | List of all members
Joint Class Reference

A constraint between two Bodys. More...

Inheritance diagram for Joint:
QObject RevoluteJoint WeldJoint

Public Member Functions

 Joint (QObject *parent=0)
 Construct a Joint. More...
 
void setTargets (Body *bodyA, Body *bodyB)
 Sets the two Bodys constrained by this Joint. More...
 
BodygetBodyATarget () const
 Returns Body A. More...
 
BodygetBodyBTarget () const
 Returns Body B. More...
 
virtual void createJoint ()
 Creates the Box2D joint. More...
 
virtual void destroyJoint ()
 Destroys the b2Joint, if it has been created. More...
 
virtual void notifyJointDestroyed (b2Joint *joint)
 Called when a b2Joint associated with this object has been deleted by Box2D. More...
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
virtual const QMetaObjectmetaObject () const
 
QString objectName () const
 
void setObjectName (const QString &name)
 
bool isWidgetType () const
 
bool isWindowType () const
 
bool signalsBlocked () const
 
bool blockSignals (bool block)
 
QThreadthread () const
 
void moveToThread (QThread *targetThread)
 
int startTimer (int interval, Qt::TimerType timerType)
 
void killTimer (int id)
 
findChild (const QString &name, QFlags< Qt::FindChildOption > options) const
 
QList< T > findChildren (const QString &name, QFlags< Qt::FindChildOption > options) const
 
QList< T > findChildren (const QRegExp &regExp, QFlags< Qt::FindChildOption > options) const
 
QList< T > findChildren (const QRegularExpression &re, QFlags< Qt::FindChildOption > options) const
 
const QObjectList & children () const
 
void setParent (QObject *parent)
 
void installEventFilter (QObject *filterObj)
 
void removeEventFilter (QObject *obj)
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const
 
bool disconnect (const char *signal, const QObject *receiver, const char *method) const
 
bool disconnect (const QObject *receiver, const char *method) const
 
void dumpObjectTree ()
 
void dumpObjectInfo ()
 
bool setProperty (const char *name, const QVariant &value)
 
QVariant property (const char *name) const
 
QList< QByteArraydynamicPropertyNames () const
 
void destroyed (QObject *obj)
 
void objectNameChanged (const QString &objectName)
 
QObjectparent () const
 
bool inherits (const char *className) const
 
void deleteLater ()
 

Protected Attributes

b2Joint * mJoint = nullptr
 Reference to the Box2D b2Joint. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from QObject
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, Functor functor)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
bool disconnect (const QMetaObject::Connection &connection)
 
bool disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method)
 
- Protected Member Functions inherited from QObject
QObjectsender () const
 
int senderSignalIndex () const
 
int receivers (const char *signal) const
 
bool isSignalConnected (const QMetaMethod &signal) const
 
virtual void timerEvent (QTimerEvent *event)
 
virtual void childEvent (QChildEvent *event)
 
virtual void customEvent (QEvent *event)
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
- Properties inherited from QObject
 objectName
 

Detailed Description

A constraint between two Bodys.

Constructor & Destructor Documentation

Joint::Joint ( QObject parent = 0)
explicit

Construct a Joint.

Parameters
parentParent object

Member Function Documentation

virtual void Joint::createJoint ( )
virtual

Creates the Box2D joint.

This may be called by any of the participants of the joint.

Note
Default implementation does nothing.

Reimplemented in RevoluteJoint, and WeldJoint.

virtual void Joint::destroyJoint ( )
virtual

Destroys the b2Joint, if it has been created.

Body* Joint::getBodyATarget ( ) const
inline

Returns Body A.

Body* Joint::getBodyBTarget ( ) const
inline

Returns Body B.

virtual void Joint::notifyJointDestroyed ( b2Joint *  joint)
virtual

Called when a b2Joint associated with this object has been deleted by Box2D.

void Joint::setTargets ( Body bodyA,
Body bodyB 
)

Sets the two Bodys constrained by this Joint.

Parameters
bodyAA Body constrained by this Joint
bodyBOther Body constrained by this Joint

Member Data Documentation

b2Joint* Joint::mJoint = nullptr
protected

Reference to the Box2D b2Joint.