Panda3D
 All Classes Functions Variables Enumerations
config_char.cxx
1 // Filename: config_char.cxx
2 // Created by: drose (28Feb00)
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 
16 #include "config_char.h"
17 #include "character.h"
18 #include "characterJoint.h"
19 #include "characterJointBundle.h"
20 #include "characterJointEffect.h"
21 #include "characterSlider.h"
22 #include "characterVertexSlider.h"
23 #include "jointVertexTransform.h"
24 #include "dconfig.h"
25 
26 Configure(config_char);
27 NotifyCategoryDef(char, "");
28 
29 ConfigureFn(config_char) {
30  init_libchar();
31 }
32 
33 ConfigVariableBool even_animation
34 ("even-animation", false,
35  PRC_DESC("When this is true, characters' vertices will be recomputed "
36  "every frame, whether they need it or not. This will tend to "
37  "balance out the frame rate so that it is more uniformly slow. "
38  "The default is to compute vertices only when they need to be "
39  "computed, which can lead to an uneven frame rate."));
40 
41 
42 ////////////////////////////////////////////////////////////////////
43 // Function: init_libchar
44 // Description: Initializes the library. This must be called at
45 // least once before any of the functions or classes in
46 // this library can be used. Normally it will be
47 // called by the static initializers and need not be
48 // called explicitly, but special cases exist.
49 ////////////////////////////////////////////////////////////////////
50 void
51 init_libchar() {
52  static bool initialized = false;
53  if (initialized) {
54  return;
55  }
56  initialized = true;
57 
58  Character::init_type();
59  CharacterJoint::init_type();
60  CharacterJointBundle::init_type();
61  CharacterJointEffect::init_type();
62  CharacterSlider::init_type();
63  CharacterVertexSlider::init_type();
64  JointVertexTransform::init_type();
65 
66  //Registration of writeable object's creation
67  //functions with BamReader's factory
75 }
76 
static void register_with_read_factory()
Factory method to generate a CharacterSlider object.
This is a convenience class to specialize ConfigVariable as a boolean type.
static void register_with_read_factory()
Factory method to generate a CharacterJoint object.
static void register_with_read_factory()
Tells the BamReader how to create objects of type CharacterVertexSlider.
static void register_with_read_factory()
Factory method to generate a CharacterJointBundle object.
static void register_with_read_factory()
Tells the BamReader how to create objects of type JointVertexTransform.
static void register_with_read_factory()
Tells the BamReader how to create objects of type CharacterJointEffect.
static void register_with_read_factory()
Tells the BamReader how to create objects of type Character.
Definition: character.cxx:1233