Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2013-01-03 16:08:54 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2013-01-03 16:08:54 +0400
commit57cf48e7c6fd04f864072c21433a822907774f78 (patch)
tree45f3fa51f532a03e25c4d8ffa0c1be58027d01b2 /intern/cycles/bvh/bvh_build.cpp
parent8ca977b16e745f716d044a5b6ccbb5be4a70ac94 (diff)
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.
Diffstat (limited to 'intern/cycles/bvh/bvh_build.cpp')
-rw-r--r--intern/cycles/bvh/bvh_build.cpp10
1 files changed, 5 insertions, 5 deletions
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();
}
}