Vuo  0.3
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Classes | Enumerations | Functions
VuoSceneVertices

Description

Vertices representing a 3D object.

Classes

struct  VuoSceneVertices
 Vertices representing a 3D object. More...
 

Enumerations

enum  VuoSceneVertices_ElementAssemblyMethod { VuoSceneVertices_IndividualTriangles, VuoSceneVertices_TriangleStrip, VuoSceneVertices_TriangleFan }
 The way in which an elements array should be interpreted during rasterization. More...
 

Functions

VuoSceneVertices_ElementAssemblyMethod VuoSceneVertices_elementAssemblyMethodFromCString (const char *elementAssemblyMethodString)
 Returns the VuoSceneVertices_ElementAssemblyMethod corresponding with the string elementAssemblyMethodString.
 
const char * VuoSceneVertices_cStringForElementAssemblyMethod (VuoSceneVertices_ElementAssemblyMethod elementAssemblyMethod)
 Returns a string constant representing elementAssemblyMethod.
 
VuoSceneVertices VuoSceneVertices_valueFromString (const char *initializer)
 Parses initializer, a mesh represented as a JSON C string, and returns a VuoSceneVertices structure.
 
char * VuoSceneVertices_stringFromValue (const VuoSceneVertices value)
 Returns a JSON string representing the specified mesh, in the same format as typeInitWithValue.
 
char * VuoSceneVertices_summaryFromValue (const VuoSceneVertices value)
 A brief summary of the contents of this mesh.
 

Class Documentation

struct VuoSceneVertices
Class Members
VuoSceneVertices_ElementAssemblyMethod elementAssemblyMethod The way in which the elements array should be interpreted during rasterization.
unsigned long elementCount Number of elements in elements.
unsigned long * elements An array of size elementCount of integer elements (triangle indices) which are indexes into positions.

(Requires conversion to i16 for OpenGL ES.)

VuoPoint4d * normals Vertex normals.
VuoPoint4d * positions XYZW vertex positions.
VuoPoint4d * textureCoordinates STRQ texture coordinates.
unsigned long vertexCount Number of vertices in positions, normals, and textureCoordinates.

Enumeration Type Documentation

The way in which an elements array should be interpreted during rasterization.

Enumerator
VuoSceneVertices_IndividualTriangles 

GL_TRIANGLES, requires elementCount % 3 == 0.

VuoSceneVertices_TriangleStrip 

GL_TRIANGLE_STRIP, requires elementCount >= 3.

VuoSceneVertices_TriangleFan 

GL_TRIANGLE_FAN, requires elementCount >= 3.

Function Documentation

VuoSceneVertices_ElementAssemblyMethod VuoSceneVertices_elementAssemblyMethodFromCString ( const char *  elementAssemblyMethodString)

Returns the VuoSceneVertices_ElementAssemblyMethod corresponding with the string elementAssemblyMethodString.

If none matches, returns VuoSceneVertices_IndividualTriangles.

char * VuoSceneVertices_summaryFromValue ( const VuoSceneVertices  value)

A brief summary of the contents of this mesh.

Example:
4 vertices in a fan of 2 triangles
with first position (0,0,0,0)
Example:
8 vertices, 12 triangles
with first position (-0.5,-0.5,-0.5,0)
VuoSceneVertices VuoSceneVertices_valueFromString ( const char *  initializer)

Parses initializer, a mesh represented as a JSON C string, and returns a VuoSceneVertices structure.

Parameters
initializerA JSON string containing an array of position vertices, an elementAssemblyMethod ("IndividualTriangles", "TriangleStrip", or "TriangleFan"), and an array of element indexes into the vertex array.
Example:
{
"positions": [
[-0.6, -0.5],
[ 0.5, -0.5],
[-0.5, 0.5],
[ 0.5, 0.5]
],
"elementAssemblyMethod": "TriangleFan",
"elements": [
0,
1,
2,
3
]
}