#include <mesh_attribute_base.h>
CustomDataTagClassInterface uses MeshAttributeClassInterface as a base interface and allows to add informations and functionality to the mesh attribute to be used as tag. It mainly contains the information about the CustomDataTag registration, read/write, icons and the optional display implementation. By using the MAXON_CUSTOMDATATAG macro, only the Read, Write and GetIcon methods need to be implemented.
Public Member Functions | |
MAXON_METHOD Int32 | GetTagPluginId () const |
MAXON_METHOD const String & | GetTagPluginName () const |
MAXON_METHOD const String & | GetResourceId () const |
MAXON_METHOD Int32 | GetTagPluginLevel () const |
MAXON_METHOD Id | GetDisplayClassId () const |
MAXON_METHOD Bool | IsSdsCompatible (Int32 &floatSize) const |
MAXON_METHOD Result< void > | Read (void *data, HyperFile *hf, Int32 level) const |
MAXON_METHOD Result< void > | Write (const void *data, HyperFile *hf) const |
MAXON_METHOD Int32 | GetIcon (Bool perPolyVertex) const |
MAXON_FUNCTION const String & | GetDefaultResourceId () const |
MAXON_METHOD Int32 | GetTagPluginFlags () const |
MAXON_METHOD Bool | Message (GeListNode *node, Int32 type, void *data) const |
MAXON_METHOD Int32 GetTagPluginId | ( | ) | const |
Returns the Tag plugin ID to be registered with this implementation.
MAXON_METHOD const String& GetTagPluginName | ( | ) | const |
Returns the Tag string name to be registered with this implementation.
MAXON_METHOD const String& GetResourceId | ( | ) | const |
Returns the resource id for the Tag.
MAXON_METHOD Int32 GetTagPluginLevel | ( | ) | const |
Returns the Tag level to be used as data versioning system.
MAXON_METHOD Id GetDisplayClassId | ( | ) | const |
MAXON_METHOD Bool IsSdsCompatible | ( | Int32 & | floatSize | ) | const |
Returns if the datatype is compatible with the SDS interpolation. SDS implementations, both internal and OSD, are only able to interpolate float values. The floatSize allows to define how many values are used for each entry, for example a vector will have a floatSize = 3.
[out] | floatSize | The number of float values that the datatype contains. |
MAXON_METHOD Result<void> Read | ( | void * | data, |
HyperFile * | hf, | ||
Int32 | level | ||
) | const |
Reads a single data entry from a file.
[in] | data | The data pointer. |
[in] | hf | The file handle to read. |
[in] | level | The disk level. |
MAXON_METHOD Result<void> Write | ( | const void * | data, |
HyperFile * | hf | ||
) | const |
Writes a single data entry to a fil.
[in] | data | The data pointer. |
[in] | hf | The file handle to write on. |
MAXON_METHOD Int32 GetIcon | ( | Bool | perPolyVertex | ) | const |
Gets the icon id according to the data location (per vertex vs. per polyvertex).
[in] | perPolyVertex | If true the polyvertex icon id is returned. |
MAXON_FUNCTION const String& GetDefaultResourceId | ( | ) | const |
By default, all implementations provide a standard UI. Gets the default resource id in case a custom AM UI is not needed.
MAXON_METHOD Int32 GetTagPluginFlags | ( | ) | const |
Returns the tag flags to be registered with this implementation.
MAXON_METHOD Bool Message | ( | GeListNode * | node, |
Int32 | type, | ||
void * | data | ||
) | const |
Implements custom mesage for the custom data tag.
[in] | node | The node. |
[in] | type | The message type. |
[in] | data | The message data. |