VoltAir
|
Wrapper around a b2ParticleSystem
, which represents an independent layer of particles.
More...
Signals | |
void | radiusChanged () |
Emitted when radius changes. More... | |
void | densityChanged () |
Emitted when density changes. More... | |
void | gravityScaleChanged () |
Emitted when gravityScale changes. More... | |
Public Member Functions | |
ParticleLayer (QObject *parent=nullptr) | |
Construct a new ParticleLayer, and also construct a corresponding b2ParticleSystem. More... | |
float | getRadius () const |
Returns radius. More... | |
void | setRadius (float value) |
Sets radius. More... | |
float | getDensity () const |
Returns density. More... | |
void | setDensity (float value) |
Sets density. More... | |
float | getGravityScale () const |
Returns gravityScale. More... | |
void | setGravityScale (float value) |
Sets gravityScale. More... | |
b2ParticleSystem * | getParticleSystem () const |
Returns the underlying b2ParticleSystem . 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 () |
Properties | |
float | radius |
Radius of particles in this layer, corresponding to b2ParticleSystem::SetRadius() . More... | |
float | density |
Density of particles in this layer, corresponding to b2ParticleSystem::SetDensity() . More... | |
float | gravityScale |
Scaling factor on gravity affecting particles in this layer, corresponding to b2ParticleSystem::SetGravityScale() . More... | |
![]() | |
objectName | |
Additional Inherited Members | |
![]() | |
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) |
![]() | |
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) |
Wrapper around a b2ParticleSystem
, which represents an independent layer of particles.
Each b2ParticleSystem
contains an independent particle simulation, and can have independent physical properties like radius and density. Particles on different layers do not interact.
|
explicit |
Construct a new ParticleLayer, and also construct a corresponding b2ParticleSystem.
parent | Parent object |
|
signal |
Emitted when density changes.
float ParticleLayer::getDensity | ( | ) | const |
Returns density.
float ParticleLayer::getGravityScale | ( | ) | const |
Returns gravityScale.
|
inline |
Returns the underlying b2ParticleSystem
.
float ParticleLayer::getRadius | ( | ) | const |
Returns radius.
|
signal |
Emitted when gravityScale changes.
|
signal |
Emitted when radius changes.
void ParticleLayer::setGravityScale | ( | float | value | ) |
Sets gravityScale.
value | Float to set gravityScale to |
|
readwrite |
Density of particles in this layer, corresponding to b2ParticleSystem::SetDensity()
.
|
readwrite |
Scaling factor on gravity affecting particles in this layer, corresponding to b2ParticleSystem::SetGravityScale()
.
|
readwrite |
Radius of particles in this layer, corresponding to b2ParticleSystem::SetRadius()
.