14#ifndef EGGTOOBJCONVERTER_H
15#define EGGTOOBJCONVERTER_H
26class EggToObjConverter :
public EggToSomethingConverter {
29 EggToObjConverter(
const EggToObjConverter ©);
32 virtual EggToSomethingConverter *
make_copy();
34 virtual std::string
get_name()
const;
41 typedef pmap<LVecBase4d, int> UniqueVertices;
51 typedef pmap<EggVertex *, VertexDef> VertexMap;
53 bool process(
const Filename &filename);
55 void collect_vertices(
EggNode *egg_node);
56 void write_faces(std::ostream &out,
EggNode *egg_node);
57 void write_group_reference(std::ostream &out,
EggNode *egg_node);
58 void get_group_name(std::string &group_name,
EggGroupNode *egg_group);
61 int record_unique(UniqueVertices &unique,
const LVecBase4d &vec);
62 int record_unique(UniqueVertices &unique,
const LVecBase3d &vec);
63 int record_unique(UniqueVertices &unique,
const LVecBase2d &vec);
64 int record_unique(UniqueVertices &unique,
double pos);
66 void write_vertices(std::ostream &out,
const std::string &prefix,
int num_components,
67 const UniqueVertices &unique);
70 UniqueVertices _unique_vert3, _unique_vert4, _unique_uv2, _unique_uv3, _unique_norm;
A base class for nodes in the hierarchy that are not leaf nodes.
A base class for things that may be directly added into the egg hierarchy.
virtual std::string get_extension() const
Returns the common extension of the file type this converter supports.
virtual bool write_file(const Filename &filename)
Handles the conversion of the internal EggData to the target file format, written to the specified fi...
virtual bool supports_compressed() const
Returns true if this file type can transparently save compressed files (with a .pz extension),...
virtual EggToSomethingConverter * make_copy()
Allocates and returns a new copy of the converter.
virtual std::string get_name() const
Returns the English name of the file type this converter supports.
Any one-, two-, three-, or four-component vertex, possibly with attributes such as a normal.
The name of a file, such as a texture file or an Egg file.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.