mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -04:00
fixed bins not sorting?
This commit is contained in:
parent
1afba99e1f
commit
5e1b5bae8d
@ -49,21 +49,8 @@ CullBinFixed::
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
void CullBinFixed::
|
void CullBinFixed::
|
||||||
add_object(CullableObject *object) {
|
add_object(CullableObject *object) {
|
||||||
// Determine the center of the bounding volume.
|
int draw_order = object->_state->get_draw_order();
|
||||||
const BoundingVolume &volume = object->_geom->get_bound();
|
_objects.push_back(ObjectData(object, draw_order));
|
||||||
|
|
||||||
if (!volume.is_empty() &&
|
|
||||||
volume.is_of_type(GeometricBoundingVolume::get_class_type())) {
|
|
||||||
const GeometricBoundingVolume *gbv;
|
|
||||||
DCAST_INTO_V(gbv, &volume);
|
|
||||||
|
|
||||||
LPoint3f center = gbv->get_approx_center();
|
|
||||||
nassertv(object->_transform != (const TransformState *)NULL);
|
|
||||||
center = center * object->_transform->get_mat();
|
|
||||||
|
|
||||||
int draw_order = object->_state->get_draw_order();
|
|
||||||
_objects.push_back(ObjectData(object, draw_order));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
|
Loading…
x
Reference in New Issue
Block a user