Panda3D
panda
src
chan
partBundleNode.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 partBundleNode.I
10
* @author drose
11
* @date 2002-03-06
12
*/
13
14
/**
15
* The PartBundle and its node should be constructed together. Generally, the
16
* derived classes of PartBundleNode will automatically create a PartBundle of
17
* the appropriate type, and pass it up to this constructor.
18
*/
19
INLINE PartBundleNode::
20
PartBundleNode(
const
std::string &name,
PartBundle
*bundle) :
21
PandaNode
(name)
22
{
23
add_bundle(bundle);
24
}
25
26
/**
27
* For internal use only.
28
*/
29
INLINE PartBundleNode::
30
PartBundleNode() :
PandaNode
(
""
) {
31
}
32
33
/**
34
* Use make_copy() or copy_subgraph() to copy one of these.
35
*
36
* This constructor does not copy the bundle pointers.
37
*/
38
INLINE PartBundleNode::
39
PartBundleNode(
const
PartBundleNode
©) :
40
PandaNode
(copy)
41
{
42
}
43
44
/**
45
*
46
*/
47
INLINE
int
PartBundleNode::
48
get_num_bundles()
const
{
49
return
_bundles.size();
50
}
51
52
/**
53
*
54
*/
55
INLINE
PartBundle
*PartBundleNode::
56
get_bundle(
int
n)
const
{
57
nassertr(n >= 0 && n < (
int
)_bundles.size(),
nullptr
);
58
return
_bundles[n]->get_bundle();
59
}
60
61
/**
62
* Returns the PartBundleHandle that wraps around the actual nth PartBundle.
63
* While the PartBundle pointer might later change due to a future flatten
64
* operation, the PartBundleHandle will not.
65
*/
66
INLINE
PartBundleHandle
*
PartBundleNode::
67
get_bundle_handle
(
int
n)
const
{
68
nassertr(n >= 0 && n < (
int
)_bundles.size(),
nullptr
);
69
return
_bundles[n];
70
}
PartBundleNode
This is a node that contains a pointer to an PartBundle.
Definition:
partBundleNode.h:35
PartBundleHandle
This is a trivial class returned by PartBundleNode::get_bundle().
Definition:
partBundleHandle.h:33
PartBundleNode::get_bundle_handle
get_bundle_handle
Returns the PartBundleHandle that wraps around the actual nth PartBundle.
Definition:
partBundleNode.h:55
PandaNode
A basic node of the scene graph or data graph.
Definition:
pandaNode.h:64
PartBundle
This is the root of a MovingPart hierarchy.
Definition:
partBundle.h:46
Generated on Sat Jan 11 2020 15:14:44 for Panda3D by
1.8.17