Panda3D
Public Member Functions | Public Attributes | List of all members
MaxNodeTree Class Reference

Describes a complete tree of max nodes for conversion. More...

#include "maxNodeTree.h"

Public Member Functions

bool build_complete_hierarchy (INode *root, ULONG *selection_list, int len)
 Walks through the complete Max hierarchy and builds up the corresponding tree. More...
 
MaxNodeDescbuild_joint (INode *max_node, MaxNodeDesc *node_joint)
 Returns a pointer to the node corresponding to the indicated INode object, creating it first if necessary. More...
 
MaxNodeDescbuild_node (INode *max_node)
 Returns a pointer to the node corresponding to the indicated INode object, creating it first if necessary. More...
 
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 generating new egg structures. More...
 
MaxNodeDescfind_joint (INode *max_node)
 The recursive implementation of build_node(). More...
 
MaxNodeDescfind_node (INode *max_node)
 The recursive implementation of build_node(). More...
 
EggXfmSAnimget_egg_anim (MaxNodeDesc *node_desc)
 Returns the anim table corresponding to the joint for the indicated node. More...
 
EggGroupget_egg_group (MaxNodeDesc *node_desc)
 Returns the EggGroupNode corresponding to the group or joint for the indicated node. More...
 
EggTableget_egg_table (MaxNodeDesc *node_desc)
 Returns the EggTable corresponding to the joint for the indicated node. More...
 
MaxNodeDescget_node (int n) const
 Returns the nth node in the hierarchy, in an arbitrary ordering. More...
 
int get_num_nodes () const
 Returns the total number of nodes in the hierarchy, not counting the root node. More...
 

Public Attributes

bool _export_mesh
 
PN_stdfloat _fps
 
MaxNodeDesc_root
 

Detailed Description

Describes a complete tree of max nodes for conversion.

Definition at line 27 of file maxNodeTree.h.

Member Function Documentation

◆ build_complete_hierarchy()

bool MaxNodeTree::build_complete_hierarchy ( INode *  root,
ULONG *  selection_list,
int  len 
)

Walks through the complete Max hierarchy and builds up the corresponding tree.

Definition at line 100 of file maxNodeTree.cxx.

References get_num_nodes().

Referenced by build_joint(), and MaxToEggConverter::convert().

◆ build_joint()

MaxNodeDesc * MaxNodeTree::build_joint ( INode *  max_node,
MaxNodeDesc node_joint 
)

Returns a pointer to the node corresponding to the indicated INode object, creating it first if necessary.

Definition at line 59 of file maxNodeTree.cxx.

References build_complete_hierarchy(), build_node(), and MaxNodeDesc::from_INode().

Referenced by build_node().

◆ build_node()

MaxNodeDesc * MaxNodeTree::build_node ( INode *  max_node)

Returns a pointer to the node corresponding to the indicated INode object, creating it first if necessary.

Definition at line 41 of file maxNodeTree.cxx.

References build_joint(), MaxNodeDesc::from_INode(), and MaxNodeDesc::is_node_joint().

Referenced by build_joint(), and find_joint().

◆ clear_egg()

void MaxNodeTree::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 generating new egg structures.

Definition at line 149 of file maxNodeTree.cxx.

References get_egg_group().

Referenced by MaxToEggConverter::convert(), and get_node().

◆ find_joint()

MaxNodeDesc * MaxNodeTree::find_joint ( INode *  max_node)

The recursive implementation of build_node().

Definition at line 356 of file maxNodeTree.cxx.

References build_node(), find_node(), MaxNodeDesc::get_max_node(), and MaxNodeDesc::is_node_joint().

Referenced by MaxToEggConverter::convert(), and find_node().

◆ find_node()

MaxNodeDesc * MaxNodeTree::find_node ( INode *  max_node)

The recursive implementation of build_node().

Definition at line 332 of file maxNodeTree.cxx.

References find_joint().

Referenced by find_joint(), and get_egg_anim().

◆ get_egg_anim()

EggXfmSAnim * MaxNodeTree::get_egg_anim ( MaxNodeDesc node_desc)

Returns the anim table corresponding to the joint for the indicated node.

Creates the table node if it has not already been created.

Definition at line 252 of file maxNodeTree.cxx.

References find_node(), get_egg_table(), and MaxNodeDesc::is_node_joint().

Referenced by MaxToEggConverter::convert(), and get_egg_table().

◆ get_egg_group()

EggGroup * MaxNodeTree::get_egg_group ( MaxNodeDesc node_desc)

Returns the EggGroupNode corresponding to the group or joint for the indicated node.

Creates the group node if it has not already been created.

Definition at line 165 of file maxNodeTree.cxx.

References EggGroupNode::add_child(), get_egg_table(), and MaxNodeDesc::is_joint().

Referenced by clear_egg(), and MaxToEggConverter::convert().

◆ get_egg_table()

EggTable * MaxNodeTree::get_egg_table ( MaxNodeDesc node_desc)

Returns the EggTable corresponding to the joint for the indicated node.

Creates the table node if it has not already been created.

Definition at line 214 of file maxNodeTree.cxx.

References EggGroupNode::add_child(), EggData::get_coordinate_system(), get_egg_anim(), and MaxNodeDesc::is_joint().

Referenced by get_egg_anim(), and get_egg_group().

◆ get_node()

MaxNodeDesc * MaxNodeTree::get_node ( int  n) const

Returns the nth node in the hierarchy, in an arbitrary ordering.

Definition at line 136 of file maxNodeTree.cxx.

References clear_egg().

Referenced by MaxToEggConverter::convert(), and get_num_nodes().

◆ get_num_nodes()

int MaxNodeTree::get_num_nodes ( ) const

Returns the total number of nodes in the hierarchy, not counting the root node.

Definition at line 125 of file maxNodeTree.cxx.

References get_node().

Referenced by build_complete_hierarchy(), and MaxToEggConverter::convert().


The documentation for this class was generated from the following files: