Panda3D
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Types | Protected Member Functions | Protected Attributes

DXFToEggConverter Class Reference

This class supervises the construction of an EggData structure from a DXF file. More...

#include "dxfToEggConverter.h"

Inheritance diagram for DXFToEggConverter:
SomethingToEggConverter DXFFile

List of all members.

Public Types

enum  Entity {
  EN_unknown, EN_3dface, EN_point, EN_insert,
  EN_vertex, EN_polyline
}
enum  PolylineFlags {
  PF_closed = 0x01, PF_curve_fit = 0x02, PF_spline_fit = 0x04, PF_3d = 0x08,
  PF_3d_mesh = 0x10, PF_closed_n = 0x20, PF_polyface = 0x40, PF_continuous_linetype = 0x80
}
enum  Section {
  SE_unknown, SE_header, SE_tables, SE_blocks,
  SE_entities, SE_objects
}
enum  State {
  ST_top, ST_section, ST_entity, ST_verts,
  ST_error, ST_done
}

Public Member Functions

 DXFToEggConverter (const DXFToEggConverter &copy)
virtual void begin_file ()
 A hook for user code, if desired.
virtual void begin_section ()
 A hook for user code, if desired.
void clear_egg_data ()
 Sets the EggData to NULL and makes the converter invalid.
void clear_end_frame ()
 Removes the value previously set by set_end_frame().
void clear_error ()
 Resets the error flag to the no-error state.
void clear_frame_inc ()
 Removes the value previously set by set_frame_inc().
void clear_input_frame_rate ()
 Removes the value previously set by set_input_frame_rate().
void clear_neutral_frame ()
 Removes the value previously set by set_neutral_frame().
void clear_output_frame_rate ()
 Removes the value previously set by set_output_frame_rate().
void clear_start_frame ()
 Removes the value previously set by set_start_frame().
virtual bool convert_file (const Filename &filename)
 Handles the reading of the input file and converting it to egg.
Filename convert_model_path (const Filename &orig_filename)
 Converts the indicated model filename to a relative or absolute or whatever filename, according to _path_replace.
virtual void done_vertex ()
 A hook for user code, if desired.
virtual void end_file ()
 A hook for user code, if desired.
virtual void end_section ()
 A hook for user code, if desired.
virtual string get_additional_extensions () const
 Returns a space-separated list of extension, in addition to the one returned by get_extension(), that are recognized by this converter.
AnimationConvert get_animation_convert () const
 Returns how source animation will be converted into egg structures.
const string & get_character_name () const
 Returns the name of the character generated.
const Colorget_color () const
 This is a convenience function to return the r,g,b color of the current entity (at the time of done_entity()).
EggDataget_egg_data ()
 Returns the EggData structure.
double get_end_frame () const
 Returns the value set by a previous call to set_end_frame().
virtual string get_extension () const
 Returns the common extension of the file type this converter supports.
double get_frame_inc () const
 Returns the value set by a previous call to set_frame_inc().
double get_input_frame_rate () const
 Returns the value set by a previous call to set_input_frame_rate().
virtual DistanceUnit get_input_units ()
 This may be called after convert_file() has been called and returned true, indicating a successful conversion.
bool get_merge_externals () const
 Returns the current state of the merge_externals flag.
virtual string get_name () const
 Returns the English name of the file type this converter supports.
double get_neutral_frame () const
 Returns the value set by a previous call to set_neutral_frame().
double get_output_frame_rate () const
 Returns the value set by a previous call to set_output_frame_rate().
PathReplaceget_path_replace ()
 Returns a pointer to the PathReplace object associated with this converter.
const PathReplaceget_path_replace () const
 Returns a pointer to the PathReplace object associated with this converter.
double get_start_frame () const
 Returns the value set by a previous call to set_start_frame().
bool had_error () const
 Returns true if an error was detected during the conversion process (unless _allow_errors is true), false otherwise.
bool handle_external_reference (EggGroupNode *egg_parent, const Filename &ref_filename)
 Handles an external reference in the source file.
bool has_end_frame () const
 Returns true if the ending frame has been explicitly specified via set_end_frame(), or false if the ending frame should be implicit based on the source.
bool has_frame_inc () const
 Returns true if the frame increment has been explicitly specified via set_frame_inc(), or false if the ending frame should be implicit based on the source.
bool has_input_frame_rate () const
 Returns true if the frame rate has been explicitly specified via set_input_frame_rate(), or false otherwise.
bool has_neutral_frame () const
 Returns true if the neutral frame has been explicitly specified via set_neutral_frame(), or false otherwise.
bool has_output_frame_rate () const
 Returns true if the frame rate has been explicitly specified via set_output_frame_rate(), or false otherwise.
bool has_start_frame () const
 Returns true if the starting frame has been explicitly specified via set_start_frame(), or false if the starting frame should be implicit based on the source.
virtual SomethingToEggConvertermake_copy ()
 Allocates and returns a new copy of the converter.
void ocs_2_wcs ()
 Assuming the current entity is a planar-based entity, for instance, a 2-d polygon (as opposed to a 3-d polygon), this converts the coordinates from the funny planar coordinate system to the world coordinates.
void process (Filename filename)
 Opens the indicated filename and reads it as a DXF file.
void process (istream *in, bool owns_in)
 Reads the indicated stream as a DXF file.
void set_animation_convert (AnimationConvert animation_convert)
 Specifies how source animation will be converted into egg structures.
void set_character_name (const string &character_name)
 Specifies the name of the character generated.
void set_egg_data (EggData *egg_data)
 Sets the egg data that will be filled in when convert_file() is called.
void set_end_frame (double end_frame)
 Specifies the ending frame of the animation to convert, in the units specified by set_input_frame_rate().
void set_frame_inc (double frame_inc)
 Specifies the increment between frames to extract.
void set_input_frame_rate (double input_frame_rate)
 Specifies the number of frames per second that is represented by the "frame" unit in the animation package.
void set_merge_externals (bool merge_externals)
 Sets the merge_externals flag.
void set_neutral_frame (double neutral_frame)
 Specifies the frame of animation to represent the neutral pose of the model.
void set_output_frame_rate (double output_frame_rate)
 Specifies the number of frames per second that the resulting animation should be played at.
void set_path_replace (PathReplace *path_replace)
 Replaces the PathReplace object (which specifies how to mangle paths from the source to the destination egg file) with a new one.
void set_start_frame (double start_frame)
 Specifies the starting frame of the animation to convert, in the units specified by set_input_frame_rate().
virtual bool supports_compressed () const
 Returns true if this file type can transparently load compressed files (with a .pz extension), false otherwise.

Static Public Member Functions

static int find_color (double r, double g, double b)
 Returns the index of the closest matching AutoCAD color to the indicated r, g, b.
static double get_default_frame_rate ()
 Returns the default frame rate if nothing is specified for input_frame_rate or output_frame_rate, and the animation package does not have an implicit frame rate.

Public Attributes

bool _allow_errors
int _color_index
Entity _entity
int _flags
DXFLayer_layer
DXFLayerMap _layers
LPoint3d _p
LPoint3d _q
LPoint3d _r
LPoint3d _s
Section _section
DXFVertices _verts
LVector3d _z

Static Public Attributes

static Color _colors [DXF_num_colors]

Protected Types

enum  ControlFlags {
  CF_start_frame = 0x0001, CF_end_frame = 0x0002, CF_frame_inc = 0x0004, CF_neutral_frame = 0x0008,
  CF_input_frame_rate = 0x0010, CF_output_frame_rate = 0x0020
}

Protected Member Functions

void change_entity (Entity new_entity)
void change_layer (const string &layer_name)
 Given a newly read layer name, sets the _layer pointer to point to the associate layer.
void change_section (Section new_section)
void change_state (State new_state)
 Called as new nodes are read to update the internal state correctly.
void compute_ocs ()
 Computes the matrix used to convert from the planar coordinate system to world coordinates.
virtual void done_entity ()
 If the entity is a polygon, creates the corresponding egg polygon.
virtual void error ()
 A hook for user code, if desired.
bool get_group ()
 Reads the next code, string pair from the DXF file.
virtual DXFLayernew_layer (const string &name)
 PT (PathReplace) _path_replace
 PT (EggData) _egg_data
void reset_entity ()
 Resets the current entity to its initial, default state prior to reading a new entity.
void state_entity ()
 Does the DXF processing when we are reading an entity.
void state_section ()
 Does the DXF processing when we are within some section.
void state_top ()
 Does the DXF processing when we are at the top of the file, outside of any section.
void state_verts ()
 Does the DXF processing when we are reading the list of vertices that might follow an entity.

Protected Attributes

AnimationConvert _animation_convert
string _character_name
int _code
int _control_flags
double _end_frame
bool _error
double _frame_inc
istream * _in
double _input_frame_rate
bool _merge_externals
double _neutral_frame
LMatrix4d _ocs2wcs
double _output_frame_rate
bool _owns_in
double _start_frame
State _state
string _string
bool _vertices_follow

Detailed Description

This class supervises the construction of an EggData structure from a DXF file.

Definition at line 28 of file dxfToEggConverter.h.


Member Function Documentation

void DXFFile::begin_file ( ) [virtual, inherited]

A hook for user code, if desired.

This function is called whenever processing begins on the DXF file.

Definition at line 380 of file dxfFile.cxx.

Referenced by DXFFile::process().

void DXFFile::begin_section ( ) [virtual, inherited]

A hook for user code, if desired.

This function is called whenever a new section in the DXF file is encountered.

Definition at line 392 of file dxfFile.cxx.

void DXFFile::change_layer ( const string &  layer_name) [protected, inherited]

Given a newly read layer name, sets the _layer pointer to point to the associate layer.

If the layer name has not been encountered before, creates a new layer definition.

Definition at line 675 of file dxfFile.cxx.

References DXFLayerMap::get_layer().

Referenced by DXFFile::state_entity(), DXFFile::state_section(), and DXFFile::state_verts().

void DXFFile::change_state ( State  new_state) [protected, inherited]

Called as new nodes are read to update the internal state correctly.

Definition at line 621 of file dxfFile.cxx.

References DXFFile::done_entity(), DXFFile::done_vertex(), DXFFile::end_file(), DXFFile::end_section(), and DXFFile::reset_entity().

Referenced by DXFFile::get_group(), DXFFile::state_section(), and DXFFile::state_top().

void SomethingToEggConverter::clear_egg_data ( ) [inline, inherited]

Sets the EggData to NULL and makes the converter invalid.

Definition at line 485 of file somethingToEggConverter.I.

References SomethingToEggConverter::set_egg_data().

void SomethingToEggConverter::clear_end_frame ( ) [inline, inherited]

Removes the value previously set by set_end_frame().

Definition at line 227 of file somethingToEggConverter.I.

void SomethingToEggConverter::clear_error ( ) [inline, inherited]

Resets the error flag to the no-error state.

had_error() will return false until a new error is generated.

Definition at line 24 of file somethingToEggConverter.I.

Referenced by XFileToEggConverter::convert_file(), VRMLToEggConverter::convert_file(), convert_file(), DAEToEggConverter::convert_file(), FltToEggConverter::convert_flt(), and MayaToEggConverter::convert_maya().

void SomethingToEggConverter::clear_frame_inc ( ) [inline, inherited]

Removes the value previously set by set_frame_inc().

Definition at line 282 of file somethingToEggConverter.I.

void SomethingToEggConverter::clear_input_frame_rate ( ) [inline, inherited]

Removes the value previously set by set_input_frame_rate().

Definition at line 385 of file somethingToEggConverter.I.

void SomethingToEggConverter::clear_neutral_frame ( ) [inline, inherited]

Removes the value previously set by set_neutral_frame().

Definition at line 331 of file somethingToEggConverter.I.

void SomethingToEggConverter::clear_output_frame_rate ( ) [inline, inherited]

Removes the value previously set by set_output_frame_rate().

Definition at line 436 of file somethingToEggConverter.I.

void SomethingToEggConverter::clear_start_frame ( ) [inline, inherited]

Removes the value previously set by set_start_frame().

Definition at line 174 of file somethingToEggConverter.I.

void DXFFile::compute_ocs ( ) [protected, inherited]

Computes the matrix used to convert from the planar coordinate system to world coordinates.

Definition at line 544 of file dxfFile.cxx.

References LMatrix4d::invert_from(), and LVecBase3d::normalize().

Referenced by DXFFile::ocs_2_wcs().

bool DXFToEggConverter::convert_file ( const Filename filename) [virtual]

Handles the reading of the input file and converting it to egg.

Returns true if successful, false otherwise.

Implements SomethingToEggConverter.

Definition at line 101 of file dxfToEggConverter.cxx.

References SomethingToEggConverter::clear_error(), SomethingToEggConverter::had_error(), and DXFFile::process().

Filename SomethingToEggConverter::convert_model_path ( const Filename orig_filename) [inline, inherited]

Converts the indicated model filename to a relative or absolute or whatever filename, according to _path_replace.

Definition at line 507 of file somethingToEggConverter.I.

Referenced by XFileMaterial::apply_to_egg(), and CLwoSurface::check_texture().

void DXFToEggConverter::done_entity ( ) [protected, virtual]

If the entity is a polygon, creates the corresponding egg polygon.

Reimplemented from DXFFile.

Definition at line 129 of file dxfToEggConverter.cxx.

References DXFFile::ocs_2_wcs().

void DXFFile::done_vertex ( ) [virtual, inherited]

A hook for user code, if desired.

This function is called whenever a vertex is read from the DXF file. This function has the default behavior of adding the vertex to the _verts list, so that when done_entity() is called later, it will have the complete list of vertices available to it.

Definition at line 407 of file dxfFile.cxx.

Referenced by DXFFile::change_state().

void DXFFile::end_file ( ) [virtual, inherited]

A hook for user code, if desired.

This function is called when the DXF processing is complete.

Definition at line 448 of file dxfFile.cxx.

Referenced by DXFFile::change_state().

void DXFFile::end_section ( ) [virtual, inherited]

A hook for user code, if desired.

This function is called as each section in the DXF file is finished.

Definition at line 437 of file dxfFile.cxx.

Referenced by DXFFile::change_state().

void DXFToEggConverter::error ( ) [protected, virtual]

A hook for user code, if desired.

This function is called when some unexpected error occurs while reading the DXF file.

Reimplemented from DXFFile.

Definition at line 173 of file dxfToEggConverter.cxx.

int DXFFile::find_color ( double  r,
double  g,
double  b 
) [static, inherited]

Returns the index of the closest matching AutoCAD color to the indicated r, g, b.

Definition at line 473 of file dxfFile.cxx.

string SomethingToEggConverter::get_additional_extensions ( ) const [virtual, inherited]

Returns a space-separated list of extension, in addition to the one returned by get_extension(), that are recognized by this converter.

Reimplemented in MayaToEggConverter.

Definition at line 88 of file somethingToEggConverter.cxx.

Referenced by LoaderFileTypePandatool::get_additional_extensions().

AnimationConvert SomethingToEggConverter::get_animation_convert ( ) const [inline, inherited]

Returns how source animation will be converted into egg structures.

Definition at line 98 of file somethingToEggConverter.I.

Referenced by MayaToEggConverter::convert_maya(), and MayaNodeTree::get_egg_group().

const string & SomethingToEggConverter::get_character_name ( ) const [inline, inherited]

Returns the name of the character generated.

See set_character_name().

Definition at line 122 of file somethingToEggConverter.I.

const DXFFile::Color & DXFFile::get_color ( ) const [inherited]

This is a convenience function to return the r,g,b color of the current entity (at the time of done_entity()).

It's based on the _color_index value that was read from the DXF file.

Definition at line 499 of file dxfFile.cxx.

Referenced by DXFToEggLayer::add_line(), and DXFToEggLayer::add_polygon().

double SomethingToEggConverter::get_default_frame_rate ( ) [inline, static, inherited]

Returns the default frame rate if nothing is specified for input_frame_rate or output_frame_rate, and the animation package does not have an implicit frame rate.

Definition at line 450 of file somethingToEggConverter.I.

EggData * SomethingToEggConverter::get_egg_data ( ) [inline, inherited]
double SomethingToEggConverter::get_end_frame ( ) const [inline, inherited]

Returns the value set by a previous call to set_end_frame().

It is an error to call this if has_end_frame() returns false.

Definition at line 215 of file somethingToEggConverter.I.

References SomethingToEggConverter::has_end_frame().

Referenced by MayaToEggConverter::convert_maya().

string DXFToEggConverter::get_extension ( ) const [virtual]

Returns the common extension of the file type this converter supports.

Implements SomethingToEggConverter.

Definition at line 77 of file dxfToEggConverter.cxx.

double SomethingToEggConverter::get_frame_inc ( ) const [inline, inherited]

Returns the value set by a previous call to set_frame_inc().

It is an error to call this if has_frame_inc() returns false.

Definition at line 270 of file somethingToEggConverter.I.

References SomethingToEggConverter::has_frame_inc().

Referenced by MayaToEggConverter::convert_maya().

bool DXFFile::get_group ( ) [protected, inherited]

Reads the next code, string pair from the DXF file.

This is the basic unit of data in a DXF file.

Definition at line 580 of file dxfFile.cxx.

References DXFFile::change_state().

Referenced by DXFFile::process(), and DXFFile::state_top().

double SomethingToEggConverter::get_input_frame_rate ( ) const [inline, inherited]

Returns the value set by a previous call to set_input_frame_rate().

It is an error to call this if has_input_frame_rate() returns false.

Definition at line 373 of file somethingToEggConverter.I.

References SomethingToEggConverter::has_input_frame_rate().

Referenced by MayaToEggConverter::convert_maya().

DistanceUnit SomethingToEggConverter::get_input_units ( ) [virtual, inherited]

This may be called after convert_file() has been called and returned true, indicating a successful conversion.

It will return the distance units represented by the converted egg file, if known, or DU_invalid if not known.

Reimplemented in FltToEggConverter, and MayaToEggConverter.

Definition at line 114 of file somethingToEggConverter.cxx.

bool SomethingToEggConverter::get_merge_externals ( ) const [inline, inherited]

Returns the current state of the merge_externals flag.

See set_merge_externals().

Definition at line 474 of file somethingToEggConverter.I.

string DXFToEggConverter::get_name ( ) const [virtual]

Returns the English name of the file type this converter supports.

Implements SomethingToEggConverter.

Definition at line 66 of file dxfToEggConverter.cxx.

double SomethingToEggConverter::get_neutral_frame ( ) const [inline, inherited]

Returns the value set by a previous call to set_neutral_frame().

It is an error to call this if has_neutral_frame() returns false.

Definition at line 319 of file somethingToEggConverter.I.

References SomethingToEggConverter::has_neutral_frame().

double SomethingToEggConverter::get_output_frame_rate ( ) const [inline, inherited]

Returns the value set by a previous call to set_output_frame_rate().

It is an error to call this if has_output_frame_rate() returns false.

Definition at line 424 of file somethingToEggConverter.I.

References SomethingToEggConverter::has_output_frame_rate().

Referenced by MayaToEggConverter::convert_maya().

PathReplace * SomethingToEggConverter::get_path_replace ( ) [inline, inherited]

Returns a pointer to the PathReplace object associated with this converter.

If the converter is non-const, this returns a non-const pointer, which can be adjusted.

Definition at line 61 of file somethingToEggConverter.I.

const PathReplace * SomethingToEggConverter::get_path_replace ( ) const [inline, inherited]

Returns a pointer to the PathReplace object associated with this converter.

If the converter is non-const, this returns a non-const pointer, which can be adjusted.

Definition at line 74 of file somethingToEggConverter.I.

double SomethingToEggConverter::get_start_frame ( ) const [inline, inherited]

Returns the value set by a previous call to set_start_frame().

It is an error to call this if has_start_frame() returns false.

Definition at line 162 of file somethingToEggConverter.I.

References SomethingToEggConverter::has_start_frame().

Referenced by MayaToEggConverter::convert_maya().

bool SomethingToEggConverter::had_error ( ) const [inline, inherited]

Returns true if an error was detected during the conversion process (unless _allow_errors is true), false otherwise.

Definition at line 36 of file somethingToEggConverter.I.

Referenced by XFileToEggConverter::convert_file(), VRMLToEggConverter::convert_file(), convert_file(), FltToEggConverter::convert_flt(), LwoToEggConverter::convert_lwo(), and MayaToEggConverter::convert_maya().

bool SomethingToEggConverter::handle_external_reference ( EggGroupNode egg_parent,
const Filename ref_filename 
) [inherited]

Handles an external reference in the source file.

If the merge_externals flag is true (see set_merge_externals()), this causes the named file to be read in and converted, and the converted egg geometry is parented to egg_parent. Otherwise, only a reference to a similarly named egg file is parented to egg_parent.

The parameters orig_filename and searchpath are as those passed to convert_model_path().

Returns true on success, false on failure.

Definition at line 135 of file somethingToEggConverter.cxx.

References EggGroupNode::add_child(), SomethingToEggConverter::get_egg_data(), EggData::set_coordinate_system(), SomethingToEggConverter::set_egg_data(), and EggGroupNode::steal_children().

bool SomethingToEggConverter::has_end_frame ( ) const [inline, inherited]

Returns true if the ending frame has been explicitly specified via set_end_frame(), or false if the ending frame should be implicit based on the source.

Definition at line 203 of file somethingToEggConverter.I.

Referenced by MayaToEggConverter::convert_maya(), and SomethingToEggConverter::get_end_frame().

bool SomethingToEggConverter::has_frame_inc ( ) const [inline, inherited]

Returns true if the frame increment has been explicitly specified via set_frame_inc(), or false if the ending frame should be implicit based on the source.

Definition at line 258 of file somethingToEggConverter.I.

Referenced by MayaToEggConverter::convert_maya(), and SomethingToEggConverter::get_frame_inc().

bool SomethingToEggConverter::has_input_frame_rate ( ) const [inline, inherited]

Returns true if the frame rate has been explicitly specified via set_input_frame_rate(), or false otherwise.

Definition at line 361 of file somethingToEggConverter.I.

Referenced by MayaToEggConverter::convert_maya(), and SomethingToEggConverter::get_input_frame_rate().

bool SomethingToEggConverter::has_neutral_frame ( ) const [inline, inherited]

Returns true if the neutral frame has been explicitly specified via set_neutral_frame(), or false otherwise.

Definition at line 307 of file somethingToEggConverter.I.

Referenced by SomethingToEggConverter::get_neutral_frame().

bool SomethingToEggConverter::has_output_frame_rate ( ) const [inline, inherited]

Returns true if the frame rate has been explicitly specified via set_output_frame_rate(), or false otherwise.

Definition at line 412 of file somethingToEggConverter.I.

Referenced by MayaToEggConverter::convert_maya(), and SomethingToEggConverter::get_output_frame_rate().

bool SomethingToEggConverter::has_start_frame ( ) const [inline, inherited]

Returns true if the starting frame has been explicitly specified via set_start_frame(), or false if the starting frame should be implicit based on the source.

Definition at line 150 of file somethingToEggConverter.I.

Referenced by MayaToEggConverter::convert_maya(), and SomethingToEggConverter::get_start_frame().

SomethingToEggConverter * DXFToEggConverter::make_copy ( ) [virtual]

Allocates and returns a new copy of the converter.

Implements SomethingToEggConverter.

Definition at line 54 of file dxfToEggConverter.cxx.

void DXFFile::ocs_2_wcs ( ) [inherited]

Assuming the current entity is a planar-based entity, for instance, a 2-d polygon (as opposed to a 3-d polygon), this converts the coordinates from the funny planar coordinate system to the world coordinates.

It converts the _p value of the entity, as well as all vertices in the _verts list.

Definition at line 518 of file dxfFile.cxx.

References DXFFile::compute_ocs().

Referenced by DXFPoints::done_entity(), and done_entity().

void DXFFile::process ( Filename  filename) [inherited]

Opens the indicated filename and reads it as a DXF file.

Definition at line 314 of file dxfFile.cxx.

References VirtualFileSystem::get_global_ptr(), VirtualFileSystem::open_read_file(), and Filename::set_text().

Referenced by convert_file().

void DXFFile::process ( istream *  in,
bool  owns_in 
) [inherited]

Reads the indicated stream as a DXF file.

If owns_in is true, then the istream will be deleted via vfs->close_read_file() when the DXFFile object destructs.

Definition at line 335 of file dxfFile.cxx.

References DXFFile::begin_file(), VirtualFileSystem::close_read_file(), VirtualFileSystem::get_global_ptr(), DXFFile::get_group(), DXFFile::state_entity(), DXFFile::state_section(), DXFFile::state_top(), and DXFFile::state_verts().

void DXFFile::reset_entity ( ) [protected, inherited]

Resets the current entity to its initial, default state prior to reading a new entity.

Definition at line 710 of file dxfFile.cxx.

Referenced by DXFFile::change_state().

void SomethingToEggConverter::set_animation_convert ( AnimationConvert  animation_convert) [inline, inherited]

Specifies how source animation will be converted into egg structures.

The default is AC_none, which means animation tables will be ignored. This is only meaningful for converters that understand animation.

Definition at line 87 of file somethingToEggConverter.I.

Referenced by SomethingToEgg::apply_parameters().

void SomethingToEggConverter::set_character_name ( const string &  character_name) [inline, inherited]

Specifies the name of the character generated.

This name should match between all the model and channel egg files for a particular character and its associated animations.

Definition at line 111 of file somethingToEggConverter.I.

Referenced by SomethingToEgg::apply_parameters().

void SomethingToEggConverter::set_egg_data ( EggData egg_data) [inherited]

Sets the egg data that will be filled in when convert_file() is called.

This must be called before convert_file().

Definition at line 76 of file somethingToEggConverter.cxx.

Referenced by SomethingToEggConverter::clear_egg_data(), SoftToEggConverter::convert_soft(), and SomethingToEggConverter::handle_external_reference().

void SomethingToEggConverter::set_end_frame ( double  end_frame) [inline, inherited]

Specifies the ending frame of the animation to convert, in the units specified by set_input_frame_rate().

If this is unspecified, the ending frame is taken from the source, for instance from the last frame of the animation slider.

Definition at line 189 of file somethingToEggConverter.I.

Referenced by SomethingToEgg::apply_parameters().

void SomethingToEggConverter::set_frame_inc ( double  frame_inc) [inline, inherited]

Specifies the increment between frames to extract.

This is the amount to increment the time slider (in units of internal_frame_rate) between extracting each frame. If this is not specified, the default is taken from the animation package, or 1.0 if the animation package does not specified a frame increment.

Definition at line 244 of file somethingToEggConverter.I.

Referenced by SomethingToEgg::apply_parameters().

void SomethingToEggConverter::set_input_frame_rate ( double  input_frame_rate) [inline, inherited]

Specifies the number of frames per second that is represented by the "frame" unit in the animation package.

If this is omitted, it is taken from whatever the file header indicates. Some animation packages do not encode a frame rate, in which case the default if this is omitted is the same as the output frame rate.

Definition at line 348 of file somethingToEggConverter.I.

Referenced by SomethingToEgg::apply_parameters().

void SomethingToEggConverter::set_merge_externals ( bool  merge_externals) [inline, inherited]

Sets the merge_externals flag.

When this is true, external references within the source file are read in and merged directly; otherwise, only a reference to a similarly-named egg file is inserted.

Definition at line 463 of file somethingToEggConverter.I.

void SomethingToEggConverter::set_neutral_frame ( double  neutral_frame) [inline, inherited]

Specifies the frame of animation to represent the neutral pose of the model.

Definition at line 294 of file somethingToEggConverter.I.

Referenced by SomethingToEgg::apply_parameters().

void SomethingToEggConverter::set_output_frame_rate ( double  output_frame_rate) [inline, inherited]

Specifies the number of frames per second that the resulting animation should be played at.

If this is omitted, it is taken to be the same as the input frame rate.

Definition at line 399 of file somethingToEggConverter.I.

Referenced by SomethingToEgg::apply_parameters().

void SomethingToEggConverter::set_path_replace ( PathReplace path_replace) [inline, inherited]

Replaces the PathReplace object (which specifies how to mangle paths from the source to the destination egg file) with a new one.

Definition at line 48 of file somethingToEggConverter.I.

Referenced by SomethingToEgg::apply_parameters().

void SomethingToEggConverter::set_start_frame ( double  start_frame) [inline, inherited]

Specifies the starting frame of the animation to convert, in the units specified by set_input_frame_rate().

If this is unspecified, the starting frame is taken from the source, for instance from the first frame of the animation slider.

Definition at line 136 of file somethingToEggConverter.I.

Referenced by SomethingToEgg::apply_parameters().

void DXFFile::state_entity ( ) [protected, inherited]

Does the DXF processing when we are reading an entity.

Definition at line 822 of file dxfFile.cxx.

References DXFFile::change_layer(), and DXFFile::state_section().

Referenced by DXFFile::process().

void DXFFile::state_section ( ) [protected, inherited]

Does the DXF processing when we are within some section.

Definition at line 775 of file dxfFile.cxx.

References DXFFile::change_layer(), and DXFFile::change_state().

Referenced by DXFFile::process(), DXFFile::state_entity(), and DXFFile::state_verts().

void DXFFile::state_top ( ) [protected, inherited]

Does the DXF processing when we are at the top of the file, outside of any section.

Definition at line 730 of file dxfFile.cxx.

References DXFFile::change_state(), and DXFFile::get_group().

Referenced by DXFFile::process().

void DXFFile::state_verts ( ) [protected, inherited]

Does the DXF processing when we are reading the list of vertices that might follow an entity.

Definition at line 919 of file dxfFile.cxx.

References DXFFile::change_layer(), and DXFFile::state_section().

Referenced by DXFFile::process().

bool DXFToEggConverter::supports_compressed ( ) const [virtual]

Returns true if this file type can transparently load compressed files (with a .pz extension), false otherwise.

Reimplemented from SomethingToEggConverter.

Definition at line 89 of file dxfToEggConverter.cxx.


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations