diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2013-12-31 20:33:55 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2013-12-31 20:38:26 +0400 |
commit | 9cd2b199994ba48f343a89a270827b2e0ed3221d (patch) | |
tree | a90b3f0b2a5a8869b0fb8552a8d660d3d91209c1 /intern/cycles/render/attribute.h | |
parent | 6b03f92aa7bdb10cfde99bc30a7337c843bda57c (diff) |
Cycles Volume Render: generated texture coordinates for volume render.
This does not support staying fixed while the surface deforms, but for static
meshes it should match up with the surface texture coordinates. Implemented
as a matrix transform from objects space to mesh texture space.
Making this work for deforming surfaces would be quite complicated, you might
need something like harmonic coordinates as used in the mesh deform modifier,
probably will not be possible anytime soon.
Diffstat (limited to 'intern/cycles/render/attribute.h')
-rw-r--r-- | intern/cycles/render/attribute.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/intern/cycles/render/attribute.h b/intern/cycles/render/attribute.h index e17a65914dd..0b8905ae5a3 100644 --- a/intern/cycles/render/attribute.h +++ b/intern/cycles/render/attribute.h @@ -31,6 +31,7 @@ class AttributeSet; class AttributeRequest; class AttributeRequestSet; class Mesh; +struct Transform; /* Attribute * @@ -57,13 +58,16 @@ public: char *data() { return (buffer.size())? &buffer[0]: NULL; }; float3 *data_float3() { return (float3*)data(); } float *data_float() { return (float*)data(); } + Transform *data_transform() { return (Transform*)data(); } const char *data() const { return (buffer.size())? &buffer[0]: NULL; } const float3 *data_float3() const { return (const float3*)data(); } const float *data_float() const { return (const float*)data(); } + const Transform *data_transform() const { return (const Transform*)data(); } void add(const float& f); void add(const float3& f); + void add(const Transform& f); static bool same_storage(TypeDesc a, TypeDesc b); static const char *standard_name(AttributeStandard std); |