Panda3D
 All Classes Functions Variables Enumerations
animateVerticesRequest.cxx
1 // Filename: animateVerticesRequest.cxx
2 // Created by: pratt (20Nov07)
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 #include "animateVerticesRequest.h"
16 #include "geomVertexData.h"
17 
18 TypeHandle AnimateVerticesRequest::_type_handle;
19 
20 ////////////////////////////////////////////////////////////////////
21 // Function: AnimateVerticesRequest::do_task
22 // Access: Protected, Virtual
23 // Description: Performs the task: that is, calls animate vertices
24 // on _geom_vertex_data.
25 ////////////////////////////////////////////////////////////////////
26 AsyncTask::DoneStatus AnimateVerticesRequest::
27 do_task() {
28  Thread *current_thread = Thread::get_current_thread();
29 
30  // There is no need to store or return a result. The GeomVertexData caches
31  // the result and it will be used later in the rendering process.
32  _geom_vertex_data->animate_vertices(true, current_thread);
33  _is_ready = true;
34 
35  // Don't continue the task; we're done.
36  return AsyncTask::DS_done;
37 }
static Thread * get_current_thread()
Returns a pointer to the currently-executing Thread object.
Definition: thread.I:145
A thread; that is, a lightweight process.
Definition: thread.h:51
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85