SketchUp C API
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Related Functions
SUMeshHelperRef Struct Reference

A helper class that will tessellate a SUFaceRef object into triangles, and then provide the vertices, normals, and STQ coordinates of those triangles. More...

#include <SketchUpAPI/model/mesh_helper.h>

Related Functions

(Note that these are not member functions.)

enum SUResult SUMeshHelperCreate (SUMeshHelperRef *mesh_ref, SUFaceRef face_ref)
 Creates a tessellated polygon mesh object from a face object. More...
 
enum SUResult SUMeshHelperCreateWithTextureWriter (SUMeshHelperRef *mesh_ref, SUFaceRef face_ref, SUTextureWriterRef texture_writer_ref)
 Creates a tessellated polygon mesh object from a face object and the texture writer object used to write the material texture(s) of the face object. More...
 
enum SUResult SUMeshHelperCreateWithUVHelper (SUMeshHelperRef *mesh_ref, SUFaceRef face_ref, SUUVHelperRef uv_helper_ref)
 Creates a tessellated polygon mesh object from a face and a UV helper associated with the face. More...
 
enum SUResult SUMeshHelperRelease (SUMeshHelperRef *mesh_ref)
 Deallocates a polygon mesh object. More...
 
enum SUResult SUMeshHelperGetNumTriangles (SUMeshHelperRef mesh_ref, size_t *count)
 Retrieves the total number of polygons in the mesh. More...
 
enum SUResult SUMeshHelperGetNumVertices (SUMeshHelperRef mesh_ref, size_t *count)
 Retrieves the total number of vertices in the polygon mesh object. More...
 
enum SUResult SUMeshHelperGetVertexIndices (SUMeshHelperRef mesh_ref, size_t len, size_t indices[], size_t *count)
 Retrieves the array of indices of the vertices of a triangle mesh object. The each element indexes into the arrays retrieved with SUMeshHelperGetVertices, SUMeshHelperGetFrontSTQCoords(), SUMeshHelperGetBackSTQCoords and SUMeshHelperGetNormals(). The elements are sorted so that every three elements (i.e., stride of three) compose the indices to the three vertices of a triangle. More...
 
enum SUResult SUMeshHelperGetVertices (SUMeshHelperRef mesh_ref, size_t len, struct SUPoint3D vertices[], size_t *count)
 Retrieves the vertices of a triangle mesh object. More...
 
enum SUResult SUMeshHelperGetFrontSTQCoords (SUMeshHelperRef mesh_ref, size_t len, struct SUPoint3D stq[], size_t *count)
 Retrieves the front stq texture coordinates of a triangle mesh object. More...
 
enum SUResult SUMeshHelperGetBackSTQCoords (SUMeshHelperRef mesh_ref, size_t len, struct SUPoint3D stq[], size_t *count)
 Retrieves the back stq texture coordinates of a triangle mesh object. More...
 
enum SUResult SUMeshHelperGetNormals (SUMeshHelperRef mesh_ref, size_t len, struct SUVector3D normals[], size_t *count)
 Retrieves the vertex normal vectors of a triangle mesh object. More...
 

Detailed Description

A helper class that will tessellate a SUFaceRef object into triangles, and then provide the vertices, normals, and STQ coordinates of those triangles.

Friends And Related Function Documentation

enum SUResult SUMeshHelperCreate ( SUMeshHelperRef mesh_ref,
SUFaceRef  face_ref 
)
related

Creates a tessellated polygon mesh object from a face object.

Parameters
[in]mesh_refThe mesh object created.
[in]face_refThe face object.
Returns
enum SUResult SUMeshHelperCreateWithTextureWriter ( SUMeshHelperRef mesh_ref,
SUFaceRef  face_ref,
SUTextureWriterRef  texture_writer_ref 
)
related

Creates a tessellated polygon mesh object from a face object and the texture writer object used to write the material texture(s) of the face object.

Parameters
[out]mesh_refThe mesh object created.
[in]face_refThe face object.
[in]texture_writer_refThe texture writer object.
Returns
enum SUResult SUMeshHelperCreateWithUVHelper ( SUMeshHelperRef mesh_ref,
SUFaceRef  face_ref,
SUUVHelperRef  uv_helper_ref 
)
related

Creates a tessellated polygon mesh object from a face and a UV helper associated with the face.

Parameters
[out]mesh_refThe mesh object created.
[in]face_refThe face object.
[in]uv_helper_refThe UV helper object.
Returns
enum SUResult SUMeshHelperGetBackSTQCoords ( SUMeshHelperRef  mesh_ref,
size_t  len,
struct SUPoint3D  stq[],
size_t *  count 
)
related

Retrieves the back stq texture coordinates of a triangle mesh object.

Parameters
[in]mesh_refThe mesh object.
[in]lenThe number of stq coordinates to retrieve.
[out]stqThe stq coordinates retrieved.
[out]countThe number of stq coordinates retrieved.
Returns
enum SUResult SUMeshHelperGetFrontSTQCoords ( SUMeshHelperRef  mesh_ref,
size_t  len,
struct SUPoint3D  stq[],
size_t *  count 
)
related

Retrieves the front stq texture coordinates of a triangle mesh object.

Parameters
[in]mesh_refThe mesh object.
[in]lenThe number of stq coordinates to retrieve.
[out]stqThe stq coordinates retrieved.
[out]countThe number of stq coordinates retrieved.
Returns
enum SUResult SUMeshHelperGetNormals ( SUMeshHelperRef  mesh_ref,
size_t  len,
struct SUVector3D  normals[],
size_t *  count 
)
related

Retrieves the vertex normal vectors of a triangle mesh object.

Parameters
[in]mesh_refThe mesh object whose vertex normal vectors are retrieved.
[in]lenThe number of vertex normal objects to retrieve.
[out]normalsThe vertex normal vectors retrieved.
[out]countThe number of normal vectors retrieved.
Returns
enum SUResult SUMeshHelperGetNumTriangles ( SUMeshHelperRef  mesh_ref,
size_t *  count 
)
related

Retrieves the total number of polygons in the mesh.

Parameters
[in]mesh_refThe mesh object.
[out]countThe number of polygons available.
Returns
enum SUResult SUMeshHelperGetNumVertices ( SUMeshHelperRef  mesh_ref,
size_t *  count 
)
related

Retrieves the total number of vertices in the polygon mesh object.

Parameters
[in]mesh_refThe mesh object.
[out]countThe number of vertices available.
Returns
enum SUResult SUMeshHelperGetVertexIndices ( SUMeshHelperRef  mesh_ref,
size_t  len,
size_t  indices[],
size_t *  count 
)
related

Retrieves the array of indices of the vertices of a triangle mesh object. The each element indexes into the arrays retrieved with SUMeshHelperGetVertices, SUMeshHelperGetFrontSTQCoords(), SUMeshHelperGetBackSTQCoords and SUMeshHelperGetNormals(). The elements are sorted so that every three elements (i.e., stride of three) compose the indices to the three vertices of a triangle.

Parameters
[in]mesh_refThe mesh object.
[in]lenThe number of indices to retrieve.
[out]indicesThe indices retrieved.
[out]countThe number of indices retrieved.
Returns
enum SUResult SUMeshHelperGetVertices ( SUMeshHelperRef  mesh_ref,
size_t  len,
struct SUPoint3D  vertices[],
size_t *  count 
)
related

Retrieves the vertices of a triangle mesh object.

Parameters
[in]mesh_refThe mesh object.
[in]lenThe number of vertices to retrieve.
[out]verticesThe vertices retrieved.
[out]countThe number of vertices retrieved.
Returns
enum SUResult SUMeshHelperRelease ( SUMeshHelperRef mesh_ref)
related

Deallocates a polygon mesh object.

Parameters
[in]mesh_refThe mesh object to deallocate.
Returns

The documentation for this struct was generated from the following files: