Panda3D
Loading...
Searching...
No Matches
lwoToEggConverter.h
Go to the documentation of this file.
1/**
2 * PANDA 3D SOFTWARE
3 * Copyright (c) Carnegie Mellon University. All rights reserved.
4 *
5 * All use of this software is subject to the terms of the revised BSD
6 * license. You should have received a copy of this license along
7 * with this source code in a file named "LICENSE."
8 *
9 * @file lwoToEggConverter.h
10 * @author drose
11 * @date 2001-04-17
12 */
13
14#ifndef LWOTOEGGCONVERTER_H
15#define LWOTOEGGCONVERTER_H
16
17#include "pandatoolbase.h"
18
20#include "lwoHeader.h"
21#include "pointerTo.h"
22
23#include "pvector.h"
24#include "pmap.h"
25
26class CLwoLayer;
27class CLwoClip;
28class CLwoPoints;
29class CLwoPolygons;
30class CLwoSurface;
31class LwoClip;
32
33/**
34 * This class supervises the construction of an EggData structure from the
35 * data represented by the LwoHeader. Reading and writing the egg and lwo
36 * structures is left to the user.
37 */
39public:
42 virtual ~LwoToEggConverter();
43
45
46 virtual std::string get_name() const;
47 virtual std::string get_extension() const;
48
49 virtual bool convert_file(const Filename &filename);
50 bool convert_lwo(const LwoHeader *lwo_header);
51 virtual bool supports_compressed() const;
52
53 CLwoLayer *get_layer(int number) const;
54 CLwoClip *get_clip(int number) const;
55
56 CLwoSurface *get_surface(const std::string &name) const;
57
58 bool _make_materials;
59
60private:
61 void cleanup();
62
63 void collect_lwo();
64 void make_egg();
65 void connect_egg();
66
67 void slot_layer(int number);
68 void slot_clip(int number);
69 CLwoLayer *make_generic_layer();
70
71 CPT(LwoHeader) _lwo_header;
72
73 CLwoLayer *_generic_layer;
75 Layers _layers;
76
78 Clips _clips;
79
81 Points _points;
82
84 Polygons _polygons;
85
87 Surfaces _surfaces;
88};
89
90#include "lwoToEggConverter.I"
91
92#endif
This class is a wrapper around LwoClip and stores additional information useful during the conversion...
Definition cLwoClip.h:29
This class is a wrapper around LwoLayer and stores additional information useful during the conversio...
Definition cLwoLayer.h:29
This class is a wrapper around LwoPoints and stores additional information useful during the conversi...
Definition cLwoPoints.h:33
This class is a wrapper around LwoPolygons and stores additional information useful during the conver...
This class is a wrapper around LwoSurface and stores additional information useful during the convers...
Definition cLwoSurface.h:39
The name of a file, such as a texture file or an Egg file.
Definition filename.h:44
A single image file, or a numbered sequence of images (e.g.
Definition lwoClip.h:25
The first chunk in a Lightwave Object file.
Definition lwoHeader.h:24
This class supervises the construction of an EggData structure from the data represented by the LwoHe...
CLwoSurface * get_surface(const std::string &name) const
Returns a pointer to the surface definition with the given name, or NULL if there is no such surface.
virtual bool supports_compressed() const
Returns true if this file type can transparently load compressed files (with a .pz extension),...
CLwoClip * get_clip(int number) const
Returns a pointer to the clip with the given index number, or NULL if there is no such clip.
virtual std::string get_name() const
Returns the English name of the file type this converter supports.
virtual SomethingToEggConverter * make_copy()
Allocates and returns a new copy of the converter.
virtual std::string get_extension() const
Returns the common extension of the file type this converter supports.
CLwoLayer * get_layer(int number) const
Returns a pointer to the layer with the given index number, or NULL if there is no such layer.
virtual bool convert_file(const Filename &filename)
Handles the reading of the input file and converting it to egg.
bool convert_lwo(const LwoHeader *lwo_header)
Fills up the egg_data structure according to the indicated lwo structure.
This is a base class for a family of converter classes that manage a conversion from some file type t...
This is our own Panda specialization on the default STL map.
Definition pmap.h:49
This is our own Panda specialization on the default STL vector.
Definition pvector.h:42
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.