Panda3D
 All Classes Functions Variables Enumerations
ptsToBam.h
1 // Filename: ptsToBam.h
2 // Created by: drose (28Jun00)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef PTSTOBAM_H
16 #define PTSTOBAM_H
17 
18 #include "pandatoolbase.h"
19 
20 #include "programBase.h"
21 #include "withOutputFile.h"
22 #include "filename.h"
23 #include "vector_string.h"
24 #include "geomVertexData.h"
25 #include "geomVertexWriter.h"
26 #include "geomNode.h"
27 
28 ////////////////////////////////////////////////////////////////////
29 // Class : PtsToBam
30 // Description :
31 ////////////////////////////////////////////////////////////////////
32 class PtsToBam : public ProgramBase, public WithOutputFile {
33 public:
34  PtsToBam();
35 
36  void run();
37 
38 protected:
39  virtual bool handle_args(Args &args);
40 
41 private:
42  void process_line(const string &line);
43  void add_point(const vector_string &words);
44 
45  void open_vertex_data();
46  void close_vertex_data();
47 
48 private:
49  Filename _pts_filename;
50  double _decimate_divisor;
51  double _decimate_factor;
52 
53  int _line_number;
54  int _point_number;
55  int _num_points_expected;
56  int _num_points_found;
57  int _num_points_added;
58  int _num_vdatas;
59 
60  double _decimated_point_number;
61  PT(GeomNode) _gnode;
62  PT(GeomVertexData) _data;
63  GeomVertexWriter _vertex;
64 };
65 
66 #endif
This is intended to be the base class for most general-purpose utility programs in the PANDATOOL tree...
Definition: programBase.h:37
This object provides a high-level interface for quickly writing a sequence of numeric values from a v...
The name of a file, such as a texture file or an Egg file.
Definition: filename.h:44
This defines the actual numeric vertex data stored in a Geom, in the structure defined by a particula...
This is the bare functionality (intended to be inherited from along with ProgramBase or some derivati...
A node that holds Geom objects, renderable pieces of geometry.
Definition: geomNode.h:37