Changeset 8360 in orxonox.OLD for trunk/src/lib
- Timestamp:
- Jun 14, 2006, 9:46:00 AM (18 years ago)
- Location:
- trunk/src/lib/graphics/render2D
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/render2D/element_2d.cc
r8316 r8360 34 34 35 35 #include "shell_command.h" 36 SHELL_COMMAND(debug, Element2D, debug2D SC);36 SHELL_COMMAND(debug, Element2D, debug2D); 37 37 38 38 … … 1072 1072 /** 1073 1073 * @brief draws all the Elements from this element2D downwards 1074 * @param layer the maximal Layer to draw. @see E2D_LAYER 1074 * @param from the minimal Layer to draw. @see E2D_LAYER 1075 * @param to the maximal Layer to draw. @see E2D_LAYER 1076 * 1075 1077 */ 1076 1078 void Element2D::draw2D(E2D_LAYER from, E2D_LAYER to) const 1077 1079 { 1078 1080 if (this->isVisible()) 1081 { 1079 1082 this->draw(); 1080 if (this->children.size() > 0) 1083 this->drawChildren(from, to); 1084 } 1085 else if ((parentMode & E2D_HIDE_CHILDREN_IF_HIDDEN) == 0) 1086 this->drawChildren(from, to); 1087 } 1088 1089 /** 1090 * @brief Draws the Children of the Element2D node. 1091 * @param param the minimal Layer to draw. @see E2D_LAYER 1092 * @param to the maximal Layer to draw. @see E2D_LAYER 1093 */ 1094 void Element2D::drawChildren(E2D_LAYER from, E2D_LAYER to) const 1095 { 1096 if (likely(this->children.size() > 0)) 1081 1097 { 1082 1098 std::list<Element2D*>::const_iterator child; … … 1086 1102 } 1087 1103 } 1104 1088 1105 1089 1106 /** -
trunk/src/lib/graphics/render2D/element_2d.h
r8035 r8360 69 69 // VISIBILITY/ACTIVITY 70 70 E2D_HIDE_CHILDREN_IF_HIDDEN = 0x1000, //!< Prohibits the Children from being drawn if this node isn't visible. (used for Draw)) 71 E2D_HIDE_IF_PARENT_HIDDEN = 0x2000, //!< Prohibits the node from being drawn if the Parent is invisible.71 //E2D_HIDE_IF_PARENT_HIDDEN = 0x2000, //!< Prohibits the node from being drawn if the Parent is invisible. 72 72 E2D_UPDATE_CHILDREN_IF_INACTIVE = 0x4000, //!< Updates the Children of this Node even if the Parent is Inactive (note if this's parent is inactive children won't be updated.) 73 73 E2D_STATIC_NODE = 0x8000, //!< Used for nodes that do not have any moving children, and that do not move. … … 139 139 void tick2D(float dt); 140 140 void draw2D(E2D_LAYER from, E2D_LAYER to) const; 141 void drawChildren(E2D_LAYER from, E2D_LAYER to) const; 141 142 142 143 // LIKE PNODE … … 216 217 217 218 void debug2D (unsigned int depth = 1, unsigned int level = 0) const; 218 void debug2DSC (unsigned int depth = 1, unsigned int level = 0) { this->debug2D(depth, level); }; // Wrapping Function for ShellCommand.219 219 void debugDraw2D(unsigned int depth = 1, float size = 1.0, Vector color = Vector(1,0,0), unsigned int level = 0) const; 220 220
Note: See TracChangeset
for help on using the changeset viewer.