void BoxLightGob::Update(float dt) { UpdateWorldTransform(); if(m_boundsDirty) { m_localBounds = m_mesh->bounds; UpdateWorldAABB(); } m_light->min = m_bounds.Min(); m_light->max = m_bounds.Max(); }
void Spatial::GeometricStateUpdate() { UpdateWorldTransform(); //Propogate World Bounds To Root { Spatial * parent = GetParentAs<Spatial>(); while (parent != NULL) { parent->UpdateWorldBound(); parent = parent->GetParentAs<Spatial>(); } //Propogate World Bounds To Root } }
void GameObject::Update(const FrameTime& fr, UpdateTypeEnum updateType) { m_worldXformUpdated = false; m_worldBoundUpdated = false; for( auto it = m_components.begin(); it != m_components.end(); ++it) { (*it)->Update(fr,updateType); } UpdateWorldTransform(); UpdateWorldAABB(); }
void lcNode::Update() { UpdateWorldTransform(); if(m_uiChildCount > 0) { for(unsigned int i = 0;i < m_uiChildCount;i++) { lcNode* pChild = GetAt(i); pChild->Update(); } } }
void Locator::Update(float dt) { bool udpateXforms = m_worldDirty; UpdateWorldTransform(); Model* model = m_resource ? (Model*)m_resource->GetTarget() : NULL; if( model && model->IsReady()) { if(m_modelTransforms.empty() || udpateXforms) { const MatrixList& matrices = model->AbsoluteTransforms(); m_modelTransforms.resize(matrices.size()); for( unsigned int i = 0; i < m_modelTransforms.size(); ++i) { m_modelTransforms[i] = matrices[i] * m_world; // transform matrix array now holds complete world transform. } BuildRenderables(); m_boundsDirty = true; } } if(m_boundsDirty) { if(!m_modelTransforms.empty()) { // assert(model && model->IsReady()); m_localBounds = model->GetBounds(); if(m_parent) m_parent->InvalidateBounds(); } else { m_localBounds = AABB(float3(-0.5f,-0.5f,-0.5f), float3(0.5f,0.5f,0.5f)); } this->UpdateWorldAABB(); } if(RenderContext::Inst()->LightEnvDirty) { // update light env. for(auto renderNode = m_renderables.begin(); renderNode != m_renderables.end(); renderNode++) { LightingState::Inst()->UpdateLightEnvironment(*renderNode); } } }
void tBillboardBatch::Normalize( const tVector3d& camPosition ) { tWriteLocker lock(&m_BatchLock); tVector3d geoOffset(m_Offset); if (Mapping::NormalizePosition(geoOffset, camPosition) == true) { m_Offset = tVector2d(geoOffset.x, geoOffset.y); UpdateWorldTransform(); for(int i = 0; i < m_Billboards.size(); ++i) { m_Billboards[i].xBillboard->Normalize(camPosition); } Commit(); } }
tBillboardBatch::tBillboardBatch( const tVector2d& offset, boost::shared_ptr<tTextureAtlas> xTextureAtlas, QList<tBillboardBatchItem>& billboards) : m_Billboards(billboards) , m_xTextureAtlas(xTextureAtlas) , m_xTextureUnitSettings(new tTextureUnitSettings()) , m_Offset(offset) , m_WorldTransform() , m_NumVertices(0) , m_xVBAccess() , m_xRenderOperation() , m_BatchLock("tGeoBillboardBatch::m_BatchLock") { m_xTextureUnitSettings->SetBlendSettings(tTextureUnitSettings::eTBP_Replace); UpdateWorldTransform(); m_InstanceCount++; }
cMatrixf& iEntity3D::GetWorldMatrix() { UpdateWorldTransform(); return m_mtxWorldTransform; }
cVector3f iEntity3D::GetWorldPosition() { UpdateWorldTransform(); return m_mtxWorldTransform.GetTranslation(); }
void ControlPointGob::Update(float dt) { UpdateWorldTransform(); UpdateWorldAABB(); }
cMatrixf& cNode3D::GetWorldMatrix() { UpdateWorldTransform(); return m_mtxWorldTransform; }