Panda3D
bindAnimRequest.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 bindAnimRequest.h
10  * @author drose
11  * @date 2008-08-05
12  */
13 
14 #ifndef BINDANIMREQUEST
15 #define BINDANIMREQUEST
16 
17 #include "pandabase.h"
18 
19 #include "modelLoadRequest.h"
20 #include "partSubset.h"
21 
22 class AnimControl;
23 
24 /**
25  * This class object manages an asynchronous load-and-bind animation request,
26  * as issued through PartBundle::load_bind_anim().
27  */
28 class EXPCL_PANDA_CHAN BindAnimRequest : public ModelLoadRequest {
29 public:
30  ALLOC_DELETED_CHAIN(BindAnimRequest);
31 
32 PUBLISHED:
33  explicit BindAnimRequest(const std::string &name,
34  const Filename &filename,
35  const LoaderOptions &options,
36  Loader *loader,
37  AnimControl *control,
38  int hierarchy_match_flags,
39  const PartSubset &subset);
40 
41 protected:
42  virtual DoneStatus do_task();
43 
44 private:
45  PT(AnimControl) _control;
46  int _hierarchy_match_flags;
47  PartSubset _subset;
48 
49 public:
50  static TypeHandle get_class_type() {
51  return _type_handle;
52  }
53  static void init_type() {
54  ModelLoadRequest::init_type();
55  register_type(_type_handle, "BindAnimRequest",
56  ModelLoadRequest::get_class_type());
57  }
58  virtual TypeHandle get_type() const {
59  return get_class_type();
60  }
61  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
62 
63 private:
64  static TypeHandle _type_handle;
65 };
66 
67 #include "bindAnimRequest.I"
68 
69 #endif
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Specifies parameters that may be passed to the loader.
Definition: loaderOptions.h:23
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
Definition: register_type.I:22
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A convenient class for loading models from disk, in bam or egg format (or any of a number of other fo...
Definition: loader.h:42
The name of a file, such as a texture file or an Egg file.
Definition: filename.h:39
This class is used to define a subset of part names to apply to the PartBundle::bind_anim() operation...
Definition: partSubset.h:25
This class object manages an asynchronous load-and-bind animation request, as issued through PartBund...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Controls the timing of a character animation.
Definition: animControl.h:38
A class object that manages a single asynchronous model load request.
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:81
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.