Panda3D
inkblotVideoCursor.h
1 // Filename: inkblotVideoCursor.h
2 // Created by: jyelon (02Jul07)
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 INKBLOTVIDEOCURSOR_H
16 #define INKBLOTVIDEOCURSOR_H
17 
18 #include "pandabase.h"
19 #include "texture.h"
20 #include "pointerTo.h"
21 #include "inkblotVideo.h"
22 #include "movieVideoCursor.h"
23 
24 ////////////////////////////////////////////////////////////////////
25 // Class : InkblotVideoCursor
26 // Description : A cellular automaton that generates an amusing
27 // pattern of swirling colors.
28 ////////////////////////////////////////////////////////////////////
29 class EXPCL_PANDA_MOVIES InkblotVideoCursor : public MovieVideoCursor {
30 
31  PUBLISHED:
33  virtual ~InkblotVideoCursor();
34 
35  public:
36  virtual bool set_time(double time, int loop_count);
37  virtual PT(Buffer) fetch_buffer();
38 
39  protected:
40  int _current_frame;
41  int _last_frame;
42  unsigned char *_cells;
43  unsigned char *_cells2;
44  int _fps;
45 
46 public:
47  static TypeHandle get_class_type() {
48  return _type_handle;
49  }
50  static void init_type() {
51  MovieVideoCursor::init_type();
52  register_type(_type_handle, "InkblotVideoCursor",
53  MovieVideoCursor::get_class_type());
54  }
55  virtual TypeHandle get_type() const {
56  return get_class_type();
57  }
58  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
59 
60 private:
61  static TypeHandle _type_handle;
62 };
63 
64 #include "inkblotVideoCursor.I"
65 
66 #endif
A cellular automaton that generates an amusing pattern of swirling colors.
virtual bool set_time(double timestamp, int loop_count)
Updates the cursor to the indicated time.
A MovieVideo is actually any source that provides a sequence of video frames.
A cellular automaton that generates an amusing pattern of swirling colors.
Definition: inkblotVideo.h:27
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85