|
|
|
@ -786,7 +786,7 @@ CInterface3DCharacter::~CInterface3DCharacter()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
bool CInterface3DCharacter::parse (xmlNodePtr cur, CInterface3DScene *parentGroup)
|
|
|
|
|
bool CInterface3DCharacter::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup)
|
|
|
|
|
{
|
|
|
|
|
if (!CInterfaceElement::parse(cur, parentGroup))
|
|
|
|
|
return false;
|
|
|
|
@ -808,7 +808,7 @@ bool CInterface3DCharacter::parse (xmlNodePtr cur, CInterface3DScene *parentGrou
|
|
|
|
|
|
|
|
|
|
_Char3D = new CCharacter3D;
|
|
|
|
|
_Char3D->copyAnimation(copyAnim);
|
|
|
|
|
_Char3D->init (parentGroup->getScene());
|
|
|
|
|
_Char3D->init (dynamic_cast<CInterface3DScene*>(parentGroup)->getScene());
|
|
|
|
|
_Char3D->setPos (pos.x, pos.y, pos.z);
|
|
|
|
|
_Char3D->setRotEuler ( rot.x * ((float)(NLMISC::Pi / 180)),
|
|
|
|
|
rot.y * ((float)(NLMISC::Pi / 180)),
|
|
|
|
@ -1073,7 +1073,7 @@ CInterface3DIG::~CInterface3DIG()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
bool CInterface3DIG::parse (xmlNodePtr cur, CInterface3DScene *parentGroup)
|
|
|
|
|
bool CInterface3DIG::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup)
|
|
|
|
|
{
|
|
|
|
|
if (!CInterfaceElement::parse(cur, parentGroup))
|
|
|
|
|
return false;
|
|
|
|
@ -1095,8 +1095,8 @@ bool CInterface3DIG::parse (xmlNodePtr cur, CInterface3DScene *parentGroup)
|
|
|
|
|
setRotX (_Rot.x);
|
|
|
|
|
setRotY (_Rot.y);
|
|
|
|
|
setRotZ (_Rot.z);
|
|
|
|
|
_IG->addToScene (*parentGroup->getScene(), CViewRenderer::getInstance()->getDriver() );
|
|
|
|
|
parentGroup->getScene()->setToGlobalInstanceGroup (_IG);
|
|
|
|
|
_IG->addToScene (*dynamic_cast<CInterface3DScene*>(parentGroup)->getScene(), CViewRenderer::getInstance()->getDriver() );
|
|
|
|
|
dynamic_cast<CInterface3DScene*>(parentGroup)->getScene()->setToGlobalInstanceGroup (_IG);
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
@ -1235,7 +1235,7 @@ CInterface3DShape::~CInterface3DShape()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
bool CInterface3DShape::parse (xmlNodePtr cur, CInterface3DScene *parentGroup)
|
|
|
|
|
bool CInterface3DShape::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup)
|
|
|
|
|
{
|
|
|
|
|
if (!CInterfaceElement::parse(cur, parentGroup))
|
|
|
|
|
return false;
|
|
|
|
@ -1249,7 +1249,7 @@ bool CInterface3DShape::parse (xmlNodePtr cur, CInterface3DScene *parentGroup)
|
|
|
|
|
ptr = xmlGetProp (cur, (xmlChar*)"name");
|
|
|
|
|
if (ptr) _Name = toLower((const char*)ptr);
|
|
|
|
|
|
|
|
|
|
_Instance = parentGroup->getScene()->createInstance(_Name);
|
|
|
|
|
_Instance = dynamic_cast<CInterface3DScene*>(parentGroup)->getScene()->createInstance(_Name);
|
|
|
|
|
if (_Instance.empty())
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
@ -1385,7 +1385,7 @@ void CInterface3DShape::setName (const std::string &ht)
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
bool CInterface3DCamera::parse (xmlNodePtr cur, CInterface3DScene *parentGroup)
|
|
|
|
|
bool CInterface3DCamera::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup)
|
|
|
|
|
{
|
|
|
|
|
if (!CInterfaceElement::parse(cur, parentGroup))
|
|
|
|
|
return false;
|
|
|
|
@ -1422,12 +1422,12 @@ CInterface3DLight::~CInterface3DLight()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
bool CInterface3DLight::parse (xmlNodePtr cur, CInterface3DScene *parentGroup)
|
|
|
|
|
bool CInterface3DLight::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup)
|
|
|
|
|
{
|
|
|
|
|
if (!CInterfaceElement::parse(cur, parentGroup))
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
_Light = parentGroup->getScene()->createPointLight();
|
|
|
|
|
_Light = dynamic_cast<CInterface3DScene*>(parentGroup)->getScene()->createPointLight();
|
|
|
|
|
|
|
|
|
|
CXMLAutoPtr ptr((const char*)xmlGetProp (cur, (xmlChar*)"pos"));
|
|
|
|
|
if (ptr) _Pos = convertVector(ptr);
|
|
|
|
@ -1514,7 +1514,7 @@ CInterface3DFX::~CInterface3DFX()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
bool CInterface3DFX::parse (xmlNodePtr cur, CInterface3DScene *parentGroup)
|
|
|
|
|
bool CInterface3DFX::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup)
|
|
|
|
|
{
|
|
|
|
|
if (!CInterfaceElement::parse(cur, parentGroup))
|
|
|
|
|
return false;
|
|
|
|
|