Panda3D
|
00001 // Filename: inkblotVideoCursor.h 00002 // Created by: jyelon (02Jul07) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 #ifndef INKBLOTVIDEOCURSOR_H 00016 #define INKBLOTVIDEOCURSOR_H 00017 00018 #include "pandabase.h" 00019 #include "texture.h" 00020 #include "pointerTo.h" 00021 #include "inkblotVideo.h" 00022 00023 //////////////////////////////////////////////////////////////////// 00024 // Class : InkblotVideoCursor 00025 // Description : A cellular automaton that generates an amusing 00026 // pattern of swirling colors. 00027 //////////////////////////////////////////////////////////////////// 00028 class EXPCL_PANDA_MOVIES InkblotVideoCursor : public MovieVideoCursor { 00029 00030 PUBLISHED: 00031 InkblotVideoCursor(InkblotVideo *src); 00032 virtual ~InkblotVideoCursor(); 00033 00034 public: 00035 virtual bool set_time(double time, int loop_count); 00036 virtual PT(Buffer) fetch_buffer(); 00037 00038 protected: 00039 int _current_frame; 00040 int _last_frame; 00041 unsigned char *_cells; 00042 unsigned char *_cells2; 00043 int _fps; 00044 00045 public: 00046 static TypeHandle get_class_type() { 00047 return _type_handle; 00048 } 00049 static void init_type() { 00050 MovieVideoCursor::init_type(); 00051 register_type(_type_handle, "InkblotVideoCursor", 00052 MovieVideoCursor::get_class_type()); 00053 } 00054 virtual TypeHandle get_type() const { 00055 return get_class_type(); 00056 } 00057 virtual TypeHandle force_init_type() {init_type(); return get_class_type();} 00058 00059 private: 00060 static TypeHandle _type_handle; 00061 }; 00062 00063 #include "inkblotVideoCursor.I" 00064 00065 #endif