VuoMesh C type definition.
Definition in file VuoMesh.h.
Go to the source code of this file.
Classes | |
struct | VuoMesh |
A 3D mesh, consisting of CPU and/or GPU data describing a list of elements (positions, normals, texture coordinates, colors) which represent points or are assembled into lines or triangles. More... | |
Macros | |
#define | VuoMesh_REQUIRES_INTERPROCESS_JSON |
This type has a _getInterprocessJson() function. More... | |
Enumerations | |
enum | VuoMesh_ElementAssemblyMethod { VuoMesh_IndividualTriangles, VuoMesh_TriangleStrip, VuoMesh_TriangleFan, VuoMesh_IndividualLines, VuoMesh_LineStrip, VuoMesh_Points } |
The way in which an elements array should be interpreted during rasterization. More... | |
enum | VuoMesh_FaceCulling { VuoMesh_CullNone, VuoMesh_CullBackfaces, VuoMesh_CullFrontfaces } |
Which triangles to render. More... | |
Functions | |
VuoMesh | VuoMesh_makeQuad (void) |
Returns a quad with dimensions 1x1, on the XY plane, centered at the origin. More... | |
VuoMesh | VuoMesh_makeQuadWithoutNormals (void) |
Returns a quad with dimensions 1x1, on the XY plane, centered at the origin. More... | |
VuoMesh | VuoMesh_makeEquilateralTriangle (void) |
Returns an equilateral triangle with bottom edge length 1, pointing upward on the XY plane, centered at the origin. More... | |
VuoMesh | VuoMesh_makeCube (void) |
Returns a cube of size 1x1. More... | |
VuoMesh | VuoMesh_make_VuoPoint2d (VuoList_VuoPoint2d positions, VuoMesh_ElementAssemblyMethod elementAssemblyMethod, VuoReal primitiveSize) |
Returns a VuoMesh consisting of the given positions and element assembly method. More... | |
VuoMesh | VuoMesh_make_VuoPoint3d (VuoList_VuoPoint3d positions, VuoMesh_ElementAssemblyMethod elementAssemblyMethod, VuoReal primitiveSize) |
Returns a VuoMesh consisting of the given positions and element assembly method. More... | |
void | VuoMesh_allocateCPUBuffers (unsigned int vertexCount, float **positions, float **normals, float **textureCoordinates, float **colors, unsigned int elementCount, unsigned int **elements) |
Allocates: More... | |
VuoMesh | VuoMesh_makeFromCPUBuffers (unsigned int vertexCount, float *positions, float *normals, float *textureCoordinates, float *colors, unsigned int elementCount, unsigned int *elements, VuoMesh_ElementAssemblyMethod elementAssemblyMethod) |
Creates a mesh consisting of data that already exists in CPU RAM, and uploads it to the GPU. More... | |
VuoMesh | VuoMesh_makeFromGPUBuffers (unsigned int vertexCount, unsigned int combinedBuffer, unsigned int combinedBufferSize, void *normalOffset, void *textureCoordinateOffset, void *colorOffset, unsigned int elementCount, unsigned int elementBuffer, unsigned int elementBufferSize, VuoMesh_ElementAssemblyMethod elementAssemblyMethod) |
Creates a VuoSubmesh consisting of data that's already been uploaded to the GPU. More... | |
VuoMesh | VuoMesh_copy (const VuoMesh mesh) |
Duplicates the mesh's CPU data, and retains the mesh's GPU data. More... | |
VuoMesh | VuoMesh_copyShallow (const VuoMesh mesh) |
Makes a shallow copy of the mesh and its submeshes. More... | |
void | VuoMesh_removeTextureCoordinates (VuoMesh mesh) |
Deallocates and clears the texture coordinate arrays associated with this mesh. More... | |
void | VuoMesh_getCPUBuffers (const VuoMesh mesh, unsigned int *vertexCount, float **positions, float **normals, float **textureCoordinates, float **colors, unsigned int *elementCount, unsigned int **elements) |
Outputs vertex and element information, downloading the data from the GPU if needed. More... | |
void | VuoMesh_getGPUBuffers (const VuoMesh mesh, unsigned int *vertexCount, unsigned int *combinedBuffer, void **normalOffset, void **textureCoordinateOffset, void **colorOffset, unsigned int *elementCount, unsigned int *elementBuffer) |
Outputs OpenGL vertex and element buffer information, uploading the data to the GPU if needed. More... | |
VuoMesh_ElementAssemblyMethod | VuoMesh_getElementAssemblyMethod (const VuoMesh mesh) |
Returns the mesh's element assembly method. More... | |
VuoMesh_FaceCulling | VuoMesh_getFaceCulling (const VuoMesh mesh) |
Returns the mesh's face culling mode. More... | |
unsigned int | VuoMesh_getFaceCullingGL (const VuoMesh mesh) |
Returns the OpenGL enum value for the mesh's face culling mode. More... | |
VuoReal | VuoMesh_getPrimitiveSize (const VuoMesh mesh) |
Returns the size, in Vuo Coordinates, at which lines and points should be rendered. More... | |
unsigned long | VuoMesh_getGlMode (const VuoMesh mesh) |
Returns the GL mode (e.g., GL_TRIANGLES ) that the mesh should be interpreted as. More... | |
unsigned long | VuoMesh_getSplitPrimitiveCount (const VuoMesh mesh) |
Returns the number of split primitives in the mesh. More... | |
unsigned long | VuoMesh_getSplitVertexCount (const VuoMesh mesh) |
Returns the number of split vertices in the mesh. More... | |
unsigned long | VuoMesh_getCompleteElementCount (const VuoMesh mesh) |
Returns the number of complete elements in the mesh. More... | |
unsigned int | VuoMesh_getElementBufferSize (const VuoMesh mesh) |
Returns the size, in bytes, of the GPU element buffer. More... | |
void | VuoMesh_setCPUBuffers (VuoMesh mesh, unsigned int vertexCount, float *positions, float *normals, float *textureCoordinates, float *colors, unsigned int elementCount, unsigned int *elements) |
Changes the mesh's CPU buffers, and uploads them to the GPU. More... | |
void | VuoMesh_setFaceCulling (VuoMesh mesh, VuoMesh_FaceCulling faceCulling) |
Changes the mesh's face culling mode. More... | |
void | VuoMesh_setPrimitiveSize (VuoMesh mesh, VuoReal primitiveSize) |
Changes the size, in Vuo Coordinates, at which lines and points should be rendered. More... | |
const char * | VuoMesh_cStringForElementAssemblyMethod (VuoMesh_ElementAssemblyMethod elementAssemblyMethod) |
Returns a string constant representing elementAssemblyMethod . More... | |
VuoBox | VuoMesh_bounds (const VuoMesh mesh, float matrix[16]) |
Finds the mesh's center and axis-aligned extents, taking into account the passed transform. More... | |
bool | VuoMesh_isPopulated (const VuoMesh mesh) |
Returns true if the mesh has any vertices. More... | |
VuoMesh | VuoMesh_makeFromJson (json_object *js) |
json_object * | VuoMesh_getJson (const VuoMesh value) |
json_object * | VuoMesh_getInterprocessJson (const VuoMesh value) |
char * | VuoMesh_getSummary (const VuoMesh mesh) |
static VuoMesh_ElementAssemblyMethod | VuoMesh_getExpandedPrimitiveMode (const VuoMesh_ElementAssemblyMethod inputMode) |
For a given element assembly method, returns the equivalent assembly method for individual elements (i.e., after they've been expanded from strips/fans). More... | |
VuoMesh | VuoMesh_makeFromString (const char *str) |
Automatically generated function. More... | |
char * | VuoMesh_getString (const VuoMesh value) |
Automatically generated function. More... | |
void | VuoMesh_retain (const VuoMesh v) |
Automatically generated function. More... | |
void | VuoMesh_release (const VuoMesh v) |
Automatically generated function. More... | |