Panda3D

Loading...
Searching...
No Matches
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
32PUBLISHED:
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
bindAnimRequest.I
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
AnimControl
Controls the timing of a character animation.
Definition animControl.h:38
Filename
The name of a file, such as a texture file or an Egg file.
Definition filename.h:44
LoaderOptions
Specifies parameters that may be passed to the loader.
Definition loaderOptions.h:23
Loader
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
ModelLoadRequest::ModelLoadRequest
ModelLoadRequest(const std::string &name, const Filename &filename, const LoaderOptions &options, Loader *loader)
Create a new ModelLoadRequest, and add it to the loader via load_async(), to begin an asynchronous lo...
Definition modelLoadRequest.cxx:25
PartSubset
This class is used to define a subset of part names to apply to the PartBundle::bind_anim() operation...
Definition partSubset.h:25
TypeHandle
TypeHandle is the identifier used to differentiate C++ class types.
Definition typeHandle.h:81
modelLoadRequest.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
pandabase.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
partSubset.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
register_type
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