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 }
characterVertexSlider.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
ConfigVariableBool
This is a convenience class to specialize ConfigVariable as a boolean type.
Definition: configVariableBool.h:23
characterJointBundle.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
CharacterJoint::register_with_read_factory
static void register_with_read_factory()
Factory method to generate a CharacterJoint object.
Definition: characterJoint.cxx:552
init_libchar
void init_libchar()
Initializes the library.
Definition: config_char.cxx:51
jointVertexTransform.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
CharacterSlider::register_with_read_factory
static void register_with_read_factory()
Factory method to generate a CharacterSlider object.
Definition: characterSlider.cxx:103
characterJointEffect.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
character.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
CharacterVertexSlider::register_with_read_factory
static void register_with_read_factory()
Tells the BamReader how to create objects of type CharacterVertexSlider.
Definition: characterVertexSlider.cxx:65
config_char.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
dconfig.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
characterSlider.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Character::register_with_read_factory
static void register_with_read_factory()
Tells the BamReader how to create objects of type Character.
Definition: character.cxx:1099
CharacterJointBundle::register_with_read_factory
static void register_with_read_factory()
Factory method to generate a CharacterJointBundle object.
Definition: characterJointBundle.cxx:117
characterJoint.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
JointVertexTransform::register_with_read_factory
static void register_with_read_factory()
Tells the BamReader how to create objects of type JointVertexTransform.
Definition: jointVertexTransform.cxx:94
CharacterJointEffect::register_with_read_factory
static void register_with_read_factory()
Tells the BamReader how to create objects of type CharacterJointEffect.
Definition: characterJointEffect.cxx:194