Panda3D
characterJointBundle.h
1 // Filename: characterJointBundle.h
2 // Created by: drose (23Feb99)
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 #ifndef CHARACTERJOINTBUNDLE_H
16 #define CHARACTERJOINTBUNDLE_H
17 
18 #include "pandabase.h"
19 
20 #include "partBundle.h"
21 #include "partGroup.h"
22 #include "animControl.h"
23 
24 class Character;
25 
26 ////////////////////////////////////////////////////////////////////
27 // Class : CharacterJointBundle
28 // Description : The collection of all the joints and sliders in the
29 // character.
30 ////////////////////////////////////////////////////////////////////
31 class EXPCL_PANDA_CHAR CharacterJointBundle : public PartBundle {
32 protected:
33  INLINE CharacterJointBundle(const CharacterJointBundle &copy);
34 
35 PUBLISHED:
36  CharacterJointBundle(const string &name = "");
37  virtual ~CharacterJointBundle();
38 
39 PUBLISHED:
40  INLINE Character *get_node(int n) const;
41 
42 protected:
43  virtual PartGroup *make_copy() const;
44  virtual void add_node(PartBundleNode *node);
45  virtual void remove_node(PartBundleNode *node);
46 
47 private:
48  void r_set_character(PartGroup *group, Character *character);
49 
50 public:
51  static void register_with_read_factory();
52 
53  static TypedWritable *make_CharacterJointBundle(const FactoryParams &params);
54 
55 public:
56  virtual TypeHandle get_type() const {
57  return get_class_type();
58  }
59  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
60  static TypeHandle get_class_type() {
61  return _type_handle;
62  }
63  static void init_type() {
64  PartBundle::init_type();
65  register_type(_type_handle, "CharacterJointBundle",
66  PartBundle::get_class_type());
67  }
68 
69 private:
70  static TypeHandle _type_handle;
71 };
72 
73 #include "characterJointBundle.I"
74 
75 #endif
76 
77 
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 vertices...
Definition: character.h:41
Base class for objects that can be written to and read from Bam files.
Definition: typedWritable.h:37
static void register_with_read_factory()
Factory method to generate a PartBundle object.
Definition: partBundle.cxx:910
PartBundleNode * get_node(int n) const
Returns the nth PartBundleNode associated with this PartBundle.
Definition: partBundle.I:209
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:40
This is the root of a MovingPart hierarchy.
Definition: partBundle.h:49
virtual PartGroup * make_copy() const
Allocates and returns a new copy of the node.
Definition: partBundle.cxx:89
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85
This is the base class for PartRoot and MovingPart.
Definition: partGroup.h:45