vcanim.gif (8357 bytes)SAA_ctrlVertexGetColors()
Home ] Sales ] Products ] Services ] Support ] Downloads ]

 

SAA_ctrlVertexGetColors()

SAA_ctrlVertexSetColors()

Gets the vertex colors for polygon and triangle control vertices. Sets the vertex colors for polygon control vertices.

set scene [SAA_AllocScene]
set elem [SAA_AllocElem]
.
.
SAA_meshGetNbPolygons $scene $elem nbPolygons
set polygons [ SAA_AloocSubElem $nbPolygons ]
SAA_meshGetPolygons $scene $elem SAA_Constants(GEOMTYPE) SHAPEID $polygons 
set nbVertices [SAA_allocInt $nbPolygons]
SAA_polygonGetNbCtrlVertices $scene $el $nbPolygons $polygons nbVertices
set nbCrtlVertices 0
for {set i 0}{$i < $nbPolygons} {incr i } {
set  nbCrtlVertices [ expr $nbCrtlVertices + [access nbVertices $i ] ]
set crtlVertices [ SAA_AllocSubElem $nbCrtlVertices ]
SAA_polygonGetCtrlVertices $scene $el $nbPolygons $polygons $nbVertices crtlVertices
set r [SAA_AllocInt $nbCrtlVertices]
set g [SAA_AllocInt $nbCrtlVertices]
set b [SAA_AllocInt $nbCrtlVertices]
set a [SAA_AllocInt $nbCrtlVertices]

SAA_ctrlVertexGetColors $scene $elem $nbVertices $vertices $r $g $b $a

SAA_ctrlVertexSetColors $scene $elem $nbVertices $vertices $r $g $b $a

Parameters

el
Element whose vertex colors are being set or retrieved.
nb_vertices
Number of control vertices.
vertices
Array of control vertices.
For SAA_ctrlVertexGetColors(), these can be polygon or triangle control vertices.
For SAA_ctrlVertexSetColors(), these must be polygon control vertices.
To get polygon control vertices, use SAA_polygonGetCtrlVertices(). To get triangle control vertices, use SAA_triangleGetCtrlVertices().
red, green, blue, alpha
Arrays containing the R, G, B, and A values. The RGBA values are between 0 and 255.

Return Values

  • SI_ERR_INVALID_SELEM if the function does not support the type of control vertex passed in by the caller.

Comments

SAA_ctrlVertexSetColors() works for polygon control vertices only.

These two functions replace SAA_polyCtrlVertexGetColors() and SAA_polyCtrlVertexSetColors(), which are now obsolete.

SAA Index ] Examples SAA calls index ]

copyright Video-Collage Inc.