Commit Graph

189 Commits

Author SHA1 Message Date
rdb 9c4cb28805 mathutil: error instead of infinite loop if triangulation failed
Fixes #985
2020-08-11 09:38:41 +02:00
rdb 39988e4787 general: update a few outdated links in API documentation 2019-11-02 19:41:56 +01:00
rdb 66b338c112 mathutil: workaround for infinite loop in Triangulator
Fixes #737
2019-09-18 15:45:45 +02:00
rdb c1c74e2cd3 mathutil: add some more assertion checks to PerlinNoise2 2019-05-12 19:22:26 +02:00
rdb bafd523e2b mathutil: fix bad assert in BoundingBox::set_min_max 2019-03-12 15:36:47 +01:00
rdb 6b8814f9c9 mathutil: add some properties for bounding volumes 2018-12-16 21:03:43 +01:00
Sam Edwards a9dfd8352e general: Distinguish local/system includes
This changes includes so that local includes are consistently
#include "localFile.h"
while system and third-party includes are consistently
#include <systemFile.h>

This commit mostly converts the former to the latter; the two
exceptions are in android_main.cxx and fmodAudioSound.h, where
the reverse was necessary.
2018-11-10 18:00:10 -07:00
Sam Edwards 87d1048f79 mathutil: mersenne.h parameters should not be an enum
This makes no sense as an enum; they're constants, so
they should be static const.
2018-09-30 16:05:39 -06:00
Sam Edwards 4695557a5d general: Don't require BUILDING_* for static builds 2018-08-31 23:54:32 -06:00
rdb 433f734d43 mathutil: BoundingPlane improvements 2018-08-08 21:54:52 +02:00
rdb d081b4d420 mathutil: override plane.normalize() to be meaningful for planes
Now it only divides by the length of the normal, rather than also adding in the square of the w component.
2018-07-26 22:08:37 +02:00
rdb bbb15631c6 mathutil: support infinite near/far in LFrustum
I don't know if anyone is using LFrustum, but just in case, it's good to support this corner case.
2018-07-17 23:00:57 +02:00
Sam Edwards b2bfb31114 general: Remove `using std::*` from headers
Also remove most `using namespace std;` statements. The only one that remains is in py_panda.h.

Closes #350
Closes #335
2018-06-14 16:04:49 +02:00
Sam Edwards 7790f8429d general: Fully qualify header references into the std namespace
Closes #341
2018-06-07 10:35:12 +02:00
Sam Edwards e2b4353800 general: Replace NULL (and 0 as pointer) with C++11 nullptr
Exceptions to this replacement are:
- .c files
- Headers included by a .c file
- stb_image.h
- dr_flac.h
- Strings
- Comments
2018-06-03 16:35:13 -06:00
rdb db5dd98d33 general: further warning fixes, use -Wno-unused-variable if NDEBUG
Disabling unused variable checking is needed in NDEBUG builds because of the heavy use of temporary variables in asserts.
2018-05-30 22:51:04 +02:00
rdb 9fad3dba60 general: remove macros for compatibility with non-C++11 compilers
Now that we require MSVC 2015, we no longer need all this nonsense, so we can write cleaner code.
2018-05-23 23:33:05 +02:00
Sam Edwards 9dd37e9dbc general: Add guards to ensure proper BUILDING_ macros defined
This is designed to sanity-check the buildsystem, ensuring that the
expected BUILDING_ macros are defined at the expected time. It
also helps catch cases where the wrong BUILDING_/EXPCL_ macros
are used.
2018-03-25 13:17:52 -06:00
Sam Edwards cfd70ebead general: Remove '#pragma interface'/'#pragma implementation'
The GCC documentation states that, as of GCC 2.7.2, these aren't
necessary for proper program behavior. The documentation further
discourages their use because they don't suppress unnecessary code
duplication.

The Panda codebase these days uses "extern template class" instead,
which tells the compiler not to perform implicit template expansion
because an explicit template expansion is available for linking
elsewhere in the program. This is a more compiler-neutral way of
achieving the same thing as '#pragma interface', making
'#pragma interface' not only redundant, it could also mask problems
in the "extern template class" machinery.
2018-03-20 14:36:19 -04:00
Sam Edwards ad7669e12a mathutil: Update FFTCompressor for FFTW3
This has been due for a while. The last FFTW 2.x release was in 1999.

Note that this does change some of the loops; this has two benefits:
1) The halfcomplex storage order is now explained with a comment.
2) It fixed the special case "don't break a run of bytes for a zero" which
   was never triggering due to the value not being *exactly* 0.0.

I have tested these changes against older FFT-compressed animation .bams
and no noticeable decompression changes are present, so a .bam version
bump is not necessary.
2018-02-17 22:32:38 -07:00
rdb dd2806c8bd Mark constructors 'explicit' for which coercion makes no sense 2017-11-06 19:47:38 +01:00
rdb 925ce854d0 general: make DO_MEMORY_USAGE setting not change ABI compatibility 2017-07-10 19:50:09 +02:00
rdb 6f8b379bda Big patch full of performance improvements
This particularly benefits applications with a lot of nodes.
2017-04-03 01:41:23 +02:00
rdb 18874fa151 Replace PN_int/uint types with stdint.h types, since all compilers we support have them.
Plus, we already had code that relied on them being available anyway.
2016-05-11 00:27:58 +02:00
rdb ce29ae490d Interrogate improvements, more properties, MAKE_SEQ_PROPERTY 2016-05-11 00:16:53 +02:00
tobspr 0fcfb8e372 New file headers, new comment style 2016-02-17 17:47:48 +01:00
rdb 62cdb5cac5 Remove temp-hpr-fix 2015-12-26 13:26:10 +01:00
rdb 1d2ba26e26 Merge branch 'release/1.9.x' 2015-11-13 19:26:57 +01:00
rdb c9921271d6 Fix recursion in inline function in LFrustum 2015-11-12 02:59:15 +01:00
rdb db3ab953e4 Remove ppremake, genPyCode, and all hacks created to support them 2015-11-09 19:06:49 +01:00
rdb ddf8343590 Reorganise explicit template instantiations so that it always happens in the .cxx file, while remaining backward compatible with MSVC's standards-breaking implementation 2015-10-16 15:38:28 +02:00
tobspr 8a8cc94cbb Add setters to BoundingBox and BoundingSphere 2015-08-08 20:59:56 +02:00
rdb f33e450823 A lot of performance changes, particularly wrt dcasts and state management 2015-07-27 16:32:57 +02:00
rdb cc62e731b7 Fix compilation with ppremake 2015-06-01 00:21:32 +02:00
rdb f1ea25bfb1 Unexpose BoundingVolume::around, add GraphicsOutput::get_fb_size 2015-04-25 17:13:35 +02:00
rdb 16e7831566 Remove executable permissions from files that don't need them 2015-04-05 15:41:49 +02:00
rdb 238cbad2a1 Merge branch 'master' into interrogate-overhaul 2015-02-27 12:48:33 +01:00
rdb db87bc7914 PointerToArray fixes, Windows build fixes, more move constructors 2015-02-27 12:45:11 +01:00
rdb 4dc4c9eb3d Merge branch 'master' into interrogate-overhaul
Conflicts:
	dtool/src/interrogate/functionRemap.cxx
	dtool/src/interrogate/interfaceMakerPythonNative.cxx
	panda/src/event/pythonTask.cxx
	panda/src/express/multifile.h
	panda/src/express/pointerToArray.I
	panda/src/mathutil/config_mathutil.N
	panda/src/putil/config_util.N
	panda/src/putil/doubleBitMask.h
2015-02-11 14:41:58 +01:00
rdb cbd70ad8af Move all Python bindings out of core DLLs into the .pyd files. 2015-02-10 14:30:51 +01:00
rdb e9a64736a3 Fix 32-bit Windows compilation issues with Eigen 2015-02-09 16:51:59 +01:00
rdb b2f73d0877 Merge branch 'master' into interrogate-overhaul 2015-02-08 12:11:19 +01:00
rdb b9899ba747 Cull improvements: tighter sphere generation 2015-01-08 23:17:06 +01:00
rdb 6db5d0dc11 Huge cppparser and interrogate overhaul, bringing:
* Better support for typedefs
* Same code should compile for both 32-bit and 64-bit
* C++11 typed enum support
* Synthesize __setitem__ when operator [] returns reference
* Rewrite coerce system to have better performance
* Change semantics of __getattr__ and __setattr__ to match
  Python's, add __getattribute__, __delattr__ and __delitem__
* Improve performance of slot functions a bit more
* Reduce memory overhead of type system
* Some support for wrapping arrays of numeric types
* C++11 character type support in cppparser
* Chars are handled as strings of length 1
* Template functions for CreatePyInstance that use runtime type map
* More functions from dtool as extension functions
* Code cleanup
2014-12-30 16:43:52 +01:00
rdb 40a40b20cf Rename EventStoreValue to ParamValue to make it more generic,
in anticipation of new parameter system
2014-12-10 00:26:26 +01:00
David Rose a9d1d1ad54 fix build issue, should include look_at.h instead of look_at_src.h 2014-10-21 18:07:27 +00:00
rdb a65b477734 Commit patches by cfsworks:
cxx: Fix missing includes masked by composite builds.
misc: Fix typos in comments.
config: Fix missing config forward-declarations.
direct: Adjust Python imports to panda3d.* instead of pandac.*.
display: Split graphicsWindow out into an extension.
framework: Use if/elif/elif/endif instead of ifdef/elif/elif/endif.
ode: Remove erroneous INLINE declarations.
interval: Fix missing import.
2014-10-19 22:41:47 +00:00
rdb 31a71c990d Fix issues with OS X 10.9 compilation, fix issues uncovered by clang 2014-10-12 18:45:37 +00:00
rdb 87910799b6 Split off epvector.h into its own file in an attempt to cut down compilation time 2014-09-14 22:04:36 +00:00
rdb 0a8b35bcea Add PTA class for integer vectors 2014-06-25 08:37:03 +00:00