Commit Graph

460 Commits

Author SHA1 Message Date
rdb 88ba7badd4 collide: Fix false negative when sphere is fully inside box
Fixes #1335
2022-08-31 16:23:15 +02:00
rdb cb4bcbe67e collide: Fix typo causing compile error on Windows with Python 3.10 2021-08-30 21:27:53 +02:00
rdb 28ad032210 collide: Fix CollisionHandlerGravity docstrings
[skip ci]
2021-02-08 19:41:46 +01:00
rdb b1942e8065 collide: Add wires to CollisionBox viz
This should make it a lot easier to see the box as opposed to looking at a continuous white shape.
2021-01-30 13:52:03 +01:00
rdb f8ce339960 collide: Add pickle support for most collision handlers
Also redo CollisionHandlerEvent pickling to use Datagram instead

Related to #1090
2021-01-01 16:56:18 +01:00
rdb 8852c835fc collide: Support pickling for CollisionTraverser, HandlerEvent+Queue
Fixes #1090
2020-12-31 16:57:34 +01:00
rdb ac991e4c5e collide: Fix error with CollisionHandler's again_patterns property 2020-12-31 16:55:22 +01:00
rdb 8c3fd5b406 collide: Release GIL while during CollisionTraverser traversal
This is necessary to prevent deadlocking on the GIL if some Python code is trying to write some geometry while the CollisionTraverser is trying to read it.

Fixes #1033
2020-11-02 12:18:22 +01:00
rdb 3fe1d286d0 collide: Add docstring for CollisionTraverser::traverse() 2020-07-25 12:50:09 +02:00
rdb 26ba2b15cd collide: unexpose verify_points overload taking LPoint3 array
Similar as in #908
2020-05-11 09:09:00 +02:00
rdb ed73394275 collide: fix erroneous collision if sphere is under edge of polygon
Reproducible by the code in #907, occurs if the sphere is close to the edge, but its center is off and under the polygon.
2020-05-05 16:33:20 +02:00
rdb 2ed4516cb2 collide: Unexpose CollisionPolygon constructor taking point array
This could never work in Python, and does indeed cause a crash, so I don't consider this compat-breaking.

Fixes #908
2020-05-05 14:51:31 +02:00
rdb b549133b3e collide: protect info print with is_info() check
This prevents an unnecessary sqrt
2020-03-16 14:55:42 +01:00
rdb e8d8f20acb collide: fix pusher convex angle detection for visible geometry
Previously it was only working for CollisionPolygon.

Fixes #879
2020-03-08 10:30:04 +01:00
rdb 08572f3c38 general: Fix a variety of ABI incompatibility issues with opt4 builds 2019-10-08 19:44:29 +02:00
rdb 05ed918d63 general: mark deprecated methods with the @deprecated tag
This makes them easier to find and, if necessary, automatically generate deprecation warnings for.
2019-09-08 09:50:28 +02:00
rdb d9d30cdfd2 collide: compat for typo'ed respect_prev_transform property in 1.10 2019-04-29 22:29:36 +02:00
rdb 3ea562d404 collide: handle degenerate case for into-sphere test more robustly
This case happens, for example, when colliding a capsule with identical begin and end points into a sphere.
2019-03-29 13:29:14 +01:00
rdb e486bbcb3f collide: fix printing CollisionBox 2019-03-17 19:06:45 +01:00
rdb 9bf37051ac collide: fix _collider_sort not copied in CollisionNode copy ctor
See #554
2019-02-17 10:56:02 +01:00
rdb 2afd604c9d collide: implement capsule-into-invsphere and box-into-invsphere tests 2019-02-04 23:50:53 +01:00
rdb e2574af82d collide: create compatibility header collisionTube.h
This is a separate commit from the previous one in order not to confuse Git's rename tracking.
2018-12-23 22:28:12 +01:00
rdb bd6ef2b0ea Rename CollisionTube to CollisionCapsule (bam 6.44)
Adds ability to register "obsolete" names for certain types under older .bam versions, so that we are still able to write out old .bam files.

Fixes #347
2018-12-23 22:28:06 +01:00
loblao 604366aaa7 CollisionEntrySorter: Check if entry has surface point
Fixes #435
2018-11-01 16:28:43 +01:00
rdb bcc2e3e404 gobj: add Geom::get_animated_vertex_data() short-hand
This is a method for getting the animated vertex data that will keep working even if GeomVertexData::animate_vertices() gets deprecated due to #421 being fixed.
2018-10-15 22:13:21 +02:00
Sam Edwards 4695557a5d general: Don't require BUILDING_* for static builds 2018-08-31 23:54:32 -06:00
Sam Edwards 6105953b40 general: Add forgotten include 2018-08-14 17:23:56 -06:00
rdb 7e290b221b Remove a few unused and obsolete C++ test files 2018-08-03 21:09:36 +02:00
rdb 91b01e5621 collide: add tube-into-box collision test 2018-07-30 22:37:02 +02:00
rdb 911a549386 collide: add tube-into-tube collision test 2018-07-17 22:30:06 +02:00
rdb 71b4b807f8 collide: add line-into-box test, improve segment/ray into box 2018-07-17 22:24:35 +02:00
rdb c6ed4e1836 general: don't cast to regular pointer when returning a PointerTo
This is inefficient because it induces an unnecessary ref()/unref() pair when we just need to move the pointer out of the function.  Thanks to 23128e4695, we can now move between related pointer types, making the .p() hack unnecessary.
2018-07-08 21:40:58 +02:00
rdb 886e1c2f16 general: fix many compilation warnings in GCC 8 2018-06-19 00:37:28 +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 e0245d2777 First step towards eliminating `using namespace std;` (#335) 2018-06-03 20:32:23 +02: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 6b726fa697 general: fix various compiler warnings and issues exposed thereby 2018-05-30 11:09:35 +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
rdb 3977b9c57c collide: fix multithreaded pipeline crash with CollisionVisualizer 2018-01-18 21:23:54 +01:00
rdb 69b3468b2c interrogate: more improvements to seq/map wrappers
Gets rid of properties defined as both MAKE_SEQ_PROPERTY/MAKE_MAP_PROPERTY, which are just a bad idea. Instead, adds a way for map properties to define a separate "keys" interface.

Fixes: #203
2017-11-27 17:29:50 +01:00
rdb dd2806c8bd Mark constructors 'explicit' for which coercion makes no sense 2017-11-06 19:47:38 +01:00
Eric Klawitter 5758fdf8f5 Fix 'of of' doc typos 2017-10-09 14:56:40 -05:00
rdb d1c34c3360 interrogate: support static properties 2017-08-07 22:04:56 +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 4ed199cece Fix various compile warnings and a few code consistency issues 2017-01-09 20:36:53 +01:00
rdb a757cb47e8 Add tube-into-plane and tube-into-sphere tests 2016-10-24 17:34:55 +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