VoltAir
|
A QObject container for a Box2D b2Body
that represents a circle.
More...
Signals | |
void | radiusChanged () |
Emitted when radius changes. More... | |
![]() | |
void | bodyTypeChanged () |
Emitted when bodyType changes. More... | |
void | activeChanged () |
Emitted when active changes. More... | |
void | linearDampingChanged () |
Emitted when linearDamping changes. More... | |
void | angularDampingChanged () |
Emitted when angularDamping changes. More... | |
void | gravityScaleChanged () |
Emitted when gravityScale changes. More... | |
void | magneticChanged () |
Emitted when magnetic changes. More... | |
void | magneticStrengthChanged () |
Emitted when magneticStrength changes. More... | |
void | positionSet () |
Emitted when position is set. More... | |
void | angleInRadiansSet () |
Emitted when angleInRadians is set. More... | |
void | linearVelocitySet () |
Emitted when linearVelocity is set. More... | |
void | angularVelocitySet () |
Emitted when angularVelocity is set. More... | |
void | sensorChanged () |
Emitted when sensor changes. More... | |
void | densityChanged () |
Emitted when density changes. More... | |
void | frictionChanged () |
Emitted when friction changes. More... | |
void | restitutionChanged () |
Emitted when restitution changes. More... | |
void | jointsChanged () |
Emitted when joints changes. More... | |
void | contactBegun (Body *otherBody, QPointF normal) |
Emitted when a contact begins. More... | |
void | contactEnded (Body *otherBody, QPointF normal) |
Emitted when a contact ends. More... | |
void | queuedContactBegun (Body *otherBody, QPointF normal) |
Queued version of contactBegun(). More... | |
void | queuedContactEnded (Body *otherBody, QPointF normal) |
Queued version of contactEnded(). More... | |
Public Member Functions | |
CircleBody (QObject *parent=nullptr) | |
Constructs a CircleBody. More... | |
float | getRadius () const |
Returns radius. More... | |
void | setRadius (float value) |
Sets radius. More... | |
![]() | |
Body (QObject *parent=0) | |
Constructs a Body. More... | |
virtual | ~Body () |
Destroys a Body. More... | |
Actor * | getActor () const |
Returns actor. More... | |
BodyType | getBodyType () const |
Returns bodyType. More... | |
void | setBodyType (BodyType value) |
Sets bodyType. More... | |
bool | isActive () const |
Returns active. More... | |
void | setActive (bool value) |
Sets active. More... | |
float | getLinearDamping () const |
Returns linearDamping. More... | |
void | setLinearDamping (float value) |
Sets linearDamping. More... | |
float | getAngularDamping () const |
Returns angularDamping. More... | |
void | setAngularDamping (float value) |
Sets angularDamping. More... | |
float | getGravityScale () const |
Returns gravityScale. More... | |
void | setGravityScale (float value) |
Sets gravityScale. More... | |
bool | isMagnetic () const |
Returns magnetic. More... | |
void | setMagnetic (bool value) |
Sets magnetic. More... | |
float | getMagneticStrength () const |
Returns magneticStrength. More... | |
void | setMagneticStrength (float value) |
Sets magneticStrength. More... | |
QPointF | getPosition () const |
Returns position. More... | |
bool | isSensor () const |
Returns sensor. More... | |
void | setSensor (bool value) |
Sets sensor. More... | |
float | getDensity () const |
Returns density. More... | |
void | setDensity (float value) |
Sets density. More... | |
float | getFriction () const |
Returns friction. More... | |
void | setFriction (float value) |
Sets friction. More... | |
float | getRestitution () const |
Returns restitution. More... | |
void | setRestitution (float value) |
Sets restitution. More... | |
const QList< Joint * > & | getJoints () const |
Returns joints as a const QList<Joint*>&. More... | |
QQmlListProperty< Joint > | getJointListProperty () |
Returns joints as a QQmlListProperty<Joint>. More... | |
void | setJoints (const QList< Joint * > &value) |
Sets joints. More... | |
Q_INVOKABLE Joint * | getJoint (int index) |
Returns a Joint at a given index . More... | |
Q_INVOKABLE int | getJointCount () const |
Returns the number of Joints associated with this Body. More... | |
Q_INVOKABLE void | addJoint (Joint *joint) |
Add a Joint to the Body. More... | |
Q_INVOKABLE void | removeJoint (Joint *joint) |
Remove a Joint from the Body. More... | |
Q_INVOKABLE void | clearJoints () |
Clear all the Joints owned by this Body. More... | |
Q_INVOKABLE void | clearAllAttachedJoints () |
Destroys all Joints associated with this Body, whether or not this Body is the Joint's parent. More... | |
b2Body * | getBody () |
Returns the b2Body associated with this Body. More... | |
Q_INVOKABLE void | applyTorque (float torque) |
Apply torque to the associated b2Body . More... | |
Q_INVOKABLE void | applyForceToCenter (const QPointF &force) |
Apply force to the associated b2Body . More... | |
void | invalidateTransform () |
Marks the transform for this Body as dirty. More... | |
virtual void | updateBeforePhysics () |
Called immediately preceding the physics step. More... | |
virtual void | updateAfterPhysics () |
Called immediately following the physics step. More... | |
QList< Body * > | getContactedBodies () const |
Returns a QList containing the list of Bodys in contact with this Body. More... | |
void | beginContact (Body *otherBody, const QPointF &normal) |
Called when this Body has made contact with another. More... | |
void | endContact (Body *otherBody, const QPointF &normal) |
Called when this Body loses contact with another. More... | |
void | setPosition (const QPointF &value) |
Sets position. More... | |
float | getAngleInRadians () const |
Returns angleInRadians. More... | |
void | setAngleInRadians (float value) |
Sets angleInRadians. More... | |
QPointF | getLinearVelocity () const |
Returns linearVelocity. More... | |
void | setLinearVelocity (const QPointF &value) |
Sets linearVelocity. More... | |
float | getAngularVelocity () const |
Returns angularVelocity. More... | |
void | setAngularVelocity (float value) |
Sets angularVelocity. More... | |
![]() | |
QObject (QObject *parent) | |
virtual bool | event (QEvent *e) |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
virtual const QMetaObject * | metaObject () const |
QString | objectName () const |
void | setObjectName (const QString &name) |
bool | isWidgetType () const |
bool | isWindowType () const |
bool | signalsBlocked () const |
bool | blockSignals (bool block) |
QThread * | thread () const |
void | moveToThread (QThread *targetThread) |
int | startTimer (int interval, Qt::TimerType timerType) |
void | killTimer (int id) |
T | 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 ®Exp, 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< QByteArray > | dynamicPropertyNames () const |
void | destroyed (QObject *obj) |
void | objectNameChanged (const QString &objectName) |
QObject * | parent () const |
bool | inherits (const char *className) const |
void | deleteLater () |
Protected Member Functions | |
virtual void | forEachShape (const std::function< void(b2Shape *)> &func) override |
Calls func on the b2Shape that represents this CircleBody. More... | |
![]() | |
void | invalidateFixtures () |
Marks the Body's fixtures as dirty and that they need to be recreated. More... | |
void | forEachFixture (const std::function< void(b2Fixture *)> &func) |
Applies func to each of the Body's fixtures. More... | |
![]() | |
QObject * | sender () 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 | |
float | radius |
The radius of the CircleBody. More... | |
![]() | |
Actor | actor |
Actor object associated with this Body. Always the parent in the item hierarchy. More... | |
BodyType | bodyType |
BodyType of this Body. More... | |
bool | active |
Whether or not the Body takes part in the physics simulation. More... | |
float | linearDamping |
Dampens the linearVelocity of the Body. More... | |
float | angularDamping |
Dampens the angularVelocity of the Body. More... | |
float | gravityScale |
Coefficient on the continuous force of gravity. More... | |
bool | magnetic |
Whether or not magnetism is set on for this Body. More... | |
float | magneticStrength |
Intensity of the magnetic forces involving this Body. More... | |
bool | sensor |
The sensor value for all of this Body's b2Fixtures . More... | |
float | density |
The density value for all of this Body's b2Fixtures . More... | |
float | friction |
The friction value for all of this Body's b2Fixtures . More... | |
float | restitution |
The restitution value for all of this Body's b2Fixtures . More... | |
QQmlListProperty< Joint > | joints |
List of Joint objects associated with this Body. More... | |
QPointF | position |
Positional component of the b2Body's transform. More... | |
float | angleInRadians |
Rotational component of the b2Body's transform, in radians. More... | |
QPointF | linearVelocity |
The rate which the Bodys position changes. More... | |
float | angularVelocity |
The rate which the Bodys angle changes. More... | |
![]() | |
objectName | |
Additional Inherited Members | |
![]() | |
enum | BodyType { StaticBody = 0, KinematicBody, DynamicBody } |
Overarching category of how this Body interacts with the world. More... | |
![]() | |
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) |
A QObject container for a Box2D b2Body
that represents a circle.
|
explicit |
Constructs a CircleBody.
|
overrideprotectedvirtual |
Calls func
on the b2Shape
that represents this CircleBody.
func | Function to call, which receives the b2Shape as an argument |
Reimplemented from Body.
|
inline |
Returns radius.
|
signal |
Emitted when radius changes.
|
readwrite |
The radius of the CircleBody.