SketchUp SDK
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Enumerations | Functions
loop.h File Reference
#include <slapi/slapi.h>
#include <slapi/model/defs.h>

Go to the source code of this file.

Enumerations

enum  SULoopWinding { SULoopWinding_CCW, SULoopWinding_CW }
 Indicates loop orientation. More...
 

Functions

SU_EXPORT SUEntityRef SULoopToEntity (SULoopRef loop)
 Converts from an SULoopRef to an SUEntityRef. This is essentially an upcast operation. More...
 
SU_EXPORT SULoopRef SULoopFromEntity (SUEntityRef entity)
 Converts from an SUEntityRef to an SULoopRef. This is essentially a downcast operation so the given SUEntityRef must be convertible to an SULoopRef. More...
 
SU_RESULT SULoopGetNumVertices (SULoopRef loop, size_t *count)
 Retrieves the number of vertices of a face loop. More...
 
SU_RESULT SULoopGetVertices (SULoopRef loop, size_t len, SUVertexRef vertices[], size_t *count)
 Retrieves the vertices of a face loop object. More...
 
SU_RESULT SULoopGetEdges (SULoopRef loop, size_t len, SUEdgeRef edges[], size_t *count)
 Retrieves the edges of a loop object. More...
 
SU_RESULT SULoopGetWinding (SULoopRef loop, const struct SUVector3D *vector3d, enum SULoopWinding *orientation)
 Retrieves the winding of a loop object with respect to a vector. More...
 
SU_RESULT SULoopIsEdgeReversed (SULoopRef loop, SUEdgeRef edge, bool *reversed)
 Retrieves a flag indicating the orientation of the given edge relative to a loop object. More...
 
SU_RESULT SULoopGetFace (SULoopRef loop, SUFaceRef *face)
 Retrieves the parent face of a loop object. More...
 
SU_RESULT SULoopIsConvex (SULoopRef loop, bool *convex)
 Retrieves a flag indicating the whether the loop is convex. More...
 
SU_RESULT SULoopIsOuterLoop (SULoopRef loop, bool *outer_loop)
 Retrieves a flag indicating the whether the loop is the outer loop on its associated face. More...
 
SU_RESULT SULoopGetEdgeUses (SULoopRef loop, size_t len, SUEdgeUseRef edge_uses[], size_t *count)
 Retrieves the edge use objects of a loop. More...
 

Enumeration Type Documentation

Indicates loop orientation.

Enumerator
SULoopWinding_CCW 
SULoopWinding_CW 

Function Documentation

SU_EXPORT SULoopRef SULoopFromEntity ( SUEntityRef  entity)

Converts from an SUEntityRef to an SULoopRef. This is essentially a downcast operation so the given SUEntityRef must be convertible to an SULoopRef.

Parameters
[in]entityThe given entity reference.
Returns
  • The converted SULoopRef if the downcast operation succeeds
  • If not, the returned reference will be invalid
SU_RESULT SULoopGetEdges ( SULoopRef  loop,
size_t  len,
SUEdgeRef  edges[],
size_t *  count 
)

Retrieves the edges of a loop object.

Parameters
[in]loopThe loop object.
[in]lenThe number of edges to retrieve.
[out]edgesThe edges retrieved.
[out]countThe number of edges retrieved.
Returns
SU_RESULT SULoopGetEdgeUses ( SULoopRef  loop,
size_t  len,
SUEdgeUseRef  edge_uses[],
size_t *  count 
)

Retrieves the edge use objects of a loop.

Parameters
[in]loopThe loop object.
[in]lenThe number of edge uses to retrieve.
[out]edge_usesThe edge uses retrieved.
[out]countThe number of edge uses retrieved.
Returns
SU_RESULT SULoopGetFace ( SULoopRef  loop,
SUFaceRef face 
)

Retrieves the parent face of a loop object.

Parameters
[in]loopThe loop object.
[out]faceThe face retrieved.
Returns
SU_RESULT SULoopGetNumVertices ( SULoopRef  loop,
size_t *  count 
)

Retrieves the number of vertices of a face loop.

Parameters
[in]loopThe loop object.
[out]countThe number of vertices.
Returns
SU_RESULT SULoopGetVertices ( SULoopRef  loop,
size_t  len,
SUVertexRef  vertices[],
size_t *  count 
)

Retrieves the vertices of a face loop object.

Parameters
[in]loopThe loop object.
[in]lenThe number of vertices to retrieve.
[out]verticesThe vertices retrieved.
[out]countThe number of vertices retrieved.
Returns
SU_RESULT SULoopGetWinding ( SULoopRef  loop,
const struct SUVector3D vector3d,
enum SULoopWinding orientation 
)

Retrieves the winding of a loop object with respect to a vector.

Parameters
[in]loopThe loop object.
[in]vector3dThe 3D vector.
[out]orientationThe orientation retrieved.
Returns
SU_RESULT SULoopIsConvex ( SULoopRef  loop,
bool *  convex 
)

Retrieves a flag indicating the whether the loop is convex.

Parameters
[in]loopThe loop object.
[out]convexThe flag retrieved. A return value of true indicates the loop is convex.
Returns
SU_RESULT SULoopIsEdgeReversed ( SULoopRef  loop,
SUEdgeRef  edge,
bool *  reversed 
)

Retrieves a flag indicating the orientation of the given edge relative to a loop object.

Parameters
[in]loopThe loop object.
[in]edgeThe edge object.
[out]reversedThe flag retrieved. A return value of true indicates that the given edge is oriented opposite of the loop object.
Returns
SU_RESULT SULoopIsOuterLoop ( SULoopRef  loop,
bool *  outer_loop 
)

Retrieves a flag indicating the whether the loop is the outer loop on its associated face.

Parameters
[in]loopThe loop object.
[out]outer_loopThe flag retrieved. A return value of true indicates the loop is the outer loop.
Returns
SU_EXPORT SUEntityRef SULoopToEntity ( SULoopRef  loop)

Converts from an SULoopRef to an SUEntityRef. This is essentially an upcast operation.

Parameters
[in]loopThe given loop reference.
Returns
  • The converted SUEntityRef if loop is a valid object
  • If not, the returned reference will be invalid