Panda3D

bamInfo.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 bamInfo.h
10 * @author drose
11 * @date 2000-07-02
12 */
13
14 #ifndef BAMINFO_H
15 #define BAMINFO_H
16
17 #include "pandatoolbase.h"
18
19 #include "programBase.h"
20 #include "filename.h"
21 #include "sceneGraphAnalyzer.h"
22
23 #include "pvector.h"
24
25 class TypedWritable;
26 class PandaNode;
27 class Texture;
28 class BamCacheIndex;
29 class RecorderHeader;
30
31 /**
32 *
33 */
34 class BamInfo : public ProgramBase {
35 public:
36 BamInfo();
37
38 void run();
39
40 protected:
41 virtual bool handle_args(Args &args);
42
43 private:
44 typedef pvector<TypedWritable *> Objects;
45
46 bool get_info(const Filename &filename);
47 void describe_scene_graph(PandaNode *node);
48 void describe_texture(Texture *tex);
49 void describe_cache_index(BamCacheIndex *index);
50 void describe_session(RecorderHeader *header, const Objects &objects);
51 void describe_general_object(TypedWritable *object);
52 void list_hierarchy(PandaNode *node, int indent_level);
53
54 typedef pvector<Filename> Filenames;
55 Filenames _filenames;
56
57 bool _ls;
58 bool _verbose_transitions;
59 bool _verbose_geoms;
60
61 int _num_scene_graphs;
62 SceneGraphAnalyzer _analyzer;
63 };
64
65 #endif
BamCacheIndex
This represents the in-memory index that records the list of files stored in the BamCache.
Definition: bamCacheIndex.h:33
BamInfo
Definition: bamInfo.h:34
Filename
The name of a file, such as a texture file or an Egg file.
Definition: filename.h:39
PandaNode
A basic node of the scene graph or data graph.
Definition: pandaNode.h:65
ProgramBase
This is intended to be the base class for most general-purpose utility programs in the PANDATOOL tree...
Definition: programBase.h:34
RecorderHeader
This object contains the header information written out at the beginning of a recorded session file.
Definition: recorderHeader.h:31
SceneGraphAnalyzer
A handy class that can scrub over a scene graph and collect interesting statistics on it.
Definition: sceneGraphAnalyzer.h:37
Texture
Represents a texture object, which is typically a single 2-d image but may also represent a 1-d or 3-...
Definition: texture.h:71
TypedWritable
Base class for objects that can be written to and read from Bam files.
Definition: typedWritable.h:35
pdeque< std::string >
pvector
This is our own Panda specialization on the default STL vector.
Definition: pvector.h:42
filename.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
pandatoolbase.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
programBase.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
pvector.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
sceneGraphAnalyzer.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.