Panda3D
ptsToBam.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 ptsToBam.h
10  * @author drose
11  * @date 2000-06-28
12  */
13 
14 #ifndef PTSTOBAM_H
15 #define PTSTOBAM_H
16 
17 #include "pandatoolbase.h"
18 
19 #include "programBase.h"
20 #include "withOutputFile.h"
21 #include "filename.h"
22 #include "vector_string.h"
23 #include "geomVertexData.h"
24 #include "geomVertexWriter.h"
25 #include "geomNode.h"
26 
27 /**
28  *
29  */
30 class PtsToBam : public ProgramBase, public WithOutputFile {
31 public:
32  PtsToBam();
33 
34  void run();
35 
36 protected:
37  virtual bool handle_args(Args &args);
38 
39 private:
40  void process_line(const std::string &line);
41  void add_point(const vector_string &words);
42 
43  void open_vertex_data();
44  void close_vertex_data();
45 
46 private:
47  Filename _pts_filename;
48  double _decimate_divisor;
49  double _decimate_factor;
50 
51  int _line_number;
52  int _point_number;
53  int _num_points_expected;
54  int _num_points_found;
55  int _num_points_added;
56  int _num_vdatas;
57 
58  double _decimated_point_number;
59  PT(GeomNode) _gnode;
60  PT(GeomVertexData) _data;
61  GeomVertexWriter _vertex;
62 };
63 
64 #endif
geomVertexData.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
WithOutputFile
This is the bare functionality (intended to be inherited from along with ProgramBase or some derivati...
Definition: withOutputFile.h:29
geomVertexWriter.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
GeomVertexData
This defines the actual numeric vertex data stored in a Geom, in the structure defined by a particula...
Definition: geomVertexData.h:68
GeomVertexWriter
This object provides a high-level interface for quickly writing a sequence of numeric values from a v...
Definition: geomVertexWriter.h:55
filename.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
ProgramBase
This is intended to be the base class for most general-purpose utility programs in the PANDATOOL tree...
Definition: programBase.h:34
GeomNode
A node that holds Geom objects, renderable pieces of geometry.
Definition: geomNode.h:34
pdeque< std::string >
programBase.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
vector_string.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PtsToBam
Definition: ptsToBam.h:30
pandatoolbase.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
geomNode.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
withOutputFile.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Filename
The name of a file, such as a texture file or an Egg file.
Definition: filename.h:39