SketchUp SDK
|
#include <slapi/slapi.h>
#include <slapi/geometry.h>
#include <slapi/model/geometry_input.h>
#include <slapi/model/defs.h>
Go to the source code of this file.
Functions | |
SU_EXPORT SUEntityRef | SUFaceToEntity (SUFaceRef face) |
Converts from an SUFaceRef to an SUEntityRef. This is essentially an upcast operation. More... | |
SU_EXPORT SUFaceRef | SUFaceFromEntity (SUEntityRef entity) |
Converts from an SUEntityRef to an SUFaceRef. This is essentially a downcast operation so the given entity must be convertible to an SUFaceRef. More... | |
SU_EXPORT SUDrawingElementRef | SUFaceToDrawingElement (SUFaceRef face) |
Converts from an SUFaceRef to an SUDrawingElementRef. This is essentially an upcast operation. More... | |
SU_EXPORT SUFaceRef | SUFaceFromDrawingElement (SUDrawingElementRef drawing_elem) |
Converts from an SUDrawingElementRef to an SUFaceRef. This is essentially a downcast operation so the given element must be convertible to an SUFaceRef. More... | |
SU_RESULT | SUFaceCreate (SUFaceRef *face, const struct SUPoint3D vertices3d[], SULoopInputRef *outer_loop) |
Creates a face without holes. More... | |
SU_RESULT | SUFaceCreateSimple (SUFaceRef *face, const struct SUPoint3D vertices3d[], size_t len) |
Creates a simple face without holes from an array of vertices. More... | |
SU_RESULT | SUFaceGetNormal (SUFaceRef face, struct SUVector3D *normal) |
Retrieves the normal vector of a face object. More... | |
SU_RESULT | SUFaceRelease (SUFaceRef *face) |
Releases a face object and its associated resources. More... | |
SU_RESULT | SUFaceGetNumEdges (SUFaceRef face, size_t *count) |
Retrieves the number of edges in a face. More... | |
SU_RESULT | SUFaceGetEdges (SUFaceRef face, size_t len, SUEdgeRef edges[], size_t *count) |
Retrieves the edges in the face. More... | |
SU_RESULT | SUFaceGetPlane (SUFaceRef face, struct SUPlane3D *plane) |
Retrieves the plane of the face. More... | |
SU_RESULT | SUFaceGetNumVertices (SUFaceRef face, size_t *count) |
Retrieves the number of vertices that the face is associated with. More... | |
SU_RESULT | SUFaceGetVertices (SUFaceRef face, size_t len, SUVertexRef vertices[], size_t *count) |
Retrieves the vertex objects associated with a face object. More... | |
SU_RESULT | SUFaceGetOuterLoop (SUFaceRef face, SULoopRef *loop) |
Retrieves the outer loop of a face object. More... | |
SU_RESULT | SUFaceGetNumInnerLoops (SUFaceRef face, size_t *count) |
Retrieves the number of loops in a face. More... | |
SU_RESULT | SUFaceGetInnerLoops (SUFaceRef face, size_t len, SULoopRef loops[], size_t *count) |
Retrieves the loops in the face. More... | |
SU_RESULT | SUFaceAddInnerLoop (SUFaceRef face, const struct SUPoint3D vertices3d[], SULoopInputRef *loop) |
Adds a hole to the face. The face object must be associated with a parent component. More... | |
SU_RESULT | SUFaceGetFrontMaterial (SUFaceRef face, SUMaterialRef *material) |
Retrieves the front material associated with a face object. More... | |
SU_RESULT | SUFaceSetFrontMaterial (SUFaceRef face, SUMaterialRef material) |
Sets the front material of a face object. More... | |
SU_RESULT | SUFaceGetBackMaterial (SUFaceRef face, SUMaterialRef *material) |
Retrieves the back material associate with a face object. More... | |
SU_RESULT | SUFaceSetBackMaterial (SUFaceRef face, SUMaterialRef material) |
Sets the back material of a face object. More... | |
SU_RESULT | SUFaceIsFrontMaterialAffine (SUFaceRef face, bool *is_affine) |
Retrieves the flag indicating whether a face object has an affine texture applied to its front. More... | |
SU_RESULT | SUFaceIsBackMaterialAffine (SUFaceRef face, bool *is_affine) |
Retrieves the flag indicating whether a face object has an affine texture applied to its back. More... | |
SU_RESULT | SUFaceGetArea (SUFaceRef face, double *area) |
Computes the area of the face, taking into account all the inner loops and cuts from openings. More... | |
SU_RESULT | SUFaceIsComplex (SUFaceRef face, bool *is_complex) |
Retrieves a flag indicating whether the face is complex, i.e. contains either inner loops or openings cut by attached component instances or attached groups. More... | |
SU_RESULT | SUFaceGetUVHelper (SUFaceRef face, bool front, bool back, SUTextureWriterRef texture_writer, SUUVHelperRef *uv_helper) |
Creates a UV helper for the face. More... | |
SU_RESULT | SUFaceGetUVHelperWithTextureHandle (SUFaceRef face, bool front, bool back, SUTextureWriterRef texture_writer, long textureHandle, SUUVHelperRef *uv_helper) |
Creates a UV helper for the face given a specific texture handle. More... | |
SU_RESULT SUFaceAddInnerLoop | ( | SUFaceRef | face, |
const struct SUPoint3D | vertices3d[], | ||
SULoopInputRef * | loop | ||
) |
Adds a hole to the face. The face object must be associated with a parent component.
[in] | face | The face object. |
[in] | vertices3d | The array of vertices references by the added loop. |
[in] | loop | The loop input that describes the inner loop. If the function is successful, the new face will take ownership of the loop and this reference will be invalidated. |
SU_RESULT SUFaceCreate | ( | SUFaceRef * | face, |
const struct SUPoint3D | vertices3d[], | ||
SULoopInputRef * | outer_loop | ||
) |
Creates a face without holes.
[out] | face | The face object created. |
[in] | vertices3d | The array of vertices that make the face. |
[in] | outer_loop | The loop input that describes the outer loop of the face. If the function is successful, the new face will take ownership of the loop and this reference will be invalidated. |
Creates a simple face without holes from an array of vertices.
[out] | face | The face object created. |
[in] | vertices3d | The array of vertices of the face. |
[in] | len | The length of the array of vertices. |
SU_EXPORT SUFaceRef SUFaceFromDrawingElement | ( | SUDrawingElementRef | drawing_elem | ) |
Converts from an SUDrawingElementRef to an SUFaceRef. This is essentially a downcast operation so the given element must be convertible to an SUFaceRef.
[in] | drawing_elem | The given element reference. |
SU_EXPORT SUFaceRef SUFaceFromEntity | ( | SUEntityRef | entity | ) |
Converts from an SUEntityRef to an SUFaceRef. This is essentially a downcast operation so the given entity must be convertible to an SUFaceRef.
[in] | entity | The given entity reference. |
SU_RESULT SUFaceGetArea | ( | SUFaceRef | face, |
double * | area | ||
) |
Computes the area of the face, taking into account all the inner loops and cuts from openings.
[in] | face | The face object. |
[out] | area | The area retrieved. |
SU_RESULT SUFaceGetBackMaterial | ( | SUFaceRef | face, |
SUMaterialRef * | material | ||
) |
Retrieves the back material associate with a face object.
[in] | face | The face object. |
[out] | material | The material object retrieved. |
Retrieves the edges in the face.
[in] | face | The face object. |
[in] | len | The number of edges to retrieve. |
[out] | edges | The edges retrieved. |
[out] | count | The number of edges retrieved. |
SU_RESULT SUFaceGetFrontMaterial | ( | SUFaceRef | face, |
SUMaterialRef * | material | ||
) |
Retrieves the front material associated with a face object.
[in] | face | The face object. |
[out] | material | The material object retrieved. |
Retrieves the loops in the face.
[in] | face | The face object. |
[in] | len | The number of loops to retrieve. |
[out] | loops | The inner loops retrieved. |
[out] | count | The number of inner loops retrieved. |
SU_RESULT SUFaceGetNormal | ( | SUFaceRef | face, |
struct SUVector3D * | normal | ||
) |
Retrieves the normal vector of a face object.
[in] | face | The face object. |
[out] | normal | The 3d normal vector retrieved. |
SU_RESULT SUFaceGetNumEdges | ( | SUFaceRef | face, |
size_t * | count | ||
) |
Retrieves the number of edges in a face.
[in] | face | The face object. |
[out] | count | The number of edges. |
SU_RESULT SUFaceGetNumInnerLoops | ( | SUFaceRef | face, |
size_t * | count | ||
) |
Retrieves the number of loops in a face.
[in] | face | The face object. |
[out] | count | The number of inner loops. |
SU_RESULT SUFaceGetNumVertices | ( | SUFaceRef | face, |
size_t * | count | ||
) |
Retrieves the number of vertices that the face is associated with.
[in] | face | The face object. |
[out] | count | The number of vertices. |
Retrieves the outer loop of a face object.
[in] | face | The face object. |
[out] | loop | The loop object retrieved. |
Retrieves the plane of the face.
[in] | face | The face object. |
[out] | plane | The 3d plane retrieved. |
SU_RESULT SUFaceGetUVHelper | ( | SUFaceRef | face, |
bool | front, | ||
bool | back, | ||
SUTextureWriterRef | texture_writer, | ||
SUUVHelperRef * | uv_helper | ||
) |
Creates a UV helper for the face.
[in] | face | The face object. |
[in] | front | Flag indicating whether to compute the UV coordinates for the front of the face. |
[in] | back | Flag indicating whether to compute the UV coordinates for the back of the face. |
[in] | texture_writer | An optional texture writer to aid in texture coordinate calculations for non-affine textures. |
[out] | uv_helper | The UV helper object created. Must be deallocated via SUUVHelperRelease. |
SU_RESULT SUFaceGetUVHelperWithTextureHandle | ( | SUFaceRef | face, |
bool | front, | ||
bool | back, | ||
SUTextureWriterRef | texture_writer, | ||
long | textureHandle, | ||
SUUVHelperRef * | uv_helper | ||
) |
Creates a UV helper for the face given a specific texture handle.
[in] | face | The face object. |
[in] | front | Flag indicating whether to compute the UV coordinates for the front of the face. |
[in] | back | Flag indicating whether to compute the UV coordinates for the back of the face. |
[in] | texture_writer | An optional texture writer to aid in texture coordinate calculations for non-affine textures. |
[in] | textureHandle | The handle of the image that should be mapped to the face. |
[out] | uv_helper | The UV helper object created. Must be deallocated via SUUVHelperRelease. |
SU_RESULT SUFaceGetVertices | ( | SUFaceRef | face, |
size_t | len, | ||
SUVertexRef | vertices[], | ||
size_t * | count | ||
) |
Retrieves the vertex objects associated with a face object.
[in] | face | The face object. |
[in] | len | The number of vertices to retrieve. |
[out] | vertices | The vertices retrieved. |
[out] | count | The number of vertices retrieved. |
SU_RESULT SUFaceIsBackMaterialAffine | ( | SUFaceRef | face, |
bool * | is_affine | ||
) |
Retrieves the flag indicating whether a face object has an affine texture applied to its back.
[in] | face | The face object. |
[out] | is_affine | The flag retrieved. |
SU_RESULT SUFaceIsComplex | ( | SUFaceRef | face, |
bool * | is_complex | ||
) |
Retrieves a flag indicating whether the face is complex, i.e. contains either inner loops or openings cut by attached component instances or attached groups.
[in] | face | The face object. |
[out] | is_complex | The flag retrieved. |
SU_RESULT SUFaceIsFrontMaterialAffine | ( | SUFaceRef | face, |
bool * | is_affine | ||
) |
Retrieves the flag indicating whether a face object has an affine texture applied to its front.
[in] | face | The face object. |
[out] | is_affine | The flag retrieved. |
SU_RESULT SUFaceRelease | ( | SUFaceRef * | face | ) |
Releases a face object and its associated resources.
[in] | face | The face object. |
SU_RESULT SUFaceSetBackMaterial | ( | SUFaceRef | face, |
SUMaterialRef | material | ||
) |
Sets the back material of a face object.
[in] | face | The face object. |
[in] | material | The material object to set. |
SU_RESULT SUFaceSetFrontMaterial | ( | SUFaceRef | face, |
SUMaterialRef | material | ||
) |
Sets the front material of a face object.
[in] | face | The face object. |
[in] | material | The material object to set. |
SU_EXPORT SUDrawingElementRef SUFaceToDrawingElement | ( | SUFaceRef | face | ) |
Converts from an SUFaceRef to an SUDrawingElementRef. This is essentially an upcast operation.
[in] | face | The given face reference. |
SU_EXPORT SUEntityRef SUFaceToEntity | ( | SUFaceRef | face | ) |
Converts from an SUFaceRef to an SUEntityRef. This is essentially an upcast operation.
[in] | face | The given face reference. |