Panda3D

movieTexture.I

00001 // Filename: movieTexture.I
00002 // Created by: jyelon (01Aug2007)
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 
00016 ////////////////////////////////////////////////////////////////////
00017 //     Function: MovieTexture::get_video_length
00018 //       Access: Published
00019 //  Description: Returns the length of the video.
00020 ////////////////////////////////////////////////////////////////////
00021 INLINE double MovieTexture::
00022 get_video_length() const {
00023   CDReader cdata(_cycler);
00024   return cdata->_video_length;
00025 }
00026 
00027 ////////////////////////////////////////////////////////////////////
00028 //     Function: MovieTexture::get_video_width
00029 //       Access: Published
00030 //  Description: Returns the width in texels of the source video
00031 //               stream.  This is not necessarily the width of the
00032 //               actual texture, since the texture may have been
00033 //               expanded to raise it to a power of 2.
00034 ////////////////////////////////////////////////////////////////////
00035 INLINE int MovieTexture::
00036 get_video_width() const {
00037   CDReader cdata(_cycler);
00038   return cdata->_video_width;
00039 }
00040 
00041 ////////////////////////////////////////////////////////////////////
00042 //     Function: MovieTexture::get_video_height
00043 //       Access: Published
00044 //  Description: Returns the height in texels of the source video
00045 //               stream.  This is not necessarily the height of the
00046 //               actual texture, since the texture may have been
00047 //               expanded to raise it to a power of 2.
00048 ////////////////////////////////////////////////////////////////////
00049 INLINE int MovieTexture::
00050 get_video_height() const {
00051   CDReader cdata(_cycler);
00052   return cdata->_video_height;
00053 }
00054 
00055 ////////////////////////////////////////////////////////////////////
00056 //     Function: MovieTexture::get_color_cursor
00057 //       Access: Published
00058 //  Description: Returns the MovieVideoCursor that is feeding the
00059 //               color channels for the indicated page, where 0 <=
00060 //               page < get_num_pages().
00061 ////////////////////////////////////////////////////////////////////
00062 INLINE MovieVideoCursor *MovieTexture::
00063 get_color_cursor(int page) {
00064   CDReader cdata(_cycler);
00065   nassertr(page >= 0 && page < (int)cdata->_pages.size(), NULL);
00066   return cdata->_pages[page]._color;
00067 }
00068 
00069 ////////////////////////////////////////////////////////////////////
00070 //     Function: MovieTexture::get_alpha_cursor
00071 //       Access: Published
00072 //  Description: Returns the MovieVideoCursor that is feeding the
00073 //               alpha channel for the indicated page, where 0 <=
00074 //               page < get_num_pages().
00075 ////////////////////////////////////////////////////////////////////
00076 INLINE MovieVideoCursor *MovieTexture::
00077 get_alpha_cursor(int page) {
00078   CDReader cdata(_cycler);
00079   nassertr(page >= 0 && page < (int)cdata->_pages.size(), NULL);
00080   return cdata->_pages[page]._alpha;
00081 }
00082 
 All Classes Functions Variables Enumerations