Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 3, 2006, 12:19:30 AM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: merged the new_class_id branche back to the trunk.
merged with command:
svn merge https://svn.orxonox.net/orxonox/branches/new_class_id trunk -r9683:HEAD
no conflicts… puh..

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/render2D/element_2d.cc

    r9406 r9869  
    2929#include "graphics_engine.h"
    3030#include "util/loading/load_param.h"
    31 #include "class_list.h"
    3231
    3332#include "color.h"
    34 
     33#include "debug.h"
    3534#include "shell_command.h"
     35
    3636SHELL_COMMAND(debug, Element2D, debug2D);
     37
     38ObjectListDefinition(Element2D);
    3739
    3840
     
    4648Element2D::Element2D (Element2D* parent, E2D_LAYER layer, short nodeFlags)
    4749{
    48   this->setClassID(CL_ELEMENT_2D, "Element2D");
     50  this->registerObject(this, Element2D::_objectList);
    4951
    5052  this->setVisibility(true);
     
    268270void Element2D::setBindNode(const std::string& bindNode)
    269271{
    270   const PNode* tmpBindNode = dynamic_cast<const PNode*>(ClassList::getObject(bindNode, CL_PARENT_NODE));
     272  const PNode* tmpBindNode = PNode::objectList().getObject(bindNode);
    271273  if (tmpBindNode != NULL)
    272274    this->bindNode = tmpBindNode;
     
    640642void Element2D::addChild2D (const std::string& childName)
    641643{
    642   Element2D* childNode = dynamic_cast<Element2D*>(ClassList::getObject(childName, CL_ELEMENT_2D));
     644  Element2D* childNode = Element2D::objectList().getObject(childName);
    643645  if (childNode != NULL)
    644646    this->addChild2D(childNode);
     
    718720void Element2D::setParent2D (const std::string& parentName)
    719721{
    720   Element2D* parentNode = dynamic_cast<Element2D*>(ClassList::getObject(parentName, CL_ELEMENT_2D));
     722  Element2D* parentNode = Element2D::objectList().getObject(parentName);
    721723  if (parentNode != NULL)
    722724    parentNode->addChild2D(this);
     
    771773void Element2D::setParentSoft2D(const std::string& parentName, float bias)
    772774{
    773   Element2D* parentNode = dynamic_cast<Element2D*>(ClassList::getObject(parentName, CL_ELEMENT_2D));
     775  Element2D* parentNode = Element2D::objectList().getObject(parentName);
    774776  if (parentNode != NULL)
    775777    this->setParentSoft2D(parentNode, bias);
Note: See TracChangeset for help on using the changeset viewer.