//--------------------------------------------------------------------------- void InstancedEntity::setOrientation(const Quaternion& orientation, bool doUpdate) { mOrientation = orientation; mUseLocalTransform = true; markTransformDirty(); if (doUpdate) updateTransforms(); }
//--------------------------------------------------------------------------- void InstancedEntity::setPosition(const Vector3& position, bool doUpdate) { mPosition = position; mDerivedLocalPosition = position; mUseLocalTransform = true; markTransformDirty(); if (doUpdate) updateTransforms(); }
//--------------------------------------------------------------------------- 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(); }
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(); }
//----------------------------------------------------------------------- void InstancedEntity::_notifyAttached( Node* parent, bool isTagPoint ) { markTransformDirty(); MovableObject::_notifyAttached( parent, isTagPoint ); updateTransforms(); }
//----------------------------------------------------------------------- void InstancedEntity::_notifyMoved(void) { markTransformDirty(); MovableObject::_notifyMoved(); updateTransforms(); }