SketchUp SDK
|
#include <slapi/geometry.h>
#include <slapi/slapi.h>
#include <slapi/model/defs.h>
#include <slapi/model/curve.h>
Go to the source code of this file.
Data Structures | |
struct | SUMaterialInput |
SUMaterialInput contains information that is needed to apply a material to a face. The conventional method for applying a material to a face is to use 1 to 4 UV coordinates, which are Cartesian textures coordinates and corresponding vertex indices on the face. The vertices are referenced by index into the top level SUGeometryInputRef's vertex array. The member variable 'material' must be a valid material object, and once the material input is used (e.g. with /ref SUEntitiesFill), the material object must not be released since it will be associated with a parent object. More... | |
Functions | |
SU_RESULT | SUGeometryInputCreate (SUGeometryInputRef *geom_input) |
Creates a geometry input object. More... | |
SU_RESULT | SUGeometryInputRelease (SUGeometryInputRef *geom_input) |
Deallocates a geometry input object. More... | |
SU_RESULT | SUGeometryInputAddVertex (SUGeometryInputRef geom_input, const struct SUPoint3D *point) |
Adds a vertex to a geometry input object. More... | |
SU_RESULT | SUGeometryInputSetVertices (SUGeometryInputRef geom_input, size_t num_vertices, const struct SUPoint3D points[]) |
Sets all vertices of a geometry input object. Any existing vertices will be overridden. More... | |
SU_RESULT | SULoopInputCreate (SULoopInputRef *loop_input) |
Creates a loop input object. More... | |
SU_RESULT | SULoopInputRelease (SULoopInputRef *loop_input) |
Deallocates a loop input object. More... | |
SU_RESULT | SULoopInputAddVertexIndex (SULoopInputRef loop_input, size_t vertex_index) |
Adds a vertex index to a loop input object. More... | |
SU_RESULT | SULoopInputEdgeSetHidden (SULoopInputRef loop_input, size_t edge_index, bool hidden) |
Sets the hidden flag of an edge in a loop input object. More... | |
SU_RESULT | SULoopInputEdgeSetSoft (SULoopInputRef loop_input, size_t edge_index, bool soft) |
Sets the soft flag of an edge in a loop input object. More... | |
SU_RESULT | SULoopInputEdgeSetSmooth (SULoopInputRef loop_input, size_t edge_index, bool smooth) |
Sets the smooth flag of an edge in a loop input object. More... | |
SU_RESULT | SULoopInputAddCurve (SULoopInputRef loop_input, size_t first_edge_index, size_t last_edge_index) |
Adds a simple curve to a loop input object. More... | |
SU_RESULT | SUGeometryInputAddFace (SUGeometryInputRef geom_input, SULoopInputRef *outer_loop, size_t *added_face_index) |
Adds a face to a geometry input object with a given outer loop for the face. More... | |
SU_RESULT | SUGeometryInputFaceSetReverse (SUGeometryInputRef geom_input, size_t face_index, bool reverse) |
Sets a flag in the geometry input that, when true, will create a face by reversing the orientations of all of its loops. More... | |
SU_RESULT | SUGeometryInputFaceSetLayer (SUGeometryInputRef geom_input, size_t face_index, SULayerRef layer) |
Sets the layer of a face in the geometry input. More... | |
SU_RESULT | SUGeometryInputFaceAddInnerLoop (SUGeometryInputRef geom_input, size_t face_index, SULoopInputRef *loop_input) |
Adds an inner loop to a face in the geometry input. More... | |
SU_RESULT | SUGeometryInputFaceSetFrontMaterial (SUGeometryInputRef geom_input, size_t face_index, const struct SUMaterialInput *material_input) |
Sets the front material of a face in the geometry input. More... | |
SU_RESULT | SUGeometryInputFaceSetBackMaterial (SUGeometryInputRef geom_input, size_t face_index, const struct SUMaterialInput *material_input) |
Sets the back material of a face in the geometry input. More... | |
SU_RESULT SUGeometryInputAddFace | ( | SUGeometryInputRef | geom_input, |
SULoopInputRef * | outer_loop, | ||
size_t * | added_face_index | ||
) |
Adds a face to a geometry input object with a given outer loop for the face.
[in] | geom_input | The geometry input object. |
[in] | outer_loop | The outer loop to be set for the face. If the function succeeds (i.e. returns SU_ERROR_NONE), this loop will be deallocated. |
[in] | added_face_index | (optional) If not NULL, receives the index of the added face. |
SU_RESULT SUGeometryInputAddVertex | ( | SUGeometryInputRef | geom_input, |
const struct SUPoint3D * | point | ||
) |
Adds a vertex to a geometry input object.
[in] | geom_input | The geometry input object. |
[in] | point | The location of the vertex to be added. |
SU_RESULT SUGeometryInputCreate | ( | SUGeometryInputRef * | geom_input | ) |
Creates a geometry input object.
[out] | geom_input | The object created. This object can be passed into SUEntitiesFill to populate an entities object. It should be released subsequently by calling SUGeometryInputRelease. |
SU_RESULT SUGeometryInputFaceAddInnerLoop | ( | SUGeometryInputRef | geom_input, |
size_t | face_index, | ||
SULoopInputRef * | loop_input | ||
) |
Adds an inner loop to a face in the geometry input.
[in] | geom_input | The geometry input object. |
[in] | face_index | Index of the face to receive the inner loop. |
[in] | loop_input | The inner loop to be added. If the function succeeds (i.e. returns SU_ERROR_NONE), this loop will be deallocated. |
SU_RESULT SUGeometryInputFaceSetBackMaterial | ( | SUGeometryInputRef | geom_input, |
size_t | face_index, | ||
const struct SUMaterialInput * | material_input | ||
) |
Sets the back material of a face in the geometry input.
[in] | geom_input | The geometry input object. |
[in] | face_index | Index of the face to receive the material. |
[in] | material_input | The material input to set. |
SU_RESULT SUGeometryInputFaceSetFrontMaterial | ( | SUGeometryInputRef | geom_input, |
size_t | face_index, | ||
const struct SUMaterialInput * | material_input | ||
) |
Sets the front material of a face in the geometry input.
[in] | geom_input | The geometry input object. |
[in] | face_index | Index of the face to receive the material. |
[in] | material_input | The material input to set. |
SU_RESULT SUGeometryInputFaceSetLayer | ( | SUGeometryInputRef | geom_input, |
size_t | face_index, | ||
SULayerRef | layer | ||
) |
Sets the layer of a face in the geometry input.
[in] | geom_input | The geometry input object. |
[in] | face_index | Index of the face to be reversed. |
[in] | layer | The layer to be set. |
SU_RESULT SUGeometryInputFaceSetReverse | ( | SUGeometryInputRef | geom_input, |
size_t | face_index, | ||
bool | reverse | ||
) |
Sets a flag in the geometry input that, when true, will create a face by reversing the orientations of all of its loops.
[in] | geom_input | The geometry input object. |
[in] | face_index | Index of the face to be reversed. |
[in] | reverse | The given reverse flag. |
SU_RESULT SUGeometryInputRelease | ( | SUGeometryInputRef * | geom_input | ) |
Deallocates a geometry input object.
[in] | geom_input | The object to deallocate. |
SU_RESULT SUGeometryInputSetVertices | ( | SUGeometryInputRef | geom_input, |
size_t | num_vertices, | ||
const struct SUPoint3D | points[] | ||
) |
Sets all vertices of a geometry input object. Any existing vertices will be overridden.
[in] | geom_input | The geometry input object. |
[in] | num_vertices | The number of vertices in the given point array. |
[in] | points | The points array containing the location of vertices. |
SU_RESULT SULoopInputAddCurve | ( | SULoopInputRef | loop_input, |
size_t | first_edge_index, | ||
size_t | last_edge_index | ||
) |
Adds a simple curve to a loop input object.
[in] | loop_input | The loop input object. |
[in] | first_edge_index | First edge index to be associated with the curve. |
[in] | last_edge_index | Last edge index to be associated with the curve. |
SU_RESULT SULoopInputAddVertexIndex | ( | SULoopInputRef | loop_input, |
size_t | vertex_index | ||
) |
Adds a vertex index to a loop input object.
[in] | loop_input | The loop input object. |
[in] | vertex_index | The vertex index to add. This references a vertex within the parent geometry input's vertex collection (as a zero- based index). |
SU_RESULT SULoopInputCreate | ( | SULoopInputRef * | loop_input | ) |
Creates a loop input object.
[out] | loop_input | The object created. |
SU_RESULT SULoopInputEdgeSetHidden | ( | SULoopInputRef | loop_input, |
size_t | edge_index, | ||
bool | hidden | ||
) |
Sets the hidden flag of an edge in a loop input object.
[in] | loop_input | The loop input object. |
[in] | edge_index | The zero-based index of the edge within the loop. |
[in] | hidden | The flag to set. |
SU_RESULT SULoopInputEdgeSetSmooth | ( | SULoopInputRef | loop_input, |
size_t | edge_index, | ||
bool | smooth | ||
) |
Sets the smooth flag of an edge in a loop input object.
[in] | loop_input | The loop input object. |
[in] | edge_index | The zero-based index of the edge within the loop. |
[in] | smooth | The flag to set. |
SU_RESULT SULoopInputEdgeSetSoft | ( | SULoopInputRef | loop_input, |
size_t | edge_index, | ||
bool | soft | ||
) |
Sets the soft flag of an edge in a loop input object.
[in] | loop_input | The loop input object. |
[in] | edge_index | The zero-based index of the edge within the loop. |
[in] | soft | The flag to set. |
SU_RESULT SULoopInputRelease | ( | SULoopInputRef * | loop_input | ) |
Deallocates a loop input object.
[in] | loop_input | The object to deallocate. |