Panda3D

config_interval.cxx

00001 // Filename: config_interval.cxx
00002 // Created by:  drose (27Aug02)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 #include "config_interval.h"
00016 #include "cInterval.h"
00017 #include "cConstraintInterval.h"
00018 #include "cConstrainTransformInterval.h"
00019 #include "cConstrainPosInterval.h"
00020 #include "cConstrainHprInterval.h"
00021 #include "cConstrainPosHprInterval.h"
00022 #include "cLerpInterval.h"
00023 #include "cLerpNodePathInterval.h"
00024 #include "cLerpAnimEffectInterval.h"
00025 #include "cMetaInterval.h"
00026 #include "showInterval.h"
00027 #include "hideInterval.h"
00028 #include "waitInterval.h"
00029 
00030 #include "dconfig.h"
00031 
00032 Configure(config_interval);
00033 NotifyCategoryDef(interval, "");
00034 
00035 ConfigureFn(config_interval) {
00036   init_libinterval();
00037 }
00038 
00039 ConfigVariableDouble interval_precision
00040 ("interval-precision", 1000.0,
00041  PRC_DESC("Set this to the default value for set_precision() for each "
00042           "CMetaInterval created."));
00043 
00044 ConfigVariableBool verify_intervals
00045 ("verify-intervals", false,
00046  PRC_DESC("Set this true to generate an assertion failure if interval "
00047           "functions are called out-of-order."));
00048 
00049 
00050 ////////////////////////////////////////////////////////////////////
00051 //     Function: init_libinterval
00052 //  Description: Initializes the library.  This must be called at
00053 //               least once before any of the functions or classes in
00054 //               this library can be used.  Normally it will be
00055 //               called by the static initializers and need not be
00056 //               called explicitly, but special cases exist.
00057 ////////////////////////////////////////////////////////////////////
00058 void
00059 init_libinterval() {
00060   static bool initialized = false;
00061   if (initialized) {
00062     return;
00063   }
00064   initialized = true;
00065 
00066   CInterval::init_type();
00067   CConstraintInterval::init_type();
00068   CConstrainTransformInterval::init_type();
00069   CConstrainPosInterval::init_type();
00070   CConstrainHprInterval::init_type();
00071   CConstrainPosHprInterval::init_type();
00072   CLerpInterval::init_type();
00073   CLerpNodePathInterval::init_type();
00074   CLerpAnimEffectInterval::init_type();
00075   CMetaInterval::init_type();
00076   ShowInterval::init_type();
00077   HideInterval::init_type();
00078   WaitInterval::init_type();
00079 }
00080 
 All Classes Functions Variables Enumerations