Browse Source

- Collada: read falloff and hotspot_beam spotlight properties to be compatible with OpenCollada. Thanks to gargaj for the patch.

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@1201 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
aramis_acg 13 năm trước cách đây
mục cha
commit
b908b00f96
1 tập tin đã thay đổi với 8 bổ sung0 xóa
  1. 8 0
      code/ColladaParser.cpp

+ 8 - 0
code/ColladaParser.cpp

@@ -1026,6 +1026,14 @@ void ColladaParser::ReadLight( Collada::Light& pLight)
 				pLight.mIntensity = ReadFloatFromTextContent();
 				TestClosing("intensity");
 			}
+			else if (IsElement("falloff")) {
+				pLight.mOuterAngle = ReadFloatFromTextContent();
+				TestClosing("falloff");
+			}
+			else if (IsElement("hotspot_beam")) {
+				pLight.mFalloffAngle = ReadFloatFromTextContent();
+				TestClosing("hotspot_beam");
+			}
 		}
 		else if( mReader->getNodeType() == irr::io::EXN_ELEMENT_END) {
 			if( strcmp( mReader->getNodeName(), "light") == 0)