From 57cf48e7c6fd04f864072c21433a822907774f78 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Thu, 3 Jan 2013 12:08:54 +0000 Subject: Cycles Hair: refactoring to support generic attributes for hair curves. There should be no functional changes yet. UV, tangent and intercept are now stored as attributes, with the intention to add more like multiple uv's, vertex colors, generated coordinates and motion vectors later. Things got a bit messy due to having both triangle and curve data in the same mesh data structure, which also gives us two sets of attributes. This will get cleaned up when we split the mesh class. --- intern/cycles/bvh/bvh_build.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'intern/cycles/bvh/bvh_build.cpp') diff --git a/intern/cycles/bvh/bvh_build.cpp b/intern/cycles/bvh/bvh_build.cpp index cdd94324f53..665c783b2d8 100644 --- a/intern/cycles/bvh/bvh_build.cpp +++ b/intern/cycles/bvh/bvh_build.cpp @@ -85,12 +85,12 @@ void BVHBuild::add_reference_mesh(BoundBox& root, BoundBox& center, Mesh *mesh, } } - for(uint j = 0; j < mesh->curve_segs.size(); j++) { - Mesh::CurveSeg s = mesh->curve_segs[j]; + for(uint j = 0; j < mesh->curve_segments.size(); j++) { + Mesh::CurveSegment s = mesh->curve_segments[j]; BoundBox bounds = BoundBox::empty; for(int k = 0; k < 2; k++) { - float3 pt = mesh->curve_keys[s.v[k]].loc; + float3 pt = mesh->curve_keys[s.v[k]].co; bounds.grow(pt, mesh->curve_keys[s.v[k]].radius); } @@ -118,14 +118,14 @@ void BVHBuild::add_references(BVHRange& root) if(params.top_level) { if(ob->mesh->transform_applied) { num_alloc_references += ob->mesh->triangles.size(); - num_alloc_references += ob->mesh->curve_segs.size(); + num_alloc_references += ob->mesh->curve_segments.size(); } else num_alloc_references++; } else { num_alloc_references += ob->mesh->triangles.size(); - num_alloc_references += ob->mesh->curve_segs.size(); + num_alloc_references += ob->mesh->curve_segments.size(); } } -- cgit v1.2.3