diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-01-03 16:08:54 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-01-03 16:08:54 +0400 |
commit | 57cf48e7c6fd04f864072c21433a822907774f78 (patch) | |
tree | 45f3fa51f532a03e25c4d8ffa0c1be58027d01b2 /intern/cycles/util | |
parent | 8ca977b16e745f716d044a5b6ccbb5be4a70ac94 (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/util')
-rw-r--r-- | intern/cycles/util/CMakeLists.txt | 2 | ||||
-rw-r--r-- | intern/cycles/util/util_attribute.cpp | 51 | ||||
-rw-r--r-- | intern/cycles/util/util_attribute.h | 31 | ||||
-rw-r--r-- | intern/cycles/util/util_types.h | 18 |
4 files changed, 0 insertions, 102 deletions
diff --git a/intern/cycles/util/CMakeLists.txt b/intern/cycles/util/CMakeLists.txt index dce417704cc..bcaaa9a71b9 100644 --- a/intern/cycles/util/CMakeLists.txt +++ b/intern/cycles/util/CMakeLists.txt @@ -9,7 +9,6 @@ set(INC_SYS ) set(SRC - util_attribute.cpp util_cache.cpp util_cuda.cpp util_dynlib.cpp @@ -33,7 +32,6 @@ endif() set(SRC_HEADERS util_algorithm.h util_args.h - util_attribute.h util_boundbox.h util_cache.h util_cuda.h diff --git a/intern/cycles/util/util_attribute.cpp b/intern/cycles/util/util_attribute.cpp deleted file mode 100644 index 057fb6213e9..00000000000 --- a/intern/cycles/util/util_attribute.cpp +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2011, Blender Foundation. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#include "util_attribute.h" - -CCL_NAMESPACE_BEGIN - -const char *attribute_standard_name(AttributeStandard std) -{ - if(std == ATTR_STD_VERTEX_NORMAL) - return "N"; - else if(std == ATTR_STD_FACE_NORMAL) - return "Ng"; - else if(std == ATTR_STD_UV) - return "uv"; - else if(std == ATTR_STD_GENERATED) - return "generated"; - else if(std == ATTR_STD_UV_TANGENT) - return "tangent"; - else if(std == ATTR_STD_UV_TANGENT_SIGN) - return "tangent_sign"; - else if(std == ATTR_STD_POSITION_UNDEFORMED) - return "undeformed"; - else if(std == ATTR_STD_POSITION_UNDISPLACED) - return "undisplaced"; - else if(std == ATTR_STD_MOTION_PRE) - return "motion_pre"; - else if(std == ATTR_STD_MOTION_POST) - return "motion_post"; - else if(std == ATTR_STD_PARTICLE) - return "particle"; - - return ""; -} - -CCL_NAMESPACE_END diff --git a/intern/cycles/util/util_attribute.h b/intern/cycles/util/util_attribute.h deleted file mode 100644 index 334864c7f44..00000000000 --- a/intern/cycles/util/util_attribute.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright 2011, Blender Foundation. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#ifndef __UTIL_ATTRIBUTE_H__ -#define __UTIL_ATTRIBUTE_H__ - -#include "util_types.h" - -CCL_NAMESPACE_BEGIN - -const char *attribute_standard_name(AttributeStandard std); - -CCL_NAMESPACE_END - -#endif /* __UTIL_ATTRIBUTE_H__ */ - diff --git a/intern/cycles/util/util_types.h b/intern/cycles/util/util_types.h index 00b6cf5c56e..bb6de1197e7 100644 --- a/intern/cycles/util/util_types.h +++ b/intern/cycles/util/util_types.h @@ -448,24 +448,6 @@ __device_inline int4 make_int4(const float3& f) #endif -typedef enum AttributeStandard { - ATTR_STD_NONE = 0, - ATTR_STD_VERTEX_NORMAL, - ATTR_STD_FACE_NORMAL, - ATTR_STD_UV, - ATTR_STD_UV_TANGENT, - ATTR_STD_UV_TANGENT_SIGN, - ATTR_STD_GENERATED, - ATTR_STD_POSITION_UNDEFORMED, - ATTR_STD_POSITION_UNDISPLACED, - ATTR_STD_MOTION_PRE, - ATTR_STD_MOTION_POST, - ATTR_STD_PARTICLE, - ATTR_STD_NUM, - - ATTR_STD_NOT_FOUND = ~0 -} AttributeStandard; - CCL_NAMESPACE_END #endif /* __UTIL_TYPES_H__ */ |