Implemented animated textures

Applied workaround (hack) for issue that caused incorrect model matrices to be applied to instances.

--HG--
extra : convert_revision : svn%3A7752d6cf-9f14-4ad2-affc-04f1e67b81a5/trunk%40170
This commit is contained in:
kearwood
2012-11-29 23:44:50 +00:00
parent f49abf6a9d
commit 12a6bfe3ca
9 changed files with 249 additions and 11 deletions

View File

@@ -87,12 +87,16 @@ void KRNode::loadXML(tinyxml2::XMLElement *e) {
e->QueryFloatAttribute("rotate_z", &z);
m_localRotation = KRVector3(x,y,z) / 180.0 * M_PI; // Convert degrees to radians
m_modelMatrixValid = false;
for(tinyxml2::XMLElement *child_element=e->FirstChildElement(); child_element != NULL; child_element = child_element->NextSiblingElement()) {
KRNode *child_node = KRNode::LoadXML(getScene(), child_element);
if(child_node) {
addChild(child_node);
}
}
}
void KRNode::setLocalTranslation(const KRVector3 &v) {
@@ -224,7 +228,7 @@ const KRMat4 &KRNode::getModelMatrix()
// if(m_parentNode) {
// m_modelMatrix *= m_parentNode->getModelMatrix();
// }
//
m_modelMatrixValid = true;
}