Commit d8c108d8 authored by cutealien's avatar cutealien

Collada loader now instantiates camera nodes which had been ignore so far (thx...

Collada loader now instantiates camera nodes which had been ignore so far (thx @NemoStein for the test .dae)

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4602 dfc29bdd-3216-0410-991c-e03cc46cb475
parent f94a8963
--------------------------
Changes in 1.9 (not yet released)
- Collada loader now instantiates camera nodes which had been ignore so far (thx @NemoStein for the test .dae)
- line2d::intersectWith has a new parameter to allow ignoring intersections with coincident lines
- vector2d::equals now has an tolerance parameter for passing the epsilon (like vector3d had). Note that this changes the default
behavior of vector2d::equals as well as functions using it like the operators for ==, !=, <, >, <=, >= when using vector2d with f64
......
......@@ -92,6 +92,7 @@ namespace
const core::stringc instanceMaterialName = "instance_material";
const core::stringc instanceLightName = "instance_light";
const core::stringc instanceNodeName = "instance_node";
const core::stringc instanceCameraName = "instance_camera";
const core::stringc bindMaterialName = "bind_material";
const core::stringc extraNodeName = "extra";
const core::stringc techniqueNodeName = "technique";
......@@ -254,7 +255,7 @@ namespace
os::Printer::log("COLLADA: Constructing camera instance", Id.c_str(), ELL_DEBUG);
#endif
scene::ICameraSceneNode* c = mgr->addCameraSceneNode(parent);
scene::ICameraSceneNode* c = mgr->addCameraSceneNode(parent, core::vector3df(0,0,0), core::vector3df(0,0,100), -1, false);
if (c)
{
c->setFOV(YFov);
......@@ -789,7 +790,9 @@ void CColladaFileLoader::readNodeSection(io::IXMLReaderUTF8* reader, scene::ISce
if ((instanceName == reader->getNodeName()) ||
(instanceNodeName == reader->getNodeName()) ||
(instanceGeometryName == reader->getNodeName()) ||
(instanceLightName == reader->getNodeName()))
(instanceLightName == reader->getNodeName()) ||
(instanceCameraName == reader->getNodeName())
)
{
scene::ISceneNode* newnode = 0;
readInstanceNode(reader, parent, &newnode, nodeprefab, reader->getNodeName());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment