Changes between Version 1 and Version 2 of ~archive/ParentNode
- Timestamp:
- Nov 28, 2007, 12:22:34 AM (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
~archive/ParentNode
v1 v2 1 = ParentNode (PNode) = 2 The ParentNode is one element of a Tree spanning all the 3D-elements that have a position and rotation inside of the world. 1 = !ParentNode (PNode) = 2 [[ArchivePage]] 3 4 The !ParentNode is one element of a Tree spanning all the 3D-elements that have a position and rotation inside of the world. 3 5 4 6 source:/trunk/src/lib/coord/p_node.h#HEAD 5 7 Dependencies: 6 * BaseObject8 * [wiki:archive/BaseObject BaseObject] 7 9 8 10 == Description == 9 ParentNode has a ...11 !ParentNode has a ... 10 12 * __Parent__ (another PNode it is connected to) 11 * the '''topmost''' is ''' NullParent'''12 * if the '''Parent''' is '''Null''', the Node is __free__ (or the NullParent)13 * the '''topmost''' is '''!NullParent''' 14 * if the '''Parent''' is '''Null''', the Node is __free__ (or the !NullParent) 13 15 * list of __Children__. 14 * each child is again a ParentNode16 * each child is again a !ParentNode 15 17 * each child will be updated acordingly if the Parent is moved/rotated. 16 18 * __Position__ (absolute in the world and relative to its parent) 17 19 * __Rotation__ (absolute in the world and relative to its parent) 18 20 19 ParentNode is not able to ...20 * draw itself (this can be done for example with extension WorldEntity)21 * tick itself (this can be done for example with extension WorldEntity)21 !ParentNode is not able to ... 22 * draw itself (this can be done for example with extension [wiki:archive/WorldEntity WorldEntity]) 23 * tick itself (this can be done for example with extension [wiki:archive/WorldEntity WorldEntity]) 22 24 23 25 == Usage == 24 Whenever you create a new Entity in the World, that is a PNode (ex. WorldEntity Player...), it will automatically be added to the PNode tree.25 By default each PNode is added to the NullParent as a child.26 Whenever you create a new Entity in the World, that is a PNode (ex. !WorldEntity Player...), it will automatically be added to the PNode tree. 27 By default each PNode is added to the !NullParent as a child. 26 28 27 29 Now, what is this good for? … … 41 43 void setParentMode (PARENT_MODE parentMode); 42 44 }}} 43 These are the main functions of ParentNode, if you understand them you understand PNode :)[[br]]45 These are the main functions of !ParentNode, if you understand them you understand PNode :)[[br]] 44 46 Most of the functions speak for themselves, but '''setParentMode''' maybe needs some explanation: 45 47 There are __different modes__ to connect Children to their Parents: … … 54 56 55 57 __DEBUG__ 56 Functions, that are really usefull when debug ParentNode's, they can put out nice output or paint the nodes of the selectedParentNode, and of all its Children and children's children if you'd like.58 Functions, that are really usefull when debug !ParentNode's, they can put out nice output or paint the nodes of the selected !ParentNode, and of all its Children and children's children if you'd like. 57 59 {{{ 58 60 #!cpp