animateVerticesRequest.cxx

00001 // Filename: animateVerticesRequest.cxx
00002 // Created by:  pratt (20Nov07)
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 #include "animateVerticesRequest.h"
00016 #include "geomVertexData.h"
00017 
00018 TypeHandle AnimateVerticesRequest::_type_handle;
00019 
00020 ////////////////////////////////////////////////////////////////////
00021 //     Function: AnimateVerticesRequest::do_task
00022 //       Access: Protected, Virtual
00023 //  Description: Performs the task: that is, calls animate vertices
00024 //               on _geom_vertex_data.
00025 ////////////////////////////////////////////////////////////////////
00026 AsyncTask::DoneStatus AnimateVerticesRequest::
00027 do_task() {
00028   Thread *current_thread = Thread::get_current_thread();
00029 
00030   // There is no need to store or return a result.  The GeomVertexData caches
00031   // the result and it will be used later in the rendering process.
00032   _geom_vertex_data->animate_vertices(true, current_thread);
00033   _is_ready = true;
00034 
00035   // Don't continue the task; we're done.
00036   return AsyncTask::DS_done;
00037 }