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 void fetch_into_buffer(double time, unsigned char *block, bool rgba); 00036 00037 protected: 00038 unsigned char *_cells; 00039 unsigned char *_cells2; 00040 int _fps; 00041 int _frames_read; 00042 00043 public: 00044 static TypeHandle get_class_type() { 00045 return _type_handle; 00046 } 00047 static void init_type() { 00048 MovieVideoCursor::init_type(); 00049 register_type(_type_handle, "InkblotVideoCursor", 00050 MovieVideoCursor::get_class_type()); 00051 } 00052 virtual TypeHandle get_type() const { 00053 return get_class_type(); 00054 } 00055 virtual TypeHandle force_init_type() {init_type(); return get_class_type();} 00056 00057 private: 00058 static TypeHandle _type_handle; 00059 }; 00060 00061 #include "inkblotVideoCursor.I" 00062 00063 #endif