Esempio n. 1
0
	const DQuaternion& DNode::getInheritedOrient()
	{
		if (mbNeedParentUpdate)
		{
			updateFromParent();
		}
		return mInheritedOrient;
	}
Esempio n. 2
0
	const DVector3& DNode::getInheritedScale()
	{
		if (mbNeedParentUpdate)
		{
			updateFromParent();
		}
		return mInheritedScale;
	}
Esempio n. 3
0
	const DVector3& DNode::getInheritedPosition()
	{
		if (mbNeedParentUpdate)
		{
			updateFromParent();
		}
		return mInheritedPos;
	}
nsSocket::nsSocket(nsNode* nd, nsSocketDef* def)
	:   m_type(def), m_parent(nd),
	    m_from(0)
{
	UT_ASSERT(m_parent);
	m_value = def->getValue();

	m_rect = def->getRect();
	updateFromParent();
}
Esempio n. 5
0
DeferredLight::DeferredLight(LightMaterialGenerator *sys, Ogre::Light* parentLight):
    mParentLight(parentLight), bIgnoreWorld(false), mGenerator(sys), mPermutation(0)
{
	mRenderOp.operationType = Ogre::RenderOperation::OT_TRIANGLE_LIST;
	mRenderOp.indexData = 0;
	mRenderOp.vertexData = 0;
	mRenderOp.useIndexes = true;

	updateFromParent();
}
DeferredLight::DeferredLight(MaterialGenerator* generator, Ogre::Light* parentLight):
        parentLight(parentLight),
        ignoreWorld(false),
        radius(0.0),
        generator(generator),
        permutation(0) {
    mRenderOp.operationType = Ogre::RenderOperation::OT_TRIANGLE_LIST;
    mRenderOp.indexData = 0;
    mRenderOp.vertexData = 0;
    mRenderOp.useIndexes = true;

    updateFromParent();
}
Esempio n. 7
0
	void DNode::update( bool updateChildren, bool parentHasChanged )
	{
		// always clear information about parent notification
		mbParentNotified = false;

		// Short circuit the off case
		if (!updateChildren && !mbNeedParentUpdate && !mbNeedChildUpdate && !parentHasChanged )
		{
			return;
		}


		// See if we should process everyone
		if (mbNeedParentUpdate || parentHasChanged)
		{
			// Update transforms from parent
			updateFromParent();
		}

		if (mbNeedChildUpdate || parentHasChanged)
		{

			ChildSet::iterator it, itend;
			itend = mChildren.end();
			for (it = mChildren.begin(); it != itend; ++it)
			{
				DNode* child = (*it);
				child->update(true, true);
			}
			mChildrenToUpdate.clear();
		}
		else
		{
			// Just update selected children

			ChildUpdateSet::iterator it, itend;
			itend = mChildrenToUpdate.end();
			for(it = mChildrenToUpdate.begin(); it != itend; ++it)
			{
				DNode* child = *it;
				child->update(true, false);
			}

			mChildrenToUpdate.clear();
		}

		mbNeedChildUpdate = false;

	}
Esempio n. 8
0
void Node::Transform::update(const Node* parent, const float secondsPassed) {
    if (mNeedParentUpdate) {
        updateFromParent(parent);
    }
}
Esempio n. 9
0
// Derived scale with all parents' scales in world space.
const Vector3& Node::Transform::getDerivedScale(const Node* parent) const {
    if (mNeedParentUpdate) {
        updateFromParent(parent);
    }
    return mDerivedScale;
}
Esempio n. 10
0
// Derived rotate with all parents' rotations in world space.
const Quaternion& Node::Transform::getDerivedRotate(const Node* parent) const {
    if (mNeedParentUpdate) {
        updateFromParent(parent);
    }
    return mDerivedRotate;
}