VRay SDK for C++
|
Attributes storage format: [attrName\0|type{uint8}|value{some_bytes}][...][...]\0. More...
#include <vraysdk.hpp>
Public Types | |
enum | BinUserAttributeType : byte { binUserAttributeType_int = 0 , binUserAttributeType_float , binUserAttributeType_vector , binUserAttributeType_acolor , binUserAttributeType_string , binUserAttributeType_last } |
enum | BinUserAttributeTypeFlags : byte { binUserAttributeFlag_small = 1 << 3 , binUserAttributeFlag_smallY = 1 << 2 , binUserAttributeFlag_smallZ = 1 << 1 , binUserAttributeFlag_smallA = 1 << 0 } |
Public Member Functions | |
void | add (const char *name, size_t nameLen, const AColor &value) |
void | add (const char *name, size_t nameLen, const char *value, size_t valueLen) |
void | add (const char *name, size_t nameLen, const Vector &value) |
void | add (const char *name, size_t nameLen, float value) |
void | add (const char *name, size_t nameLen, int value) |
template<size_t count> | |
void | add (const char(&name)[count], const AColor &value) |
template<size_t count> | |
void | add (const char(&name)[count], const Vector &value) |
template<size_t count> | |
void | add (const char(&name)[count], float value) |
template<size_t count> | |
void | add (const char(&name)[count], int value) |
template<size_t nameLen> | |
void | add (const char(&name)[nameLen], const char *value, size_t valueLen) |
template<size_t nameLen, size_t valueLen> | |
void | add (const char(&name)[nameLen], const char(&value)[valueLen]) |
template<size_t nameLen> | |
void | add (const char(&name)[nameLen], const std::string &value) |
void | add (const std::string &name, const AColor &value) |
void | add (const std::string &name, const char *value, size_t valueLen) |
template<size_t valueLen> | |
void | add (const std::string &name, const char(&value)[valueLen]) |
void | add (const std::string &name, const std::string &value) |
void | add (const std::string &name, const Vector &value) |
void | add (const std::string &name, float value) |
void | add (const std::string &name, int value) |
void | close () |
size_t | getNumBytes () const |
Get number of written bytes. | |
bool | hasData () const |
Checks if we've written any attributes. | |
IntList | toIntList () |
std::string | toString () const |
Attributes storage format: [attrName\0|type{uint8}|value{some_bytes}][...][...]\0.
Attribute type format: uint8 76543210 00000000 ||||~~~~ - Attribute type. |||- AColor.alpha is small. ||
- Vector.z is small. |- Vector.y is small.
- Int, float or vector.x is small.
|
inline |
Append color attribute.
name | Attribute name. |
nameLen | Attribute name length. |
value | Color value. |
|
inline |
Append string attribute.
name | Attribute name. |
nameLen | Attribute name length. |
value | String value. |
valueLen | String value length. |
|
inline |
Append vector attribute.
name | Attribute name. |
nameLen | Attribute name length. |
value | Vector value. |
|
inline |
Append float attribute.
name | Attribute name. |
nameLen | Attribute name length. |
value | Float value. |
|
inline |
Append integer attribute.
name | Attribute name. |
nameLen | Attribute name length. |
value | Integer value. |
|
inline |
Append color attribute.
name | Attribute name. |
value | AColor value. |
|
inline |
Append vector attribute.
name | Attribute name. |
value | Vector value. |
|
inline |
Append float attribute.
name | Attribute name. |
value | Float value. |
|
inline |
Append integer attribute.
name | Attribute name. |
value | Integer value. |
|
inline |
Append string attribute.
name | Attribute name. |
value | String value. |
valueLen | String value length. |
|
inline |
Append string attribute.
name | Attribute name. |
value | String value. |
|
inline |
Append string attribute.
name | Attribute name. |
value | String value. |
|
inline |
Append color attribute.
name | Attribute name. |
value | AColor value. |
|
inline |
Append string attribute.
name | Attribute name. |
value | String value. |
valueLen | String value length. |
|
inline |
Append string attribute.
name | Attribute name. |
value | String value. |
|
inline |
Append string attribute.
name | Attribute name. |
value | String value. |
|
inline |
Append vector attribute.
name | Attribute name. |
value | Vector value. |
|
inline |
Append float attribute.
name | Attribute name. |
value | Float value. |
|
inline |
Append integer attribute.
name | Attribute name. |
value | Integer value. |
|
inline |
Finalize attributes per instance. Call close() to separate attributes between different instances.
|
inline |
Get binary serialized data as IntList for easier assignment as plugin property value. This will reset the state of BinUserAttributesWriter!
|
inline |
Returns the hex string representation that is written to the returned IntList including the final 0 character.