Panda3D
Loading...
Searching...
No Matches
animateVerticesRequest.h
Go to the documentation of this file.
1/**
2 * PANDA 3D SOFTWARE
3 * Copyright (c) Carnegie Mellon University. All rights reserved.
4 *
5 * All use of this software is subject to the terms of the revised BSD
6 * license. You should have received a copy of this license along
7 * with this source code in a file named "LICENSE."
8 *
9 * @file animateVerticesRequest.h
10 * @author pratt
11 * @date 2007-11-20
12 */
13
14#ifndef ANIMATEVERTICESREQUEST
15#define ANIMATEVERTICESREQUEST
16
17#include "pandabase.h"
18
19#include "asyncTask.h"
20#include "geomVertexData.h"
21#include "pointerTo.h"
22
23/**
24 * This class object manages a single asynchronous request to animate vertices
25 * on a GeomVertexData object. animate_vertices will be called with
26 * force=true (i.e. blocking) in a sub-thread (if threading is available).
27 * No result is stored or returned from this object. It is expected that the
28 * result will be cached and available for immediate use later during
29 * rendering. Thus it is important that the main thread block while these
30 * requests are being run (presumably on multiple CPUs/cores), to ensure that
31 * the data has been computed by the time it's needed.
32 */
33class EXPCL_PANDA_GOBJ AnimateVerticesRequest : public AsyncTask {
34public:
35 ALLOC_DELETED_CHAIN(AnimateVerticesRequest);
36
37PUBLISHED:
38 INLINE explicit AnimateVerticesRequest(GeomVertexData *geom_vertex_data);
39
40 INLINE bool is_ready() const;
41
42protected:
43 virtual AsyncTask::DoneStatus do_task();
44
45private:
46 PT(GeomVertexData) _geom_vertex_data;
47
48public:
49 static TypeHandle get_class_type() {
50 return _type_handle;
51 }
52 static void init_type() {
53 AsyncTask::init_type();
54 register_type(_type_handle, "AnimateVerticesRequest",
55 AsyncTask::get_class_type());
56 }
57 virtual TypeHandle get_type() const {
58 return get_class_type();
59 }
60 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
61
62private:
63 static TypeHandle _type_handle;
64};
65
67
68#endif
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This class object manages a single asynchronous request to animate vertices on a GeomVertexData objec...
This class represents a concrete task performed by an AsyncManager.
Definition asyncTask.h:32
This defines the actual numeric vertex data stored in a Geom, in the structure defined by a particula...
TypeHandle is the identifier used to differentiate C++ class types.
Definition typeHandle.h:81
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...