Ejemplo n.º 1
0
void View::onSetRotation(const glm::vec3 &v) {
	if (mRotation == v) return;
	mRotation = v;
	mTransformDirty = true;
//	if (mHooks) mHooks->onRotationChanged(mRotation);
	onRotationChanged(v);
}
Ejemplo n.º 2
0
Box2DBody::Box2DBody(QQuickItem *parent) :
    QQuickItem(parent),
    mBody(0),
    mWorld(0),
    mSynchronizing(false),
    mInitializePending(false)
{
    setTransformOrigin(TopLeft);
    connect(this, SIGNAL(rotationChanged()), SLOT(onRotationChanged()));
}
Ejemplo n.º 3
0
Box2DBody::Box2DBody(QDeclarativeItem *parent) :
    QDeclarativeItem(parent),
    mBody(0),
    mWorld(0),
    mLinearDamping(0.0f),
    mAngularDamping(0.0f),
    mBodyType(Dynamic),
    mBullet(false),
    mSleepingAllowed(true),
    mFixedRotation(false),
    mActive(true),
    mSynchronizing(false),
    mInitializePending(false)
{
    setTransformOrigin(TopLeft);
    connect(this, SIGNAL(rotationChanged()), SLOT(onRotationChanged()));
}
Ejemplo n.º 4
0
Entity::Entity(Scene *parent)
    : Box2DBase(parent)
    , m_updateInterval(0)
    , m_scene(0)
    , m_behavior(0)
    , m_body(0)
    , m_linearDamping(0.0f)
    , m_angularDamping(0.0f)
    , m_entityType(Quasi::StaticType)
    , m_bullet(false)
    , m_sleepingAllowed(true)
    , m_fixedRotation(false)
    , m_active(true)
    , m_sensorFixture(0)
{
    setTransformOrigin(Center);
    connect(this, SIGNAL(rotationChanged()), SLOT(onRotationChanged()));
}
Ejemplo n.º 5
0
Box2DItem::Box2DItem(GameScene *parent)
    : Box2DBaseItem(parent)
    , m_body(0)
    , m_linearDamping(0.0f)
    , m_angularDamping(0.0f)
    , m_bodyType(Quasi::DynamicBodyType)
    , m_shape(Quasi::RectangleBodyShape)
    , m_bullet(false)
    , m_sleepingAllowed(true)
    , m_fixedRotation(false)
    , m_active(true)
    , m_fixture(0)
    , m_density(0)
    , m_friction(0)
    , m_restitution(0)
{
    setTransformOrigin(Center);
    connect(this, SIGNAL(rotationChanged()), SLOT(onRotationChanged()));
}