Matrix3x4 SceneNode::getWorldTransform() { if (dirty_) updateWorldTransform(); return worldTransform_; }
void View::setSize(float width, float height) { if (mWidth != width || mHeight != height) { mWidth = width; mHeight = height; setSize(width, height); updateWorldTransform(); } }
Transform GfxBody::getBoneWorldTransform (unsigned n) { checkBone(n); Ogre::Bone *bone = skeleton->getBone(n); Transform t(from_ogre(bone->_getDerivedPosition()), from_ogre(bone->_getDerivedOrientation()), from_ogre(bone->_getDerivedScale())); updateWorldTransform(); return worldTransform * t; }
//============================================================================== Bool MoveComponent::update(SceneNode&, F32, F32, UpdateType uptype) { if(uptype == ASYNC_UPDATE && getParent() == nullptr) { // Call this only on roots updateWorldTransform(); } // move component does it's own updates return false; }
const Transform3 Node::worldTransform() const { if (worldTransformValid_ == false) { updateWorldTransform(); // updateWorldTransform() should validate the world transform GRAPHICS_RUNTIME_ASSERT(worldTransformValid_ == true); } return worldTransform_; }
void View::setPosition(float x, float y) { mX = x; mY = y; SE_Matrix3f identity3; identity3.identity(); SE_Matrix4f transform; transform.identity(); transform.set(identity3,SE_Vector3f(mX,mY,0)); setPrevMatrix(transform); //update updateWorldTransform(); updateBoundingVolume(); }
ViewGroup::ViewGroup(SE_Spatial* parent):SE_CommonNode(parent) { setNodeType(GROUP_NODE); SE_SpatialID spatialID = SE_ID::createSpatialID(); unsigned int* ids = spatialID.getID(); SE_SimObjectID id(ids[0], ids[1], ids[2], ids[3]); /* SE_Geometry* geometry = new SE_Geometry(spatialID, root); geometry->attachSimObject(this); SE_Application::getInstance()->getSimObjectManager()->set(spatialID, this);*/ updateWorldTransform(); updateBoundingVolume(); parent->addChild(this); }
void GfxBody::updateBoneMatrixes (void) { if (skeleton) { //update the current hardware animation state skeleton->setAnimationState(animationState); skeleton->_getBoneMatrices(boneMatrixes); updateWorldTransform(); Ogre::Matrix4 world = node->_getFullTransform(); Ogre::OptimisedUtil::getImplementation()->concatenateAffineMatrices( world, boneMatrixes, boneWorldMatrixes, numBoneMatrixes); } }
bool DHSkeleton::init() { if (!m_data || !Node::init()) { return false; } m_bones = m_data->newBones(); m_slots = m_data->newSlots(this); m_drawOrder = new DHSlot*[m_data->getSlotCount()]; memcpy(m_drawOrder, m_slots, sizeof(DHSlot*) * m_data->getSlotCount()); m_ikConstraints = m_data->newIkConstraints(this); updateCache(); updateWorldTransform(); setGLProgram(GLProgramCache::getInstance()->getGLProgram(GLProgram::SHADER_NAME_POSITION_TEXTURE_COLOR_NO_MVP)); return true; }
//============================================================================== Error MoveComponent::update(SceneNode& node, F32, F32, Bool& updated) { updated = updateWorldTransform(node); return ErrorCode::NONE; }