Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

BamToEgg Class Reference

#include <bamToEgg.h>

Inheritance diagram for BamToEgg:

SomethingToEgg EggConverter EggFilter EggReader EggWriter EggBase EggBase WithOutputFile ProgramBase ProgramBase List of all members.

Public Member Functions

 BamToEgg ()
void run ()

Private Member Functions

void convert_node (const WorkingNodePath &node_path, EggGroupNode *egg_parent, bool has_decal)
void convert_lod_node (LODNode *node, const WorkingNodePath &node_path, EggGroupNode *egg_parent, bool has_decal)
void convert_geom_node (GeomNode *node, const WorkingNodePath &node_path, EggGroupNode *egg_parent, bool has_decal)
void convert_geom_tri (GeomTri *geom, const RenderState *net_state, const LMatrix4f &net_mat, EggGroupNode *egg_parent)
void recurse_nodes (const WorkingNodePath &node_path, EggGroupNode *egg_parent, bool has_decal)
bool apply_node_properties (EggGroup *egg_group, PandaNode *node)
EggTextureget_egg_texture (Texture *tex)

Private Attributes

EggVertexPool_vpool
EggTextureCollection _textures
EggMaterialCollection _materials

Constructor & Destructor Documentation

BamToEgg::BamToEgg  ) 
 

Definition at line 54 of file bamToEgg.cxx.

References EggBase::_coordinate_system, EggConverter::_format_name, ProgramBase::add_path_replace_options(), ProgramBase::add_path_store_options(), default_coordinate_system, format_string(), ProgramBase::redescribe_option(), and ProgramBase::set_program_description().


Member Function Documentation

bool BamToEgg::apply_node_properties EggGroup egg_group,
PandaNode node
[private]
 

Definition at line 417 of file bamToEgg.cxx.

References EggGroup::add_object_type(), EggTransform3d::add_rotate(), EggTransform3d::add_scale(), EggTransform3d::add_translate(), EggGroup::BT_axis, EggGroup::BT_point_camera_relative, EggGroup::BT_point_world_relative, BillboardEffect::get_axial_rotate(), RenderEffects::get_billboard(), PandaNode::get_draw_mask(), PandaNode::get_effects(), BillboardEffect::get_eye_relative(), PandaNode::get_transform(), LCAST, NULL, scale, EggGroup::set_billboard_type(), EggTransform3d::set_transform(), and transform.

Referenced by convert_geom_node(), convert_lod_node(), and convert_node().

void BamToEgg::convert_geom_node GeomNode node,
const WorkingNodePath node_path,
EggGroupNode egg_parent,
bool  has_decal
[private]
 

Definition at line 209 of file bamToEgg.cxx.

References apply_node_properties(), convert_geom_tri(), CPT, DCAST, Geom::explode(), Geom::get_class_type(), PandaNode::get_effects(), GeomNode::get_geom(), GeomNode::get_geom_state(), Namable::get_name(), WorkingNodePath::get_node_path(), EggNode::get_vertex_frame_inv(), RenderEffects::has_decal(), LCAST, ProgramBase::PT(), and recurse_nodes().

Referenced by convert_node().

void BamToEgg::convert_geom_tri GeomTri geom,
const RenderState net_state,
const LMatrix4f &  net_mat,
EggGroupNode egg_parent
[private]
 

Definition at line 264 of file bamToEgg.cxx.

References _vpool, EggPrimitive::add_vertex(), Colorf, EggVertexPool::create_unique_vertex(), DCAST, G_COLOR, G_COORD, G_NORMAL, G_OFF, G_OVERALL, G_PER_PRIM, G_PER_VERTEX, G_TEXCOORD, GeomBindType, RenderState::get_attrib(), CullFaceAttrib::get_class_type(), TextureAttrib::get_class_type(), ColorAttrib::get_class_type(), ColorScaleAttrib::get_class_type(), ColorAttrib::get_color(), ColorAttrib::get_color_type(), CullFaceAttrib::get_effective_mode(), get_egg_texture(), Geom::get_next_color(), Geom::get_next_normal(), Geom::get_next_texcoord(), Geom::get_next_vertex(), Geom::get_num_prims(), ColorScaleAttrib::get_scale(), TextureAttrib::get_texture(), LCAST, Geom::make_color_iterator(), Geom::make_normal_iterator(), Geom::make_texcoord_iterator(), Geom::make_vertex_iterator(), Normalf, NULL, EggPrimitive::set_bface_flag(), EggAttributes::set_color(), EggAttributes::set_normal(), EggVertex::set_pos(), EggPrimitive::set_texture(), EggAttributes::set_uv(), ColorAttrib::T_flat, ColorAttrib::T_off, TexCoordf, and Vertexf.

Referenced by convert_geom_node().

void BamToEgg::convert_lod_node LODNode node,
const WorkingNodePath node_path,
EggGroupNode egg_parent,
bool  has_decal
[private]
 

Definition at line 161 of file bamToEgg.cxx.

References apply_node_properties(), convert_node(), DCAST, LODNode::get_center(), PandaNode::get_child(), EggGroup::get_class_type(), LODNode::get_in(), Namable::get_name(), PandaNode::get_num_children(), LODNode::get_num_switches(), LODNode::get_out(), TypedObject::is_of_type(), LCAST, and ProgramBase::PT().

Referenced by convert_node().

void BamToEgg::convert_node const WorkingNodePath node_path,
EggGroupNode egg_parent,
bool  has_decal
[private]
 

Definition at line 135 of file bamToEgg.cxx.

References apply_node_properties(), convert_geom_node(), convert_lod_node(), DCAST, LODNode::get_class_type(), Namable::get_name(), PandaNode::is_geom_node(), TypedObject::is_of_type(), WorkingNodePath::node(), and recurse_nodes().

Referenced by convert_lod_node(), recurse_nodes(), and run().

EggTexture * BamToEgg::get_egg_texture Texture tex  )  [private]
 

Definition at line 479 of file bamToEgg.cxx.

References _textures, alpha, EggTextureCollection::create_unique_texture(), EggTexture::E_tref_name, EggTexture::F_alpha, PixelBuffer::F_alpha, EggTexture::F_blue, PixelBuffer::F_blue, EggTexture::F_green, PixelBuffer::F_green, EggTexture::F_luminance, PixelBuffer::F_luminance, EggTexture::F_luminance_alpha, PixelBuffer::F_luminance_alpha, EggTexture::F_luminance_alphamask, PixelBuffer::F_luminance_alphamask, EggTexture::F_red, PixelBuffer::F_red, EggTexture::F_rgb, PixelBuffer::F_rgb, EggTexture::F_rgb12, PixelBuffer::F_rgb12, EggTexture::F_rgb332, PixelBuffer::F_rgb332, EggTexture::F_rgb5, PixelBuffer::F_rgb5, EggTexture::F_rgb8, PixelBuffer::F_rgb8, EggTexture::F_rgba, PixelBuffer::F_rgba, EggTexture::F_rgba12, PixelBuffer::F_rgba12, EggTexture::F_rgba4, PixelBuffer::F_rgba4, EggTexture::F_rgba5, PixelBuffer::F_rgba5, EggTexture::F_rgba8, PixelBuffer::F_rgba8, EggTexture::F_rgbm, PixelBuffer::F_rgbm, Texture::FT_invalid, EggTexture::FT_linear, Texture::FT_linear, EggTexture::FT_linear_mipmap_linear, Texture::FT_linear_mipmap_linear, EggTexture::FT_linear_mipmap_nearest, Texture::FT_linear_mipmap_nearest, EggTexture::FT_nearest, EggTexture::FT_nearest_mipmap_linear, Texture::FT_nearest_mipmap_linear, EggTexture::FT_nearest_mipmap_nearest, Texture::FT_nearest_mipmap_nearest, ImageBuffer::get_alpha_filename(), Filename::get_basename_wo_extension(), ImageBuffer::get_filename(), PixelBuffer::get_format(), Texture::get_magfilter(), Texture::get_minfilter(), Texture::get_ram_image(), Texture::get_wrapu(), Texture::get_wrapv(), ImageBuffer::has_alpha_filename(), NULL, EggTexture::set_alpha_filename(), EggTexture::set_format(), EggTexture::set_magfilter(), EggTexture::set_minfilter(), EggTexture::set_wrap_u(), EggTexture::set_wrap_v(), tex, EggTexture::WM_clamp, Texture::WM_clamp, EggTexture::WM_repeat, and Texture::WM_repeat.

Referenced by convert_geom_tri().

void BamToEgg::recurse_nodes const WorkingNodePath node_path,
EggGroupNode egg_parent,
bool  has_decal
[private]
 

Definition at line 398 of file bamToEgg.cxx.

References convert_node(), PandaNode::get_child(), PandaNode::get_num_children(), and WorkingNodePath::node().

Referenced by convert_geom_node(), and convert_node().

void BamToEgg::run  ) 
 

Definition at line 80 of file bamToEgg.cxx.

References EggBase::_coordinate_system, EggBase::_data, SomethingToEgg::_input_filename, _vpool, BamFile::close(), convert_node(), DCAST, EggVertexPool::empty(), PandaNode::get_class_type(), BamFile::get_file_major_ver(), BamFile::get_file_minor_ver(), BamFile::is_eof(), nout, NULL, BamFile::open_read(), BamFile::read_object(), BamFile::resolve(), root, EggData::set_coordinate_system(), and EggWriter::write_egg_file().

Referenced by main().


Member Data Documentation

EggMaterialCollection BamToEgg::_materials [private]
 

Definition at line 70 of file bamToEgg.h.

EggTextureCollection BamToEgg::_textures [private]
 

Definition at line 69 of file bamToEgg.h.

Referenced by get_egg_texture().

EggVertexPool* BamToEgg::_vpool [private]
 

Definition at line 68 of file bamToEgg.h.

Referenced by convert_geom_tri(), and run().


The documentation for this class was generated from the following files:
Generated on Fri Apr 18 01:00:44 2003 for Panda-Tool by doxygen1.3