Changeset 9869 in orxonox.OLD for trunk/src/lib/graphics/render2D/element_2d.cc
- Timestamp:
- Oct 3, 2006, 12:19:30 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/render2D/element_2d.cc
r9406 r9869 29 29 #include "graphics_engine.h" 30 30 #include "util/loading/load_param.h" 31 #include "class_list.h"32 31 33 32 #include "color.h" 34 33 #include "debug.h" 35 34 #include "shell_command.h" 35 36 36 SHELL_COMMAND(debug, Element2D, debug2D); 37 38 ObjectListDefinition(Element2D); 37 39 38 40 … … 46 48 Element2D::Element2D (Element2D* parent, E2D_LAYER layer, short nodeFlags) 47 49 { 48 this-> setClassID(CL_ELEMENT_2D, "Element2D");50 this->registerObject(this, Element2D::_objectList); 49 51 50 52 this->setVisibility(true); … … 268 270 void Element2D::setBindNode(const std::string& bindNode) 269 271 { 270 const PNode* tmpBindNode = dynamic_cast<const PNode*>(ClassList::getObject(bindNode, CL_PARENT_NODE));272 const PNode* tmpBindNode = PNode::objectList().getObject(bindNode); 271 273 if (tmpBindNode != NULL) 272 274 this->bindNode = tmpBindNode; … … 640 642 void Element2D::addChild2D (const std::string& childName) 641 643 { 642 Element2D* childNode = dynamic_cast<Element2D*>(ClassList::getObject(childName, CL_ELEMENT_2D));644 Element2D* childNode = Element2D::objectList().getObject(childName); 643 645 if (childNode != NULL) 644 646 this->addChild2D(childNode); … … 718 720 void Element2D::setParent2D (const std::string& parentName) 719 721 { 720 Element2D* parentNode = dynamic_cast<Element2D*>(ClassList::getObject(parentName, CL_ELEMENT_2D));722 Element2D* parentNode = Element2D::objectList().getObject(parentName); 721 723 if (parentNode != NULL) 722 724 parentNode->addChild2D(this); … … 771 773 void Element2D::setParentSoft2D(const std::string& parentName, float bias) 772 774 { 773 Element2D* parentNode = dynamic_cast<Element2D*>(ClassList::getObject(parentName, CL_ELEMENT_2D));775 Element2D* parentNode = Element2D::objectList().getObject(parentName); 774 776 if (parentNode != NULL) 775 777 this->setParentSoft2D(parentNode, bias);
Note: See TracChangeset
for help on using the changeset viewer.