Panda3D

selectiveChildNode.I

00001 // Filename: selectiveChildNode.I
00002 // Created by:  drose (06Mar02)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 
00016 ////////////////////////////////////////////////////////////////////
00017 //     Function: SelectiveChildNode::Constructor
00018 //       Access: Public
00019 //  Description:
00020 ////////////////////////////////////////////////////////////////////
00021 INLINE SelectiveChildNode::
00022 SelectiveChildNode(const string &name) :
00023   PandaNode(name),
00024   _selected_child(0)
00025 {
00026 }
00027 
00028 ////////////////////////////////////////////////////////////////////
00029 //     Function: SelectiveChildNode::Copy Constructor
00030 //       Access: Protected
00031 //  Description:
00032 ////////////////////////////////////////////////////////////////////
00033 INLINE SelectiveChildNode::
00034 SelectiveChildNode(const SelectiveChildNode &copy) :
00035   PandaNode(copy),
00036   _selected_child(copy._selected_child)
00037 {
00038 }
00039 
00040 ////////////////////////////////////////////////////////////////////
00041 //     Function: SelectiveChildNode::select_child
00042 //       Access: Protected
00043 //  Description: Selects the indicated child for rendering.  This is
00044 //               normally called during the cull_callback() method,
00045 //               but it may be called at any time.
00046 ////////////////////////////////////////////////////////////////////
00047 INLINE void SelectiveChildNode::
00048 select_child(int n) {
00049   nassertv(n >= 0);
00050   _selected_child = n;
00051 }
 All Classes Functions Variables Enumerations