Panda3D
panda
src
pgraphnodes
switchNode.I
Go to the documentation of this file.
1
/**
2
* PANDA 3D SOFTWARE
3
* Copyright (c) Carnegie Mellon University. All rights reserved.
4
*
5
* All use of this software is subject to the terms of the revised BSD
6
* license. You should have received a copy of this license along
7
* with this source code in a file named "LICENSE."
8
*
9
* @file switchNode.I
10
* @author drose
11
* @date 2002-07-31
12
*/
13
14
/**
15
*
16
*/
17
INLINE SwitchNode::CData::
18
CData() {
19
_visible_child = 0;
20
}
21
22
/**
23
*
24
*/
25
INLINE SwitchNode::CData::
26
CData(
const
SwitchNode::CData ©) :
27
_visible_child(copy._visible_child)
28
{
29
}
30
31
/**
32
*
33
*/
34
INLINE SwitchNode::
35
SwitchNode(
const
std::string &name) :
36
SelectiveChildNode
(name)
37
{
38
set_cull_callback();
39
}
40
41
/**
42
* Specifies the particular child of this node, by index, that will be
43
* visible.
44
*/
45
INLINE
void
SwitchNode::
46
set_visible_child
(
int
index) {
47
nassertv(index >= 0);
48
CDWriter cdata(_cycler);
49
cdata->_visible_child = index;
50
}
SwitchNode::set_visible_child
set_visible_child
Specifies the particular child of this node, by index, that will be visible.
Definition:
switchNode.h:44
SelectiveChildNode
A base class for nodes like LODNode and SequenceNode that select only one visible child at a time.
Definition:
selectiveChildNode.h:25
Generated on Mon Sep 14 2020 15:07:03 for Panda3D by
1.8.20