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

EggWriter Class Reference

#include <eggWriter.h>

Inheritance diagram for EggWriter:

EggBase WithOutputFile ProgramBase EggFilter EggMakeFont EggTextureCards EggConverter EggCrop EggTrans EggToSomething SomethingToEgg EggToBam EggToC EggToX BamToEgg FltToEgg LwoToEgg MayaToEgg XFileToEgg List of all members.

Public Member Functions

 EggWriter (bool allow_last_param=false, bool allow_stdout=true)
void add_normals_options ()
void add_transform_options ()
virtual EggWriter * as_writer ()
virtual void post_process_egg_file ()
void write_egg_file ()

Protected Types

enum  NormalsMode { NM_strip, NM_polygon, NM_vertex, NM_preserve }

Protected Member Functions

virtual bool handle_args (Args &args)
virtual bool post_command_line ()
bool ns_dispatch_normals (const string &opt, const string &arg, void *mode)
bool ns_dispatch_rotate_xyz (const string &opt, const string &arg, void *var)
bool ns_dispatch_rotate_axis (const string &opt, const string &arg, void *var)

Static Protected Member Functions

bool dispatch_normals (ProgramBase *self, const string &opt, const string &arg, void *mode)
bool dispatch_scale (const string &opt, const string &arg, void *var)
bool dispatch_rotate_xyz (ProgramBase *self, const string &opt, const string &arg, void *var)
bool dispatch_rotate_axis (ProgramBase *self, const string &opt, const string &arg, void *var)
bool dispatch_translate (const string &opt, const string &arg, void *var)

Protected Attributes

NormalsMode _normals_mode
double _normals_threshold
bool _got_transform
LMatrix4d _transform

Private Attributes

ofstream _output_stream
ostream * _output_ptr

Member Enumeration Documentation

enum EggWriter::NormalsMode [protected]
 

Enumeration values:
NM_strip 
NM_polygon 
NM_vertex 
NM_preserve 

Definition at line 61 of file eggWriter.h.

Referenced by add_normals_options(), and ns_dispatch_normals().


Constructor & Destructor Documentation

EggWriter::EggWriter bool  allow_last_param = false,
bool  allow_stdout = true
 

Definition at line 44 of file eggWriter.cxx.

References WithOutputFile::_got_output_filename, _got_transform, _normals_mode, _normals_threshold, WithOutputFile::_output_filename, WithOutputFile::_preferred_extension, _transform, ProgramBase::add_option(), ProgramBase::add_runline(), ProgramBase::clear_runlines(), ProgramBase::dispatch_filename(), false, NM_preserve, and ProgramBase::redescribe_option().


Member Function Documentation

void EggWriter::add_normals_options  ) 
 

Definition at line 113 of file eggWriter.cxx.

References ProgramBase::add_option(), dispatch_normals(), NM_polygon, NM_preserve, NM_strip, NM_vertex, NormalsMode, and NULL.

Referenced by EggTrans::EggTrans(), FltToEgg::FltToEgg(), LwoToEgg::LwoToEgg(), MayaToEgg::MayaToEgg(), and XFileToEgg::XFileToEgg().

void EggWriter::add_transform_options  ) 
 

Definition at line 151 of file eggWriter.cxx.

References _got_transform, _transform, ProgramBase::add_option(), dispatch_rotate_axis(), dispatch_rotate_xyz(), dispatch_scale(), and dispatch_translate().

Referenced by EggTrans::EggTrans(), FltToEgg::FltToEgg(), LwoToEgg::LwoToEgg(), MayaToEgg::MayaToEgg(), and XFileToEgg::XFileToEgg().

EggWriter * EggWriter::as_writer  )  [virtual]
 

Reimplemented from EggBase.

Definition at line 191 of file eggWriter.cxx.

bool EggWriter::dispatch_normals ProgramBase self,
const string &  opt,
const string &  arg,
void mode
[static, protected]
 

Definition at line 319 of file eggWriter.cxx.

References EggBase::as_writer(), mode, and ns_dispatch_normals().

Referenced by add_normals_options().

bool EggWriter::dispatch_rotate_axis ProgramBase self,
const string &  opt,
const string &  arg,
void var
[static, protected]
 

Definition at line 446 of file eggWriter.cxx.

References EggBase::as_writer(), and ns_dispatch_rotate_axis().

Referenced by add_transform_options().

bool EggWriter::dispatch_rotate_xyz ProgramBase self,
const string &  opt,
const string &  arg,
void var
[static, protected]
 

Definition at line 394 of file eggWriter.cxx.

References EggBase::as_writer(), and ns_dispatch_rotate_xyz().

Referenced by add_transform_options().

bool EggWriter::dispatch_scale const string &  opt,
const string &  arg,
void var
[static, protected]
 

Definition at line 355 of file eggWriter.cxx.

References nout, string_to_double(), tokenize(), transform, and vector_string.

Referenced by add_transform_options().

bool EggWriter::dispatch_translate const string &  opt,
const string &  arg,
void var
[static, protected]
 

Definition at line 495 of file eggWriter.cxx.

References nout, string_to_double(), tokenize(), transform, and vector_string.

Referenced by add_transform_options().

bool EggWriter::handle_args Args args  )  [protected, virtual]
 

Reimplemented from ProgramBase.

Reimplemented in EggToBam, EggMakeFont, EggFilter, EggToSomething, and EggTextureCards.

Definition at line 270 of file eggWriter.cxx.

References WithOutputFile::_got_output_filename, ProgramBase::_got_path_directory, WithOutputFile::_output_filename, WithOutputFile::check_last_arg(), Filename::get_dirname(), and nout.

Referenced by EggMakeFont::handle_args().

bool EggWriter::ns_dispatch_normals const string &  opt,
const string &  arg,
void mode
[protected]
 

Definition at line 334 of file eggWriter.cxx.

References _normals_mode, _normals_threshold, mode, NM_vertex, NormalsMode, nout, and string_to_double().

Referenced by dispatch_normals().

bool EggWriter::ns_dispatch_rotate_axis const string &  opt,
const string &  arg,
void var
[protected]
 

Definition at line 459 of file eggWriter.cxx.

References EggBase::_coordinate_system, nout, string_to_double(), tokenize(), transform, and vector_string.

Referenced by dispatch_rotate_axis().

bool EggWriter::ns_dispatch_rotate_xyz const string &  opt,
const string &  arg,
void var
[protected]
 

Definition at line 407 of file eggWriter.cxx.

References EggBase::_coordinate_system, nout, string_to_double(), tokenize(), transform, and vector_string.

Referenced by dispatch_rotate_xyz().

bool EggWriter::post_command_line  )  [protected, virtual]
 

Reimplemented from EggBase.

Reimplemented in EggFilter, SomethingToEgg, and EggCrop.

Definition at line 299 of file eggWriter.cxx.

References WithOutputFile::_allow_stdout, EggBase::_data, WithOutputFile::_got_output_filename, EggBase::append_command_comment(), nout, and EggBase::post_command_line().

Referenced by EggFilter::post_command_line().

void EggWriter::post_process_egg_file  )  [virtual]
 

Reimplemented in SomethingToEgg.

Definition at line 208 of file eggWriter.cxx.

References EggBase::_data, _normals_threshold, _transform, decompose_matrix(), EggData::get_coordinate_system(), NM_polygon, NM_preserve, NM_strip, NM_vertex, nout, EggData::recompute_polygon_normals(), EggData::recompute_vertex_normals(), EggGroupNode::remove_unused_vertices(), scale, EggData::strip_normals(), and EggNode::transform().

Referenced by SomethingToEgg::post_process_egg_file(), and write_egg_file().

void EggWriter::write_egg_file  ) 
 

Definition at line 256 of file eggWriter.cxx.

References EggBase::_data, WithOutputFile::get_output(), post_process_egg_file(), and EggData::write_egg().

Referenced by XFileToEgg::run(), MayaToEgg::run(), LwoToEgg::run(), FltToEgg::run(), EggTrans::run(), EggTextureCards::run(), EggMakeFont::run(), EggCrop::run(), and BamToEgg::run().


Member Data Documentation

bool EggWriter::_got_transform [protected]
 

Definition at line 70 of file eggWriter.h.

Referenced by add_transform_options(), and EggWriter().

NormalsMode EggWriter::_normals_mode [protected]
 

Definition at line 67 of file eggWriter.h.

Referenced by EggWriter(), and ns_dispatch_normals().

double EggWriter::_normals_threshold [protected]
 

Definition at line 68 of file eggWriter.h.

Referenced by EggWriter(), ns_dispatch_normals(), and post_process_egg_file().

ostream* EggWriter::_output_ptr [private]
 

Reimplemented from WithOutputFile.

Definition at line 75 of file eggWriter.h.

ofstream EggWriter::_output_stream [private]
 

Reimplemented from WithOutputFile.

Definition at line 74 of file eggWriter.h.

LMatrix4d EggWriter::_transform [protected]
 

Definition at line 71 of file eggWriter.h.

Referenced by add_transform_options(), EggWriter(), and post_process_egg_file().


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