Panda3D
config_mathutil.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_mathutil.cxx
10  * @author drose
11  * @date 1999-10-01
12  */
13 
14 #include "config_mathutil.h"
15 #include "boundingVolume.h"
17 #include "finiteBoundingVolume.h"
18 #include "omniBoundingVolume.h"
19 #include "boundingSphere.h"
20 #include "boundingBox.h"
21 #include "boundingHexahedron.h"
22 #include "boundingLine.h"
23 #include "boundingPlane.h"
24 #include "unionBoundingVolume.h"
26 #include "dconfig.h"
27 #include "pandaSystem.h"
28 
29 #if !defined(CPPPARSER) && !defined(LINK_ALL_STATIC) && !defined(BUILDING_PANDA_MATHUTIL)
30  #error Buildsystem error: BUILDING_PANDA_MATHUTIL not defined
31 #endif
32 
33 Configure(config_mathutil);
34 NotifyCategoryDef(mathutil, "");
35 
36 ConfigureFn(config_mathutil) {
38 }
39 
40 ConfigVariableDouble fft_offset
41 ("fft-offset", 0.001);
42 
43 ConfigVariableDouble fft_factor
44 ("fft-factor", 0.1);
45 
46 ConfigVariableDouble fft_exponent
47 ("fft-exponent", 4);
48 
49 ConfigVariableDouble fft_error_threshold
50 ("fft-error-threshold", 0.2);
51 
53 ("bounds-type", BoundingVolume::BT_sphere,
54  PRC_DESC("Specify the type of bounding volume that is created automatically "
55  "by Panda to enclose geometry. Use 'sphere' or 'box', or use "
56  "'best' to let Panda decide which is most appropriate. You can "
57  "also use 'fastest' if you don't want Panda to waste much time "
58  "computing the most optimal bounding volume."));
59 
60 /**
61  * Initializes the library. This must be called at least once before any of
62  * the functions or classes in this library can be used. Normally it will be
63  * called by the static initializers and need not be called explicitly, but
64  * special cases exist.
65  */
66 void
68  static bool initialized = false;
69  if (initialized) {
70  return;
71  }
72  initialized = true;
73 
74  BoundingHexahedron::init_type();
75  BoundingSphere::init_type();
76  BoundingBox::init_type();
77  BoundingVolume::init_type();
78  FiniteBoundingVolume::init_type();
79  GeometricBoundingVolume::init_type();
80  OmniBoundingVolume::init_type();
81  UnionBoundingVolume::init_type();
82  IntersectionBoundingVolume::init_type();
83  BoundingLine::init_type();
84  BoundingPlane::init_type();
85 
86 #ifdef HAVE_FFTW
88  ps->add_system("fftw");
89 #endif // FFTW
90 }
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
static PandaSystem * get_global_ptr()
Returns the global PandaSystem object.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This class is used as a namespace to group several global properties of Panda.
Definition: pandaSystem.h:26
void init_libmathutil()
Initializes the library.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is a convenience class to specialize ConfigVariable as a floating- point type.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This class specializes ConfigVariable as an enumerated type.
void add_system(const std::string &system)
Intended for use by each subsystem to register itself at startup.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.