Changeset 9685 in orxonox.OLD for branches/new_class_id/src/lib/graphics/render2D/element_2d.cc
- Timestamp:
- Aug 22, 2006, 1:16:23 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/new_class_id/src/lib/graphics/render2D/element_2d.cc
r9406 r9685 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" … … 35 34 #include "shell_command.h" 36 35 SHELL_COMMAND(debug, Element2D, debug2D); 36 37 NewObjectListDefinition(Element2D); 37 38 38 39 … … 46 47 Element2D::Element2D (Element2D* parent, E2D_LAYER layer, short nodeFlags) 47 48 { 48 this-> setClassID(CL_ELEMENT_2D, "Element2D");49 this->registerObject(this, Element2D::_objectList); 49 50 50 51 this->setVisibility(true); … … 268 269 void Element2D::setBindNode(const std::string& bindNode) 269 270 { 270 const PNode* tmpBindNode = dynamic_cast<const PNode*>(ClassList::getObject(bindNode, CL_PARENT_NODE));271 const PNode* tmpBindNode = PNode::objectList().getObject(bindNode); 271 272 if (tmpBindNode != NULL) 272 273 this->bindNode = tmpBindNode; … … 640 641 void Element2D::addChild2D (const std::string& childName) 641 642 { 642 Element2D* childNode = dynamic_cast<Element2D*>(ClassList::getObject(childName, CL_ELEMENT_2D));643 Element2D* childNode = Element2D::objectList().getObject(childName); 643 644 if (childNode != NULL) 644 645 this->addChild2D(childNode); … … 718 719 void Element2D::setParent2D (const std::string& parentName) 719 720 { 720 Element2D* parentNode = dynamic_cast<Element2D*>(ClassList::getObject(parentName, CL_ELEMENT_2D));721 Element2D* parentNode = Element2D::objectList().getObject(parentName); 721 722 if (parentNode != NULL) 722 723 parentNode->addChild2D(this); … … 771 772 void Element2D::setParentSoft2D(const std::string& parentName, float bias) 772 773 { 773 Element2D* parentNode = dynamic_cast<Element2D*>(ClassList::getObject(parentName, CL_ELEMENT_2D));774 Element2D* parentNode = Element2D::objectList().getObject(parentName); 774 775 if (parentNode != NULL) 775 776 this->setParentSoft2D(parentNode, bias);
Note: See TracChangeset
for help on using the changeset viewer.