Skip to content

class MaterialEvaluationShaderAttribute

MaterialEvaluationShaderAttribute is used to bind geometry data fields to the generated compute caster.

Properties

PropertyDescription
FieldFormatThe attribute format
FieldNameThe geometry field name. This is optional parameter unless using a custom field.
FieldTypeThe geometry field data type. Required field.
NameThe name of the MaterialEvaluationShaderAttribute object. (Inherited from Object)

Methods

MethodDescription
AddObserverAdds a user-defined observer object to the interface, that will receive events from the interface. (Inherited from Object)
GetClassGet the name of the MaterialEvaluationShaderAttribute class. (Inherited from Object)
IsAReturns true if MaterialEvaluationShaderAttribute is a or is a descendant of the class named as the type parameter. (Inherited from Object)
IsNullReturns true if the MaterialEvaluationShaderAttribute object is invalid. (Inherited from Object)
IsSameObjectAsReturns true if the MaterialEvaluationShaderAttribute object is valid. (Inherited from Object)
NonNullReturns true if the MaterialEvaluationShaderAttribute object is valid. (Inherited from Object)
PrintInfoPrints the content/info of the MaterialEvaluationShaderAttribute object to the log. (Inherited from Object)
RemoveObserverRemoves a previously added observer object. (Inherited from Object)

Static methods

MethodDescription
IsClassAReturns true if the class is a or is a descendant of the class named as the type parameter. (Inherited from Object)
SafeCastSafeCast makes sure the input object is of a class that can be cast into spMaterialEvaluationShaderAttribute, and if this is the case, returns the object cast into spMaterialEvaluationShaderAttribute. (Inherited from Object)

Properties details

FieldFormat

The attribute format

Syntax

cpp
// Setter
void SetFieldFormat( Simplygon::EAttributeFormat value ) const;

// Getter
Simplygon::EAttributeFormat GetFieldFormat() const;

SetFieldFormat parameters

TypeNameMinMaxDescription
EAttributeFormatvalueThe attribute format.

GetFieldFormat return value

Type: EAttributeFormat

Default: F32vec4

KeyValueComment
U840971 unsigned 8-bit value.
S843531 signed 8-bit value.
U8vec281932 unsigned 8-bit values.
S8vec284492 signed 8-bit values.
U8vec3122893 unsigned 8-bit values.
S8vec3125453 signed 8-bit values.
U8vec4163854 unsigned 8-bit values.
S8vec4166414 signed 8-bit values.
U1640981 unsigned 16-bit value.
S1643541 signed 16-bit value.
U16vec281942 unsigned 16-bit values.
S16vec284502 signed 16-bit values.
U16vec3122903 unsigned 16-bit values.
S16vec3125463 signed 16-bit values.
U16vec4163864 unsigned 16-bit values.
S16vec4166424 signed 16-bit values.
U3241001 unsigned 32-bit value.
S3243561 signed 32-bit value.
F3246121 floating-point 32-bit value.
U32vec281962 unsigned 32-bit values.
S32vec284522 signed 32-bit values.
F32vec287082 floating-point 32-bit values.
U32vec3122923 unsigned 32-bit values.
S32vec3125483 signed 32-bit values.
F32vec3128043 floating-point 32-bit values.
U32vec4163884 unsigned 32-bit values.
S32vec4166444 signed 32-bit values.
F32vec4169004 floating-point 32-bit values.
U6441041 unsigned 64-bit value.
S6443601 signed 64-bit value.
F6446161 floating-point 64-bit value.
F64vec287122 floating-point 64-bit values.
F64vec3128083 floating-point 64-bit values.
F64vec4169044 floating-point 64-bit values.

FieldName

The geometry field name. This is optional parameter unless using a custom field.

Syntax

cpp
// Setter
void SetFieldName( const char * value ) const;

// Getter
spString GetFieldName() const;

SetFieldName parameters

TypeNameMinMaxDescription
const char *valueThe geometry field name.

GetFieldName return value

Type: spString

FieldType

The geometry field data type. Required field.

Syntax

cpp
// Setter
void SetFieldType( Simplygon::EGeometryDataFieldType value ) const;

// Getter
Simplygon::EGeometryDataFieldType GetFieldType() const;

SetFieldType parameters

TypeNameMinMaxDescription
EGeometryDataFieldTypevalueThe geometry field data type.

GetFieldType return value

Type: EGeometryDataFieldType

KeyValueComment
Coords0Per-vertex coordinate data, xyz values (3 items per tuple, default attribute format type F32vec3)
TexCoords1Per-corner texture coords data, uv values (2 items per tuple, default attribute format type F32vec2)
Normals2Per-corner vertex normals data, xyz values (3 items per tuple, default attribute format type F32vec3)
Tangents3Per-corner vertex tangent data, xyz values (3 items per tuple, default attribute format type F32vec3)
Bitangents4Per-corner vertex bitangent data, xyz values (3 items per tuple, default attribute format type F32vec3)
Colors5Per-corner vertex color data, rgba values (4 items per tuple, default attribute format type F32vec4)
TriangleIds6Per-triangle triangle ids, id values, not interpolated. (1 item per tuple, default attribute format type S32)
MaterialIds7Per-triangle material ids, id values, not interpolated. (1 item per tuple, default attribute format type S32)
VertexIds8Per-corner vertex ids, id values, not interpolated. (1 item per tuple, default attribute format type S32)
UserVertexField9User-defined Per-vertex geometry data field.
UserCornerField10User-defined Per-corner geometry data field.
UserTriangleField11User-defined Per-triangle geometry data field.
CustomField12Custom-size user-defined geometry data field.

Name

The name of the MaterialEvaluationShaderAttribute object. (Inherited from Object)

Syntax

cpp
// Setter
void SetName( const char * name ) const;

// Getter
spString GetName() const;

SetName parameters

TypeNameMinMaxDescription
const char *nameNew name of the object.

GetName return value

Type: spString

Methods details

AddObserver

Adds a user-defined observer object to the interface, that will receive events from the interface. (Inherited from Object)

Syntax

cpp
rid AddObserver( const spObserver & observer ) const;

Parameters

TypeNameMinMaxDescription
ObserverobserverObserver is the object that will receive events.

Return value

Type: rid

GetClass

Get the name of the MaterialEvaluationShaderAttribute class. (Inherited from Object)

Syntax

cpp
spString GetClass() const;

Parameters

GetClass takes no parameters.

Return value

Type: spString

IsA

Returns true if MaterialEvaluationShaderAttribute is a or is a descendant of the class named as the type parameter. (Inherited from Object)

Syntax

cpp
bool IsA( const char * type ) const;

Parameters

TypeNameMinMaxDescription
const char *typeName of the class to check if MaterialEvaluationShaderAttribute is, or is a descendant of.

Return value

Type: bool

IsNull

Returns true if the MaterialEvaluationShaderAttribute object is invalid. (Inherited from Object)

Syntax

cpp
bool IsNull() const;

Parameters

IsNull takes no parameters.

Return value

Type: bool

IsSameObjectAs

Returns true if the MaterialEvaluationShaderAttribute object is valid. (Inherited from Object)

Syntax

cpp
bool IsSameObjectAs( const spObject & object ) const;

Parameters

TypeNameMinMaxDescription
ObjectobjectObject to compare with.

Return value

Type: bool

NonNull

Returns true if the MaterialEvaluationShaderAttribute object is valid. (Inherited from Object)

Syntax

cpp
bool NonNull() const;

Parameters

NonNull takes no parameters.

Return value

Type: bool

PrintInfo

Prints the content/info of the MaterialEvaluationShaderAttribute object to the log. (Inherited from Object)

Syntax

cpp
void PrintInfo() const;

Parameters

PrintInfo takes no parameters.

RemoveObserver

Removes a previously added observer object. (Inherited from Object)

Syntax

cpp
void RemoveObserver( rid observerId ) const;

Parameters

TypeNameMinMaxDescription
ridobserverIdObserverId is the id returned by AddObserver when the observer was added.

Static methods details

IsClassA

Returns true if the class is a or is a descendant of the class named as the type parameter. (Inherited from Object)

Syntax

cpp
static bool IsClassA( const char * type ) const;

Parameters

TypeNameMinMaxDescription
const char *typeName of the class to check if the class is, or is a descendant of.

Return value

Type: bool

SafeCast

SafeCast makes sure the input object is of a class that can be cast into spMaterialEvaluationShaderAttribute, and if this is the case, returns the object cast into spMaterialEvaluationShaderAttribute. (Inherited from Object)

Syntax

cpp
static spMaterialEvaluationShaderAttribute SafeCast( const spObject & object ) const;

Parameters

TypeNameMinMaxDescription
ObjectobjectObject to cast.

Return value

Type: MaterialEvaluationShaderAttribute