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
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 functions with BamReader's
67 // factory
68 Character::register_with_read_factory();
69 CharacterJoint::register_with_read_factory();
70 CharacterJointBundle::register_with_read_factory();
71 CharacterJointEffect::register_with_read_factory();
72 CharacterSlider::register_with_read_factory();
73 CharacterVertexSlider::register_with_read_factory();
74 JointVertexTransform::register_with_read_factory();
75 }
characterJointBundle.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
characterJointEffect.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
characterJoint.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
characterSlider.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
characterVertexSlider.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
character.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
CharacterJointBundle::register_with_read_factory
static void register_with_read_factory()
Factory method to generate a CharacterJointBundle object.
Definition: characterJointBundle.cxx:117
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
CharacterJoint::register_with_read_factory
static void register_with_read_factory()
Factory method to generate a CharacterJoint object.
Definition: characterJoint.cxx:552
CharacterSlider::register_with_read_factory
static void register_with_read_factory()
Factory method to generate a CharacterSlider object.
Definition: characterSlider.cxx:111
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
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
ConfigVariableBool
This is a convenience class to specialize ConfigVariable as a boolean type.
Definition: configVariableBool.h:23
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
init_libchar
void init_libchar()
Initializes the library.
Definition: config_char.cxx:51
config_char.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
dconfig.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
jointVertexTransform.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.