Panda3D
config_interval.cxx
1 // Filename: config_interval.cxx
2 // Created by: drose (27Aug02)
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 #include "config_interval.h"
16 #include "cInterval.h"
17 #include "cConstraintInterval.h"
18 #include "cConstrainTransformInterval.h"
19 #include "cConstrainPosInterval.h"
20 #include "cConstrainHprInterval.h"
21 #include "cConstrainPosHprInterval.h"
22 #include "cLerpInterval.h"
23 #include "cLerpNodePathInterval.h"
24 #include "cLerpAnimEffectInterval.h"
25 #include "cMetaInterval.h"
26 #include "showInterval.h"
27 #include "hideInterval.h"
28 #include "waitInterval.h"
29 #include "lerpblend.h"
30 
31 #include "dconfig.h"
32 
33 Configure(config_interval);
34 NotifyCategoryDef(interval, "");
35 
36 ConfigureFn(config_interval) {
37  init_libinterval();
38 }
39 
40 ConfigVariableDouble interval_precision
41 ("interval-precision", 1000.0,
42  PRC_DESC("Set this to the default value for set_precision() for each "
43  "CMetaInterval created."));
44 
45 ConfigVariableBool verify_intervals
46 ("verify-intervals", false,
47  PRC_DESC("Set this true to generate an assertion failure if interval "
48  "functions are called out-of-order."));
49 
50 
51 ////////////////////////////////////////////////////////////////////
52 // Function: init_libinterval
53 // Description: Initializes the library. This must be called at
54 // least once before any of the functions or classes in
55 // this library can be used. Normally it will be
56 // called by the static initializers and need not be
57 // called explicitly, but special cases exist.
58 ////////////////////////////////////////////////////////////////////
59 void
60 init_libinterval() {
61  static bool initialized = false;
62  if (initialized) {
63  return;
64  }
65  initialized = true;
66 
67  CInterval::init_type();
68  CConstraintInterval::init_type();
69  CConstrainTransformInterval::init_type();
70  CConstrainPosInterval::init_type();
71  CConstrainHprInterval::init_type();
72  CConstrainPosHprInterval::init_type();
73  CLerpInterval::init_type();
74  CLerpNodePathInterval::init_type();
75  CLerpAnimEffectInterval::init_type();
76  CMetaInterval::init_type();
77  ShowInterval::init_type();
78  HideInterval::init_type();
79  WaitInterval::init_type();
80  LerpBlendType::init_type();
81  EaseInBlendType::init_type();
82  EaseOutBlendType::init_type();
83  EaseInOutBlendType::init_type();
84  NoBlendType::init_type();
85 }
86 
This is a convenience class to specialize ConfigVariable as a boolean type.
This is a convenience class to specialize ConfigVariable as a floating-point type.