SketchUp SDK
|
#include <stdlib.h>
#include <slapi/geometry.h>
#include <slapi/slapi.h>
#include <slapi/model/defs.h>
#include <slapi/model/texture_writer.h>
Go to the source code of this file.
Functions | |
SU_RESULT | SUMeshHelperCreate (SUMeshHelperRef *mesh_ref, SUFaceRef face_ref) |
Creates a tessellated polygon mesh object from a face object. More... | |
SU_RESULT | 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... | |
SU_RESULT | 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... | |
SU_RESULT | SUMeshHelperRelease (SUMeshHelperRef *mesh_ref) |
Deallocates a polygon mesh object. More... | |
SU_RESULT | SUMeshHelperGetNumTriangles (SUMeshHelperRef mesh_ref, size_t *count) |
Retrieves the total number of polygons in the mesh. More... | |
SU_RESULT | SUMeshHelperGetNumVertices (SUMeshHelperRef mesh_ref, size_t *count) |
Retrieves the total number of vertices in the polygon mesh object. More... | |
SU_RESULT | 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... | |
SU_RESULT | SUMeshHelperGetVertices (SUMeshHelperRef mesh_ref, size_t len, struct SUPoint3D vertices[], size_t *count) |
Retrieves the vertices of a triangle mesh object. More... | |
SU_RESULT | 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... | |
SU_RESULT | 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... | |
SU_RESULT | SUMeshHelperGetNormals (SUMeshHelperRef mesh_ref, size_t len, struct SUVector3D normals[], size_t *count) |
Retrieves the vertex normal vectors of a triangle mesh object. More... | |
SU_RESULT SUMeshHelperCreate | ( | SUMeshHelperRef * | mesh_ref, |
SUFaceRef | face_ref | ||
) |
Creates a tessellated polygon mesh object from a face object.
[in] | mesh_ref | The mesh object created. |
[in] | face_ref | The face object. |
SU_RESULT 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.
[out] | mesh_ref | The mesh object created. |
[in] | face_ref | The face object. |
[in] | texture_writer_ref | The texture writer object. |
SU_RESULT 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.
[out] | mesh_ref | The mesh object created. |
[in] | face_ref | The face object. |
[in] | uv_helper_ref | The UV helper object. |
SU_RESULT SUMeshHelperGetBackSTQCoords | ( | SUMeshHelperRef | mesh_ref, |
size_t | len, | ||
struct SUPoint3D | stq[], | ||
size_t * | count | ||
) |
Retrieves the back stq texture coordinates of a triangle mesh object.
[in] | mesh_ref | The mesh object. |
[in] | len | The number of stq coordinates to retrieve. |
[out] | stq | The stq coordinates retrieved. |
[out] | count | The number of stq coordinates retrieved. |
SU_RESULT SUMeshHelperGetFrontSTQCoords | ( | SUMeshHelperRef | mesh_ref, |
size_t | len, | ||
struct SUPoint3D | stq[], | ||
size_t * | count | ||
) |
Retrieves the front stq texture coordinates of a triangle mesh object.
[in] | mesh_ref | The mesh object. |
[in] | len | The number of stq coordinates to retrieve. |
[out] | stq | The stq coordinates retrieved. |
[out] | count | The number of stq coordinates retrieved. |
SU_RESULT SUMeshHelperGetNormals | ( | SUMeshHelperRef | mesh_ref, |
size_t | len, | ||
struct SUVector3D | normals[], | ||
size_t * | count | ||
) |
Retrieves the vertex normal vectors of a triangle mesh object.
[in] | mesh_ref | The mesh object whose vertex normal vectors are retrieved. |
[in] | len | The number of vertex normal objects to retrieve. |
[out] | normals | The vertex normal vectors retrieved. |
[out] | count | The number of normal vectors retrieved. |
SU_RESULT SUMeshHelperGetNumTriangles | ( | SUMeshHelperRef | mesh_ref, |
size_t * | count | ||
) |
Retrieves the total number of polygons in the mesh.
[in] | mesh_ref | The mesh object. |
[out] | count | The number of polygons available. |
SU_RESULT SUMeshHelperGetNumVertices | ( | SUMeshHelperRef | mesh_ref, |
size_t * | count | ||
) |
Retrieves the total number of vertices in the polygon mesh object.
[in] | mesh_ref | The mesh object. |
[out] | count | The number of vertices available. |
SU_RESULT 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.
[in] | mesh_ref | The mesh object. |
[in] | len | The number of indices to retrieve. |
[out] | indices | The indices retrieved. |
[out] | count | The number of indices retrieved. |
SU_RESULT SUMeshHelperGetVertices | ( | SUMeshHelperRef | mesh_ref, |
size_t | len, | ||
struct SUPoint3D | vertices[], | ||
size_t * | count | ||
) |
Retrieves the vertices of a triangle mesh object.
[in] | mesh_ref | The mesh object. |
[in] | len | The number of vertices to retrieve. |
[out] | vertices | The vertices retrieved. |
[out] | count | The number of vertices retrieved. |
SU_RESULT SUMeshHelperRelease | ( | SUMeshHelperRef * | mesh_ref | ) |
Deallocates a polygon mesh object.
[in] | mesh_ref | The mesh object to deallocate. |