23 assert(
type == TypeDesc::TypeFloat ||
type == TypeDesc::TypeColor ||
24 type == TypeDesc::TypePoint ||
type == TypeDesc::TypeVector ||
69 char *
data = (
char *)&f;
70 size_t size =
sizeof(f);
72 for (
size_t i = 0; i <
size; i++)
82 char *
data = (
char *)&f;
83 size_t size =
sizeof(f);
85 for (
size_t i = 0; i <
size; i++)
95 char *
data = (
char *)&f;
96 size_t size =
sizeof(f);
98 for (
size_t i = 0; i <
size; i++)
108 char *
data = (
char *)&f;
109 size_t size =
sizeof(f);
111 for (
size_t i = 0; i <
size; i++)
121 char *
data = (
char *)&f;
122 size_t size =
sizeof(f);
124 for (
size_t i = 0; i <
size; i++)
134 for (
size_t i = 0; i <
size; i++)
142 assert(other.std ==
std);
143 assert(other.type ==
type);
144 assert(other.element ==
element);
146 this->
flags = other.flags;
148 if (this->
buffer.size() != other.buffer.size()) {
149 this->
buffer = std::move(other.buffer);
152 else if (memcmp(this->
data(), other.data(), other.buffer.size()) != 0) {
153 this->
buffer = std::move(other.buffer);
164 else if (
type == TypeDesc::TypeFloat)
165 return sizeof(
float);
168 else if (
type == TypeDesc::TypeMatrix)
212 size = pointcloud->
num_points() * (pointcloud->get_motion_steps() - 1);
240 Hair *hair =
static_cast<Hair *
>(geom);
246 Hair *hair =
static_cast<Hair *
>(geom);
247 size = hair->get_curve_keys().size();
252 Hair *hair =
static_cast<Hair *
>(geom);
254 size = hair->get_curve_keys().size() * (hair->get_motion_steps() - 1);
274 if (
a == TypeDesc::TypeColor ||
a == TypeDesc::TypePoint ||
a == TypeDesc::TypeVector ||
275 a == TypeDesc::TypeNormal) {
276 if (
b == TypeDesc::TypeColor ||
b == TypeDesc::TypePoint ||
b == TypeDesc::TypeVector ||
277 b == TypeDesc::TypeNormal) {
292 for (
int i = 0; i < 4; i++) {
297 *((
float *)dst) += *((
float *)
src) * weight;
306 assert(!
"not implemented for this type");
322 return "generated_transform";
326 return "tangent_sign";
328 return "vertex_color";
332 return "undisplaced";
340 return "curve_intercept";
342 return "curve_length";
344 return "curve_random";
346 return "point_random";
348 return "ptex_face_id";
360 return "temperature";
372 return "random_per_island";
374 return "shadow_transparency";
403 if (attr.
type == TypeDesc::TypeFloat) {
420 unordered_set<int> &
tiles)
const
428 for (
int i = 0; i < num; i++, uv++) {
429 float u = uv->
x,
v = uv->
y;
430 int x = (int)u,
y = (
int)
v;
432 if (
x < 0 || y < 0 || x >= 10) {
438 if (
x > 0 && (u <
x + 1e-6f)) {
441 if (
y > 0 && (
v <
y + 1e-6f)) {
445 tiles.insert(1001 + 10 *
y +
x);
452 : modified_flag(~0u), geometry(geometry), prim(prim)
482 if (attr.
name == name)
493 list<Attribute>::iterator it;
508 if (name == ustring())
667 if (attr.name != other.
name) {
670 if (attr.std != other.
std) {
673 if (attr.type != other.
type) {
676 if (attr.element != other.
element) {
689 list<Attribute>::iterator it;
733 if (preserve_voxel_data) {
734 list<Attribute>::iterator it;
753 list<Attribute>::iterator it;
756 if (new_attributes.find_matching(old_attr) ==
nullptr) {
764 foreach (
Attribute &attr, new_attributes.attributes) {
783 void AttributeSet::tag_modified(
const Attribute &attr)
791 if (modifies_device_array) {
793 modified_flag |= (1u << kernel_type);
799 return (modified_flag & (1u << kernel_type)) != 0;
809 type = TypeDesc::TypeFloat;
825 type = TypeDesc::TypeFloat;
851 for (
size_t i = 0; i <
requests.size(); i++) {
854 for (
size_t j = 0; j <
requests.size() && !found; j++)
870 if (req.
name == name) {
916 if (req.
name == name)
typedef float(TangentPoint)[2]
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block Image Sample an image file as a texture Sky Generate a procedural sky texture Noise Generate fractal Perlin noise Wave Generate procedural bands or rings with noise Voronoi Generate Worley noise based on the distance to random points Typically used to generate textures such as or biological cells Brick Generate a procedural texture producing bricks Texture Retrieve multiple types of texture coordinates nTypically used as inputs for texture nodes Vector Convert a or normal between and object coordinate space Combine Create a color from its and value channels Color Retrieve a color attribute
ATTR_WARN_UNUSED_RESULT const void * element
ATTR_WARN_UNUSED_RESULT const BMVert * v
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
vector< AttributeRequest > requests
bool modified(const AttributeRequestSet &other)
void add_standard(ustring name)
AttributeRequest(ustring name_)
AttributeDescriptor subd_desc
Attribute * add(ustring name, TypeDesc type, AttributeElement element)
void update(AttributeSet &&new_attributes)
list< Attribute > attributes
Attribute * find(ustring name) const
Attribute * find_matching(const Attribute &other)
bool modified(AttrKernelDataType kernel_type) const
void remove(ustring name)
AttributeSet(Geometry *geometry, AttributePrimitive prim)
void resize(bool reserve_only=false)
void clear(bool preserve_voxel_data=false)
ImageHandle & data_voxel()
static bool same_storage(TypeDesc a, TypeDesc b)
void add_with_weight(void *dst, void *src, float weight)
static AttrKernelDataType kernel_type(const Attribute &attr)
static AttributeStandard name_standard(const char *name)
void resize(Geometry *geom, AttributePrimitive prim, bool reserve_only)
size_t element_size(Geometry *geom, AttributePrimitive prim) const
void get_uv_tiles(Geometry *geom, AttributePrimitive prim, unordered_set< int > &tiles) const
void set_data_from(Attribute &&other)
void zero_data(void *dst)
Attribute(ustring name, TypeDesc type, AttributeElement element, Geometry *geom, AttributePrimitive prim)
static const char * standard_name(AttributeStandard std)
size_t buffer_size(Geometry *geom, AttributePrimitive prim) const
size_t data_sizeof() const
size_t num_curves() const
#define CCL_NAMESPACE_END
SyclQueue void void * src
ccl_gpu_kernel_postfix ccl_global KernelWorkTile * tiles
@ ATTR_STD_CURVE_INTERCEPT
@ ATTR_STD_GENERATED_TRANSFORM
@ ATTR_STD_MOTION_VERTEX_NORMAL
@ ATTR_STD_VOLUME_VELOCITY_Y
@ ATTR_STD_VOLUME_TEMPERATURE
@ ATTR_STD_VOLUME_VELOCITY_Z
@ ATTR_STD_VOLUME_DENSITY
@ ATTR_STD_POSITION_UNDISPLACED
@ ATTR_STD_VOLUME_VELOCITY
@ ATTR_STD_POSITION_UNDEFORMED
@ ATTR_STD_MOTION_VERTEX_POSITION
@ ATTR_STD_UV_TANGENT_SIGN
@ ATTR_STD_SHADOW_TRANSPARENCY
@ ATTR_STD_VOLUME_VELOCITY_X
@ ATTR_STD_RANDOM_PER_ISLAND
@ ATTR_ELEMENT_CORNER_BYTE
@ ATTR_ELEMENT_CURVE_KEY_MOTION
@ ATTR_ELEMENT_VERTEX_MOTION
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
static constexpr TypeDesc TypeRGBA(TypeDesc::FLOAT, TypeDesc::VEC4, TypeDesc::COLOR)
CCL_NAMESPACE_BEGIN static constexpr OIIO_NAMESPACE_USING TypeDesc TypeFloat2(TypeDesc::FLOAT, TypeDesc::VEC2)
size_t get_num_subd_faces() const
size_t num_triangles() const
size_t get_num_subd_verts()
size_t num_points() const