Panda3D
config_char.cxx
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 config_char.cxx
10  * @author drose
11  * @date 2000-02-28
12  */
13 
14 #include "config_char.h"
15 #include "character.h"
16 #include "characterJoint.h"
17 #include "characterJointBundle.h"
18 #include "characterJointEffect.h"
19 #include "characterSlider.h"
20 #include "characterVertexSlider.h"
21 #include "jointVertexTransform.h"
22 #include "dconfig.h"
23 
24 #if !defined(CPPPARSER) && !defined(LINK_ALL_STATIC) && !defined(BUILDING_PANDA_CHAR)
25  #error Buildsystem error: BUILDING_PANDA_CHAR not defined
26 #endif
27 
28 Configure(config_char);
29 NotifyCategoryDef(char, "");
30 
31 ConfigureFn(config_char) {
32  init_libchar();
33 }
34 
35 ConfigVariableBool even_animation
36 ("even-animation", false,
37  PRC_DESC("When this is true, characters' vertices will be recomputed "
38  "every frame, whether they need it or not. This will tend to "
39  "balance out the frame rate so that it is more uniformly slow. "
40  "The default is to compute vertices only when they need to be "
41  "computed, which can lead to an uneven frame rate."));
42 
43 
44 /**
45  * Initializes the library. This must be called at least once before any of
46  * the functions or classes in this library can be used. Normally it will be
47  * called by the static initializers and need not be called explicitly, but
48  * special cases exist.
49  */
50 void
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 functions with BamReader's
67  // factory
75 }
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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.
void init_libchar()
Initializes the library.
Definition: config_char.cxx:51
static void register_with_read_factory()
Tells the BamReader how to create objects of type JointVertexTransform.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
static void register_with_read_factory()
Tells the BamReader how to create objects of type CharacterJointEffect.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
static void register_with_read_factory()
Tells the BamReader how to create objects of type Character.
Definition: character.cxx:1099