diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-01-16 21:56:40 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-01-20 14:46:15 +0300 |
commit | 461214508c26110de615e0797cb63bf0df02bdca (patch) | |
tree | ec0aa55d516de9650a7ad65e9d1077141884d7c3 /intern/cycles/render/mesh.h | |
parent | 811e6c2d32c5cd84112c6ee64af6ecb482186d91 (diff) |
Cycles: Add utility function to fetch motion triangle when on CPU side
Diffstat (limited to 'intern/cycles/render/mesh.h')
-rw-r--r-- | intern/cycles/render/mesh.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/intern/cycles/render/mesh.h b/intern/cycles/render/mesh.h index c0310f45840..33d8acc9c8b 100644 --- a/intern/cycles/render/mesh.h +++ b/intern/cycles/render/mesh.h @@ -31,6 +31,7 @@ CCL_NAMESPACE_BEGIN +class Attribute; class BVH; class Device; class DeviceScene; @@ -54,11 +55,27 @@ public: int v[3]; void bounds_grow(const float3 *verts, BoundBox& bounds) const; + + void motion_verts(const float3 *verts, + const float3 *vert_steps, + size_t num_verts, + size_t num_steps, + float time, + float3 r_verts[3]) const; + + void verts_for_step(const float3 *verts, + const float3 *vert_steps, + size_t num_verts, + size_t num_steps, + size_t step, + float3 r_verts[3]) const; }; Triangle get_triangle(size_t i) const { - Triangle tri = {{triangles[i*3 + 0], triangles[i*3 + 1], triangles[i*3 + 2]}}; + Triangle tri = {{triangles[i*3 + 0], + triangles[i*3 + 1], + triangles[i*3 + 2]}}; return tri; } |