Panda3D
characterJointBundle.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 characterJointBundle.h
10  * @author drose
11  * @date 1999-02-23
12  */
13 
14 #ifndef CHARACTERJOINTBUNDLE_H
15 #define CHARACTERJOINTBUNDLE_H
16 
17 #include "pandabase.h"
18 
19 #include "partBundle.h"
20 #include "partGroup.h"
21 #include "animControl.h"
22 
23 class Character;
24 
25 /**
26  * The collection of all the joints and sliders in the character.
27  */
28 class EXPCL_PANDA_CHAR CharacterJointBundle : public PartBundle {
29 protected:
30  INLINE CharacterJointBundle(const CharacterJointBundle &copy);
31 
32 PUBLISHED:
33  explicit CharacterJointBundle(const std::string &name = "");
34  virtual ~CharacterJointBundle();
35 
36 PUBLISHED:
37  INLINE Character *get_node(int n) const;
38 
39 protected:
40  virtual PartGroup *make_copy() const;
41  virtual void add_node(PartBundleNode *node);
42  virtual void remove_node(PartBundleNode *node);
43 
44 private:
45  void r_set_character(PartGroup *group, Character *character);
46 
47 public:
48  static void register_with_read_factory();
49 
50  static TypedWritable *make_CharacterJointBundle(const FactoryParams &params);
51 
52 public:
53  virtual TypeHandle get_type() const {
54  return get_class_type();
55  }
56  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
57  static TypeHandle get_class_type() {
58  return _type_handle;
59  }
60  static void init_type() {
61  PartBundle::init_type();
62  register_type(_type_handle, "CharacterJointBundle",
63  PartBundle::get_class_type());
64  }
65 
66 private:
67  static TypeHandle _type_handle;
68 };
69 
70 #include "characterJointBundle.I"
71 
72 #endif
The collection of all the joints and sliders in the character.
An animated character, with skeleton-morph animation and either soft- skinned or hard-skinned vertice...
Definition: character.h:38
Base class for objects that can be written to and read from Bam files.
Definition: typedWritable.h:35
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.
static void register_with_read_factory()
Factory method to generate a PartBundle object.
Definition: partBundle.cxx:829
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is a node that contains a pointer to an PartBundle.
An instance of this class is passed to the Factory when requesting it to do its business and construc...
Definition: factoryParams.h:36
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is the root of a MovingPart hierarchy.
Definition: partBundle.h:46
virtual PartGroup * make_copy() const
Allocates and returns a new copy of the node.
Definition: partBundle.cxx:83
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:81
get_node
Returns the nth PartBundleNode associated with this PartBundle.
Definition: partBundle.h:114
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is the base class for PartRoot and MovingPart.
Definition: partGroup.h:43