Example #1
0
 //---------------------------------------------------------------------------
 void InstancedEntity::setOrientation(const Quaternion& orientation, bool doUpdate)
 {
     mOrientation = orientation;
     mUseLocalTransform = true;
     markTransformDirty();
     if (doUpdate) updateTransforms();
 }
Example #2
0
 //---------------------------------------------------------------------------
 void InstancedEntity::setPosition(const Vector3& position, bool doUpdate)
 {
     mPosition = position;
     mDerivedLocalPosition = position;
     mUseLocalTransform = true;
     markTransformDirty();
     if (doUpdate) updateTransforms();
 }
Example #3
0
 //---------------------------------------------------------------------------
 void InstancedEntity::setScale(const Vector3& scale, bool doUpdate)
 {
     mScale = scale;
     mMaxScaleLocal = std::max<Real>(std::max<Real>(
         Math::Abs(mScale.x), Math::Abs(mScale.y)), Math::Abs(mScale.z));
     mUseLocalTransform = true;
     markTransformDirty();
     if (doUpdate) updateTransforms();
 }
Example #4
0
void Box2DBody::setTarget(QQuickItem *target)
{
    if (mTarget == target)
        return;

    if (mTarget)
        mTarget->disconnect(this);

    mTarget = target;
    mTransformDirty = target != 0;

    if (target) {
        connect(target, SIGNAL(xChanged()), this, SLOT(markTransformDirty()));
        connect(target, SIGNAL(yChanged()), this, SLOT(markTransformDirty()));
        connect(target, SIGNAL(rotationChanged()), this, SLOT(markTransformDirty()));
    }

    emit targetChanged();
}
Example #5
0
 //-----------------------------------------------------------------------
 void InstancedEntity::_notifyAttached( Node* parent, bool isTagPoint )
 {
     markTransformDirty();
     MovableObject::_notifyAttached( parent, isTagPoint );
     updateTransforms();
 }
Example #6
0
 //-----------------------------------------------------------------------
 void InstancedEntity::_notifyMoved(void)
 {
     markTransformDirty();
     MovableObject::_notifyMoved();
     updateTransforms();
 }