const DQuaternion& DNode::getInheritedOrient() { if (mbNeedParentUpdate) { updateFromParent(); } return mInheritedOrient; }
const DVector3& DNode::getInheritedScale() { if (mbNeedParentUpdate) { updateFromParent(); } return mInheritedScale; }
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(); }
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(); }
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; }
void Node::Transform::update(const Node* parent, const float secondsPassed) { if (mNeedParentUpdate) { updateFromParent(parent); } }
// Derived scale with all parents' scales in world space. const Vector3& Node::Transform::getDerivedScale(const Node* parent) const { if (mNeedParentUpdate) { updateFromParent(parent); } return mDerivedScale; }
// Derived rotate with all parents' rotations in world space. const Quaternion& Node::Transform::getDerivedRotate(const Node* parent) const { if (mNeedParentUpdate) { updateFromParent(parent); } return mDerivedRotate; }