Cleanup: Cycles: use existing utility functions for geometry types

Pull Request: https://projects.blender.org/blender/blender/pulls/129552
This commit is contained in:
Weizhen Huang
2024-10-30 16:45:56 +01:00
committed by Weizhen Huang
parent 1dbe94c8ac
commit 34b95fe3f6
11 changed files with 61 additions and 64 deletions

View File

@@ -922,10 +922,10 @@ hiprtScene HIPRTDevice::build_tlas(BVHHIPRT *bvh,
custom_prim_info_offset[blender_instance_id].x = offset;
custom_prim_info_offset[blender_instance_id].y = custom_prim_offset;
if (geom->geometry_type == Geometry::HAIR) {
if (geom->is_hair()) {
custom_prim_offset += ((Hair *)geom)->num_curves();
}
else if (geom->geometry_type == Geometry::POINTCLOUD) {
else if (geom->is_pointcloud()) {
custom_prim_offset += ((PointCloud *)geom)->num_points();
}
else {