SubEntity

From oWiki

Jump to: navigation, search

Contents


Attributes

index

int  ( r )
The indexed location of this SubEntity.

parent

molecule  ( r )
Specifies parent mesh/manualobject molecule.

name

string  ( r )
The name of this SubEntity.


Methods

setMaterialName( m )

m: string

Applies material to this SubEntity.

getMaterialName()

Return: string

Gets the material name applied to this SubEntity.

setCustomParameter( i, v4 )

i: int
v4: Vector4

Sets a custom parameter for this SubEntity, which may be used to drive calculations for this specific Renderable, like GPU program parameters.
Calling this method simply associates a numeric index with a 4-dimensional value for this specific Renderable. This is most useful if the material which this Renderable uses a vertex or fragment program, and has an ACT_CUSTOM parameter entry. This parameter entry can refer to the index you specify as part of this call, thereby mapping a custom parameter for this renderable to a program parameter.
The index i with which to associate the value does not have to start at 0, and can include gaps. It also has no direct correlation with a GPU program parameter index - the mapping between the two is performed by the ACT_CUSTOM entry, if that is used.

getCustomParameter( i )

Return: string

Gets the custom value associated with this Renderable at the given index.
Personal tools