Panda3D
Loading...
Searching...
No Matches
maxNodeTree.h
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 maxNodeTree.h
10 * @author crevilla
11 * from mayaNodeTree.h created by: drose (06Jun03)
12 */
13
14#ifndef MAXNODETREE_H
15#define MAXNODETREE_H
16
17class EggData;
18class EggGroupNode;
19
20/**
21 * Describes a complete tree of max nodes for conversion.
22 */
24public:
26 MaxNodeDesc *build_node(INode *max_node);
27 MaxNodeDesc *build_joint(INode *max_node, MaxNodeDesc *node_joint);
28 bool build_complete_hierarchy(INode *root, ULONG *selection_list, int len);
29 MaxNodeDesc *find_node(INode *max_node);
30 MaxNodeDesc *find_joint(INode *max_node);
31
32 int get_num_nodes() const;
33 MaxNodeDesc *get_node(int n) const;
34
35 void clear_egg(EggData *egg_data, EggGroupNode *egg_root,
36 EggGroupNode *skeleton_node);
40
41 MaxNodeDesc* _root;
42 PN_stdfloat _fps;
43 // the flag for the setting up collision bool _has_collision;
44 // EggGroup::CollideFlags _cf_type; EggGroup::CollisionSolidType _cs_type;
45 bool _export_mesh;
46
47private:
48 EggData *_egg_data;
49 EggGroupNode *_egg_root;
50 EggGroupNode *_skeleton_node;
51
52 MaxNodeDesc *r_build_node(INode *max_node);
53 MaxNodeDesc *r_build_joint(MaxNodeDesc *node_desc, INode *max_node);
54 bool node_in_list(ULONG handle, ULONG *list, int len);
55 bool r_build_hierarchy(INode *root, ULONG *selection_list, int len);
56 bool is_joint(INode *node);
57 void set_collision_tags(MaxNodeDesc *node_desc, EggGroup *egg_group);
58
60 NodesByPath _nodes_by_path;
61
63 Nodes _nodes;
64};
65
66#endif
This is the primary interface into all the egg data, and the root of the egg file structure.
Definition eggData.h:37
A base class for nodes in the hierarchy that are not leaf nodes.
The main glue of the egg hierarchy, this corresponds to the <Group>, <Instance>, and <Joint> type nod...
Definition eggGroup.h:34
This corresponds to a.
Definition eggTable.h:27
This corresponds to an <Xfm$Anim_S$> entry, which is a collection of up to nine entries that specify...
Definition eggXfmSAnim.h:28
Describes a single instance of a node in the Max scene graph, relating it to the corresponding egg st...
Definition maxNodeDesc.h:22
Describes a complete tree of max nodes for conversion.
Definition maxNodeTree.h:23
bool build_complete_hierarchy(INode *root, ULONG *selection_list, int len)
Walks through the complete Max hierarchy and builds up the corresponding tree.
MaxNodeDesc * build_joint(INode *max_node, MaxNodeDesc *node_joint)
Returns a pointer to the node corresponding to the indicated INode object, creating it first if neces...
int get_num_nodes() const
Returns the total number of nodes in the hierarchy, not counting the root node.
MaxNodeDesc * find_node(INode *max_node)
The recursive implementation of build_node().
MaxNodeDesc * build_node(INode *max_node)
Returns a pointer to the node corresponding to the indicated INode object, creating it first if neces...
EggXfmSAnim * get_egg_anim(MaxNodeDesc *node_desc)
Returns the anim table corresponding to the joint for the indicated node.
EggGroup * get_egg_group(MaxNodeDesc *node_desc)
Returns the EggGroupNode corresponding to the group or joint for the indicated node.
EggTable * get_egg_table(MaxNodeDesc *node_desc)
Returns the EggTable corresponding to the joint for the indicated node.
MaxNodeDesc * find_joint(INode *max_node)
The recursive implementation of build_node().
MaxNodeDesc * get_node(int n) const
Returns the nth node in the hierarchy, in an arbitrary ordering.
void clear_egg(EggData *egg_data, EggGroupNode *egg_root, EggGroupNode *skeleton_node)
Removes all of the references to generated egg structures from the tree, and prepares the tree for ge...
This is our own Panda specialization on the default STL map.
Definition pmap.h:49
This is our own Panda specialization on the default STL vector.
Definition pvector.h:42