Panda3D
 All Classes Functions Variables Enumerations
selectiveChildNode.I
1 // Filename: selectiveChildNode.I
2 // Created by: drose (06Mar02)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 
16 ////////////////////////////////////////////////////////////////////
17 // Function: SelectiveChildNode::Constructor
18 // Access: Public
19 // Description:
20 ////////////////////////////////////////////////////////////////////
21 INLINE SelectiveChildNode::
22 SelectiveChildNode(const string &name) :
23  PandaNode(name),
24  _selected_child(0)
25 {
26 }
27 
28 ////////////////////////////////////////////////////////////////////
29 // Function: SelectiveChildNode::Copy Constructor
30 // Access: Protected
31 // Description:
32 ////////////////////////////////////////////////////////////////////
33 INLINE SelectiveChildNode::
34 SelectiveChildNode(const SelectiveChildNode &copy) :
35  PandaNode(copy),
36  _selected_child(copy._selected_child)
37 {
38 }
39 
40 ////////////////////////////////////////////////////////////////////
41 // Function: SelectiveChildNode::select_child
42 // Access: Protected
43 // Description: Selects the indicated child for rendering. This is
44 // normally called during the cull_callback() method,
45 // but it may be called at any time.
46 ////////////////////////////////////////////////////////////////////
47 INLINE void SelectiveChildNode::
48 select_child(int n) {
49  nassertv(n >= 0);
50  _selected_child = n;
51 }
A basic node of the scene graph or data graph.
Definition: pandaNode.h:72
A base class for nodes like LODNode and SequenceNode that select only one visible child at a time...