mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
continue looking for further intersections against remaining triangles in a geom
This commit is contained in:
parent
114020c20b
commit
c2f3a412dd
@ -145,12 +145,12 @@ xform(const LMatrix4f &mat) {
|
||||
// and then convert them back. Hopefully we won't lose too much
|
||||
// precision during all of this.
|
||||
|
||||
if (collide_cat.is_debug()) {
|
||||
collide_cat.debug()
|
||||
if (collide_cat.is_spam()) {
|
||||
collide_cat.spam()
|
||||
<< "CollisionPolygon transformed by:\n";
|
||||
mat.write(collide_cat.debug(false), 2);
|
||||
mat.write(collide_cat.spam(false), 2);
|
||||
if (_points.empty()) {
|
||||
collide_cat.debug(false)
|
||||
collide_cat.spam(false)
|
||||
<< " (no points)\n";
|
||||
}
|
||||
}
|
||||
@ -627,12 +627,12 @@ setup_points(const LPoint3f *begin, const LPoint3f *end) {
|
||||
}
|
||||
}
|
||||
|
||||
if (collide_cat.is_debug()) {
|
||||
collide_cat.debug()
|
||||
if (collide_cat.is_spam()) {
|
||||
collide_cat.spam()
|
||||
<< "CollisionPolygon defined with " << num_points << " vertices:\n";
|
||||
const LPoint3f *pi;
|
||||
for (pi = begin; pi != end; ++pi) {
|
||||
collide_cat.debug(false) << " " << (*pi) << "\n";
|
||||
collide_cat.spam(false) << " " << (*pi) << "\n";
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -601,11 +601,10 @@ compare_collider_to_geom(CollisionEntry &entry, Geom *geom,
|
||||
coords[tris[i + 2]])) {
|
||||
// Generate a temporary CollisionPolygon on the fly for each
|
||||
// triangle in the Geom.
|
||||
CollisionPolygon poly(coords[tris[i]], coords[tris[i + 1]],
|
||||
entry._into =
|
||||
new CollisionPolygon(coords[tris[i]], coords[tris[i + 1]],
|
||||
coords[tris[i + 2]]);
|
||||
if (entry.get_from()->test_intersection((*ci).second, entry, &poly) != 0) {
|
||||
return;
|
||||
}
|
||||
entry.get_from()->test_intersection((*ci).second, entry, entry.get_into());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user