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
SUVertexRef Struct Reference

A vertex type that has a position and is associated with other geometry like edges, faces, and loops. More...

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

Inherits SUEntityRef.

## Related Functions
(Note that these are not member functions.)
SUEntityRef | SUVertexToEntity (SUVertexRef vertex)
| Converts from an SUVertexRef to an SUEntityRef. This is essentially an upcast operation. More...
SUVertexRef | SUVertexFromEntity (SUEntityRef entity)
| Converts from an SUEntityRef to an SUVertexRef. This is essentially a downcast operation so the given SUEntityRef must be convertible to an SUVertexRef. More...
enum SUResult | SUVertexGetPosition (SUVertexRef vertex, struct SUPoint3D *position)
| Retrieves the position of a vertex object. More...
enum SUResult | SUVertexSetPosition (SUVertexRef vertex, const struct SUPoint3D *position)
| Sets the position of a vertex object. More...
enum SUResult | SUVertexGetNumEdges (SUVertexRef vertex, size_t *count)
| Retrieves the number of edges that the vertex is associated with. More...
enum SUResult | SUVertexGetEdges (SUVertexRef vertex, size_t len, SUEdgeRef edges[], size_t *count)
| Retrieves the edge objects associated with a vertex object. More...
enum SUResult | SUVertexGetNumFaces (SUVertexRef vertex, size_t *count)
| Retrieves the number of faces that the vertex is associated with. More...
enum SUResult | SUVertexGetFaces (SUVertexRef vertex, size_t len, SUFaceRef faces[], size_t *count)
| Retrieves the face objects associated with a vertex object. More...
enum SUResult | SUVertexGetNumLoops (SUVertexRef vertex, size_t *count)
| Retrieves the number of loops that the vertex is associated with. More...
enum SUResult | SUVertexGetLoops (SUVertexRef vertex, size_t len, SULoopRef loops[], size_t *count)
| Retrieves the loop objects associated with a vertex 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

A vertex type that has a position and is associated with other geometry like edges, faces, and loops.

## Friends And Related Function Documentation

SUVertexRef SUVertexFromEntity | ( | SUEntityRef | entity | ) |
| related

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

Parameters

  [in] | entity | The entity object.

Returns
  - The converted SUVertexRef if the downcast operation succeeds
  - If the downcast operation fails, the returned reference will be invalid

enum SUResult SUVertexGetEdges | ( | SUVertexRef | vertex,
|  | size_t | len,
|  | SUEdgeRef | edges[],
|  | size_t * | count
| ) |  |
| related

Retrieves the edge objects associated with a vertex object.

Parameters

  [in] | vertex | The vertex object.
  [in] | len | The number of edges to retrieve.
  [out] | edges | The edges retrieved.
  [out] | count | The number of edges retrieved.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if vertex is an invalid object
  - SU_ERROR_NULL_POINTER_OUTPUT if edges or count is NULL

enum SUResult SUVertexGetFaces | ( | SUVertexRef | vertex,
|  | size_t | len,
|  | SUFaceRef | faces[],
|  | size_t * | count
| ) |  |
| related

Retrieves the face objects associated with a vertex object.

Parameters

  [in] | vertex | The vertex object.
  [in] | len | The number of faces to retrieve.
  [out] | faces | The faces retrieved.
  [out] | count | The number of faces retrieved.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if vertex is an invalid object
  - SU_ERROR_NULL_POINTER_OUTPUT if faces or count is NULL

enum SUResult SUVertexGetLoops | ( | SUVertexRef | vertex,
|  | size_t | len,
|  | SULoopRef | loops[],
|  | size_t * | count
| ) |  |
| related

Retrieves the loop objects associated with a vertex object.

Parameters

  [in] | vertex | The vertex object.
  [in] | len | The number of loops to retrieve.
  [out] | loops | The loops retrieved.
  [out] | count | The number of loops retrieved.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if vertex is an invalid object
  - SU_ERROR_NULL_POINTER_OUTPUT if loops or count is NULL

enum SUResult SUVertexGetNumEdges | ( | SUVertexRef | vertex,
|  | size_t * | count
| ) |  |
| related

Retrieves the number of edges that the vertex is associated with.

Parameters

  [in] | vertex | The vertex object.
  [out] | count | The number of edges.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if vertex is an invalid object
  - SU_ERROR_NULL_POINTER_OUTPUT if count is NULL

enum SUResult SUVertexGetNumFaces | ( | SUVertexRef | vertex,
|  | size_t * | count
| ) |  |
| related

Retrieves the number of faces that the vertex is associated with.

Parameters

  [in] | vertex | The vertex object.
  [out] | count | The number of faces.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if vertex is an invalid object
  - SU_ERROR_NULL_POINTER_OUTPUT if count is NULL

enum SUResult SUVertexGetNumLoops | ( | SUVertexRef | vertex,
|  | size_t * | count
| ) |  |
| related

Retrieves the number of loops that the vertex is associated with.

Parameters

  [in] | vertex | The vertex object.
  [out] | count | The number of loops.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if vertex is an invalid object
  - SU_ERROR_NULL_POINTER_OUTPUT if count is NULL

enum SUResult SUVertexGetPosition | ( | SUVertexRef | vertex,
|  | struct SUPoint3D * | position
| ) |  |
| related

Retrieves the position of a vertex object.

Parameters

  [in] | vertex | The vertex object.
  [out] | position | The vertex position.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if vertex is an invalid object
  - SU_ERROR_NULL_POINTER_OUTPUT if position is NULL

enum SUResult SUVertexSetPosition | ( | SUVertexRef | vertex,
|  | const struct SUPoint3D * | position
| ) |  |
| related

Sets the position of a vertex object.

Parameters

  [in,out] | vertex | The vertex object.
  [in] | position | The value used to set the vertex position.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if vertex is an invalid object
  - SU_ERROR_NULL_POINTER_INPUT if position is NULL

SUEntityRef SUVertexToEntity | ( | SUVertexRef | vertex | ) |
| related

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

Parameters

  [in] | vertex | The vertex object.

Returns
  - The converted SUEntityRef if vertex is a valid object
  - 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/vertex.h