Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/bvh/bvh_split.cpp
| Show First 20 Lines • Show All 452 Lines • ▼ Show 20 Lines | split_curve_primitive(hair, | ||||
| right_bounds); | right_bounds); | ||||
| } | } | ||||
| void BVHSpatialSplit::split_object_reference( | void BVHSpatialSplit::split_object_reference( | ||||
| const Object *object, int dim, float pos, BoundBox &left_bounds, BoundBox &right_bounds) | const Object *object, int dim, float pos, BoundBox &left_bounds, BoundBox &right_bounds) | ||||
| { | { | ||||
| Geometry *geom = object->geometry; | Geometry *geom = object->geometry; | ||||
| if (geom->type == Geometry::MESH) { | if (geom->type == Geometry::MESH || geom->type == Geometry::VOLUME) { | ||||
| Mesh *mesh = static_cast<Mesh *>(geom); | Mesh *mesh = static_cast<Mesh *>(geom); | ||||
| for (int tri_idx = 0; tri_idx < mesh->num_triangles(); ++tri_idx) { | for (int tri_idx = 0; tri_idx < mesh->num_triangles(); ++tri_idx) { | ||||
| split_triangle_primitive(mesh, &object->tfm, tri_idx, dim, pos, left_bounds, right_bounds); | split_triangle_primitive(mesh, &object->tfm, tri_idx, dim, pos, left_bounds, right_bounds); | ||||
| } | } | ||||
| } | } | ||||
| else if (geom->type == Geometry::HAIR) { | else if (geom->type == Geometry::HAIR) { | ||||
| Hair *hair = static_cast<Hair *>(geom); | Hair *hair = static_cast<Hair *>(geom); | ||||
| for (int curve_idx = 0; curve_idx < hair->num_curves(); ++curve_idx) { | for (int curve_idx = 0; curve_idx < hair->num_curves(); ++curve_idx) { | ||||
| ▲ Show 20 Lines • Show All 48 Lines • Show Last 20 Lines | |||||