SketchUp C API

- Main Page
- Related Pages
- Data Structures
- Files

- Data Structures
- Data Structure Index
- Class Hierarchy
- Data Fields

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Related Functions
SUEdgeUseRef Struct Reference

SUEdgeUseRef objects are used to retrieve the topology of the edges of a polygon. The geometry of the polygon being represented by SULoopRef that is already associated with a face object. The typical use of EdgeUse object is to retrieve them from a face object's loop, and then read the topology values from them. More...

`#include <SketchUpAPI/model/edge_use.h>`

Inherits SUEntityRef.

## Related Functions
(Note that these are not member functions.)
SUEntityRef | SUEdgeUseToEntity (SUEdgeUseRef edgeuse)
| Converts from an SUEdgeUseRef to an SUEntityRef. This is essentially an upcast operation. More...
SUEdgeUseRef | SUEdgeUseFromEntity (SUEntityRef entity)
| Converts from an SUEntityRef to an SUEdgeUseRef. This is essentially a downcast operation so the given SUEntityRef must be convertible to an SUEdgeUseRef. More...
enum SUResult | SUEdgeUseGetEdge (SUEdgeUseRef edgeuse, SUEdgeRef *edge)
| Retrieves the edge object the EdgeUse object belongs to. More...
enum SUResult | SUEdgeUseGetLoop (SUEdgeUseRef edgeuse, SULoopRef *loop)
| Retrieves the loop object the EdgeUse object is associated with. More...
enum SUResult | SUEdgeUseGetFace (SUEdgeUseRef edgeuse, SUFaceRef *face)
| Retrieves the face object the EdgeUse object is associated with. More...
enum SUResult | SUEdgeUseGetNumPartners (SUEdgeUseRef edgeuse, size_t *count)
| Retrieves the number of EdgeUse objects that are linked to the EdgeUse object. More...
enum SUResult | SUEdgeUseGetPartners (SUEdgeUseRef edgeuse, size_t len, SUEdgeUseRef partners[], size_t *count)
| Retrieves the EdgeUse objects that are linked to the EdgeUse object. More...
enum SUResult | SUEdgeUseIsReversed (SUEdgeUseRef edgeuse, bool *reversed)
| Retrieves a flag indicating whether this EdgeUse is traversed in the opposite direction as its corresponding edge. More...
enum SUResult | SUEdgeUseGetPrevious (SUEdgeUseRef edgeuse, SUEdgeUseRef *prev_edgeuse)
| Retrieves the EdgeUse object just preceding an EdgeUse object in the collection of linked EdgeUses. More...
enum SUResult | SUEdgeUseGetNext (SUEdgeUseRef edgeuse, SUEdgeUseRef *next_edgeuse)
| Retrieves the EdgeUse object just following an EdgeUse object in the collection of linked EdgeUses. More...
enum SUResult | SUEdgeUseGetStartVertex (SUEdgeUseRef edgeuse, SUVertexRef *vertex)
| Retrieves the start vertex of an EdgeUse object. The start vertex of the EdgeUse object may not be the same as the start vertex of the corresponding edge of the EdgeUse object. An EdgeUse object is part of a face loop whose direction may be the reverse of the direction of the edge. More...
enum SUResult | SUEdgeUseGetEndVertex (SUEdgeUseRef edgeuse, SUVertexRef *vertex)
| Retrieves the end vertex of an EdgeUse object. More...
enum SUResult | SUEdgeUseGetStartVertexNormal (SUEdgeUseRef edgeuse, struct SUVector3D *normal)
| Retrieves the normal vector at the start vertex of an EdgeUse object. More...
enum SUResult | SUEdgeUseGetEndVertexNormal (SUEdgeUseRef edgeuse, struct SUVector3D *normal)
| Retrieves the normal vector at the end vertex of an EdgeUse object. More...
Related Functions inherited from SUEntityRef
enum SURefType | SUEntityGetType (SUEntityRef entity)
| Returns the concrete type of the given entity. More...
enum SUResult | SUEntityGetID (SUEntityRef entity, int32_t *entity_id)
| Retrieves the id of the entity. More...
enum SUResult | SUEntityGetPersistentID (SUEntityRef entity, int64_t *entity_pid)
| Retrieves the persistent id of the entity. More...
enum SUResult | SUEntityGetNumAttributeDictionaries (SUEntityRef entity, size_t *count)
| Retrieves the number of attribute dictionaries of an entity. More...
enum SUResult | SUEntityGetAttributeDictionaries (SUEntityRef entity, size_t len, SUAttributeDictionaryRef dictionaries[], size_t *count)
| Retrieves the attribute dictionaries of an entity. More...
enum SUResult | SUEntityAddAttributeDictionary (SUEntityRef entity, SUAttributeDictionaryRef dictionary)
| Adds the attribute dictionary to an entity. The given dictionary object must not belong to another entity. In other words, each dictionary should be added to one entity only. More...
enum SUResult | SUEntityGetAttributeDictionary (SUEntityRef entity, const char *name, SUAttributeDictionaryRef *dictionary)
| Retrieves the attribute dictionary of an entity that has the given name. More...
enum SUResult | SUEntityGetModel (SUEntityRef entity, SUModelRef *model)
| Retrieves the model object associated with the entity. More...
enum SUResult | SUEntityGetParentEntities (SUEntityRef entity, SUEntitiesRef *entities)
| Retrieves the entities object which contains the entity. More...

## Detailed Description

SUEdgeUseRef objects are used to retrieve the topology of the edges of a polygon. The geometry of the polygon being represented by SULoopRef that is already associated with a face object. The typical use of EdgeUse object is to retrieve them from a face object's loop, and then read the topology values from them.

## Friends And Related Function Documentation

SUEdgeUseRef SUEdgeUseFromEntity | ( | SUEntityRef | entity | ) |
| related

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

Parameters

  [in] | entity | The given entity reference.

Returns
  - The converted SUEdgeUseRef if the downcast operation succeeds.
  - If not, the returned reference will be invalid.

enum SUResult SUEdgeUseGetEdge | ( | SUEdgeUseRef | edgeuse,
|  | SUEdgeRef * | edge
| ) |  |
| related

Retrieves the edge object the EdgeUse object belongs to.

Parameters

  [in] | edgeuse | The EdgeUse object.
  [out] | edge | The edge object retrieved.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if edgeuse is not a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if edge is NULL.

enum SUResult SUEdgeUseGetEndVertex | ( | SUEdgeUseRef | edgeuse,
|  | SUVertexRef * | vertex
| ) |  |
| related

Retrieves the end vertex of an EdgeUse object.

The end vertex of the EdgeUse object may not be the same as the end vertex of the corresponding edge of the EdgeUse object. An EdgeUse object is part of a face loop whose direction may be the reverse of the direction of the edge.

Parameters

  [in] | edgeuse | The EdgeUse object.
  [out] | vertex | The vertex object retrieved.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if edge is not a valid EdgeUse object
  - SU_ERROR_NULL_POINTER_OUTPUT if vertex is NULL

enum SUResult SUEdgeUseGetEndVertexNormal | ( | SUEdgeUseRef | edgeuse,
|  | struct SUVector3D * | normal
| ) |  |
| related

Retrieves the normal vector at the end vertex of an EdgeUse object.

Parameters

  [in] | edgeuse | The EdgeUse object.
  [out] | normal | The normal vector retrieved.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if edge is not a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if normal is NULL.

enum SUResult SUEdgeUseGetFace | ( | SUEdgeUseRef | edgeuse,
|  | SUFaceRef * | face
| ) |  |
| related

Retrieves the face object the EdgeUse object is associated with.

Parameters

  [in] | edgeuse | The EdgeUse object.
  [out] | face | The face object retrieved.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if edgeuse is not a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if face is NULL

enum SUResult SUEdgeUseGetLoop | ( | SUEdgeUseRef | edgeuse,
|  | SULoopRef * | loop
| ) |  |
| related

Retrieves the loop object the EdgeUse object is associated with.

Parameters

  [in] | edgeuse | The EdgeUse object.
  [out] | loop | The loop object retrieved.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if edgeuse is not a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if loop is NULL

enum SUResult SUEdgeUseGetNext | ( | SUEdgeUseRef | edgeuse,
|  | SUEdgeUseRef * | next_edgeuse
| ) |  |
| related

Retrieves the EdgeUse object just following an EdgeUse object in the collection of linked EdgeUses.

Parameters

  [in] | edgeuse | The EdgeUse object.
  [out] | next_edgeuse | The EdgeUse retrieved.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if edgeuse is not a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if next_edgeuse is NULL.

enum SUResult SUEdgeUseGetNumPartners | ( | SUEdgeUseRef | edgeuse,
|  | size_t * | count
| ) |  |
| related

Retrieves the number of EdgeUse objects that are linked to the EdgeUse object.

Parameters

  [in] | edgeuse | The EdgeUse object.
  [out] | count | The number of partners.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if edgeuse is not a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if count is NULL

enum SUResult SUEdgeUseGetPartners | ( | SUEdgeUseRef | edgeuse,
|  | size_t | len,
|  | SUEdgeUseRef | partners[],
|  | size_t * | count
| ) |  |
| related

Retrieves the EdgeUse objects that are linked to the EdgeUse object.

Parameters

  [in] | edgeuse | The EdgeUse object.
  [in] | len | The number of partners to retrieve.
  [out] | partners | The partners retrieved.
  [out] | count | The number of partners retrieved.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if edgeuse is not a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if partners or count is NULL

enum SUResult SUEdgeUseGetPrevious | ( | SUEdgeUseRef | edgeuse,
|  | SUEdgeUseRef * | prev_edgeuse
| ) |  |
| related

Retrieves the EdgeUse object just preceding an EdgeUse object in the collection of linked EdgeUses.

Parameters

  [in] | edgeuse | The EdgeUse object.
  [out] | prev_edgeuse | The EdgeUse retrieved.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if edgeuse is not a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if prev_edgeuse is NULL.

enum SUResult SUEdgeUseGetStartVertex | ( | SUEdgeUseRef | edgeuse,
|  | SUVertexRef * | vertex
| ) |  |
| related

Retrieves the start vertex of an EdgeUse object. The start vertex of the EdgeUse object may not be the same as the start vertex of the corresponding edge of the EdgeUse object. An EdgeUse object is part of a face loop whose direction may be the reverse of the direction of the edge.

Parameters

  [in] | edgeuse | The EdgeUse object.
  [out] | vertex | The vertex object retrieved.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if edge is not a valid EdgeUse object
  - SU_ERROR_NULL_POINTER_OUTPUT if vertex is NULL

enum SUResult SUEdgeUseGetStartVertexNormal | ( | SUEdgeUseRef | edgeuse,
|  | struct SUVector3D * | normal
| ) |  |
| related

Retrieves the normal vector at the start vertex of an EdgeUse object.

Parameters

  [in] | edgeuse | The EdgeUse object.
  [out] | normal | The normal vector retrieved.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if edge is not a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if normal is NULL

enum SUResult SUEdgeUseIsReversed | ( | SUEdgeUseRef | edgeuse,
|  | bool * | reversed
| ) |  |
| related

Retrieves a flag indicating whether this EdgeUse is traversed in the opposite direction as its corresponding edge.

Parameters

  [in] | edgeuse | The EdgeUse object.
  [out] | reversed | The retrieved flag.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if edgeuse is not a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if reversed is NULL.

SUEntityRef SUEdgeUseToEntity | ( | SUEdgeUseRef | edgeuse | ) |
| related

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

Parameters

  [in] | edgeuse | The given edge use reference.

Returns
  - The converted SUEntityRef if edgeuse is a valid edge use.
  - If not, the returned reference will be invalid.

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

- SketchUpAPI/model/defs.h
- SketchUpAPI/model/edge_use.h