Loading...
Searching...
No Matches
VertexDescriptor Class Reference

Simple class used by subclasses of SurfaceFactory to describe a vertex. More...

`#include <vertexDescriptor.h>`

## Public Member Functions

Methods to begin and end specification
Partially constructed instances are populated using a set of methods between calls to Initialize() and Finalize(). Both return false to indicate failure due to invalid input, or the instance can be inspected after each to determine if valid.
bool | Initialize (int numIncidentFaces)
| Initialize specification with the number of incident faces.
bool | Finalize ()
| Terminate the sequence of specifications.
bool | IsValid () const
| Return if instance is valid.
Methods to specify topology
Methods to specify the overall topology, the sizes of incident faces and any assigned sharpness values.
void | SetManifold (bool isManifold)
| Declare the vertex neighborhood as manifold (ordered).
void | SetBoundary (bool isOnBoundary)
| Declare the vertex neighborhood as being on a boundary.
void | SetIncidentFaceSize (int faceIndex, int faceSize)
| Assign the size of an incident face.
void | ClearIncidentFaceSizes ()
| Remove any assigned sizes of incident faces.
void | SetVertexSharpness (float sharpness)
| Assign sharpness to the vertex.
void | ClearVertexSharpness ()
| Remove any sharpness assigned to the vertex.
void | SetManifoldEdgeSharpness (int edgeIndex, float edgeSharpness)
| Assign sharpness to the edge of a manifold neighborhood.
void | SetIncidentFaceEdgeSharpness (int faceIndex, float leadingEdgeSharp, float trailingEdgeSharp)
| Assign sharpness to the edges of an incident face.
void | ClearEdgeSharpness ()
| Remove any sharpness assigned to the incident edges.
Methods to inspect topology to confirm assignment
While the public interface is primarily intended for assignment, methods are available to inspect intermediate results.
bool | IsManifold () const
| Return if vertex neighborhood is manifold.
bool | IsBoundary () const
| Return if vertex neighborhood is on a boundary.
bool | HasIncidentFaceSizes () const
| Return if the sizes of incident faces are assigned.
int | GetIncidentFaceSize (int faceIndex) const
| Return the size of an incident face.
bool | HasVertexSharpness () const
| Return if sharpness was assigned to the vertex.
float | GetVertexSharpness () const
| Return the sharpness of the vertex.
bool | HasEdgeSharpness () const
| Return if sharpness was assigned to the incident edges.
float | GetManifoldEdgeSharpness (int edgeIndex) const
| Return the sharpness assigned to a manifold edge.
void | GetIncidentFaceEdgeSharpness (int faceIndex, float *leadingEdgeSharp, float *trailingEdgeSharp) const
| Return the sharpness assigned to edges of an incident face.

## Detailed Description

Simple class used by subclasses of SurfaceFactory to describe a vertex.

VertexDescriptor is a simple class used by SurfaceFactory and its subclasses to provide a complete topological description around the vertex of a face, i.e. its valence, the sizes of its incident faces, sharpness values, etc.

Instances are created and partially initialized by SurfaceFactory before being passed to its subclasses to be fully populated. So public construction is not available (or useful).

Definition at line 131 of file vertexDescriptor.h.

## Member Function Documentation

## ClearEdgeSharpness()

void ClearEdgeSharpness | ( |  | ) |

inline

Remove any sharpness assigned to the incident edges.

Definition at line 398 of file vertexDescriptor.h.

## ClearIncidentFaceSizes()

void ClearIncidentFaceSizes | ( |  | ) |

inline

Remove any assigned sizes of incident faces.

Definition at line 350 of file vertexDescriptor.h.

## ClearVertexSharpness()

void ClearVertexSharpness | ( |  | ) |

inline

Remove any sharpness assigned to the vertex.

Definition at line 377 of file vertexDescriptor.h.

## Finalize()

bool Finalize | ( |  | ) |

Terminate the sequence of specifications.

## GetIncidentFaceEdgeSharpness()

void GetIncidentFaceEdgeSharpness | ( | int | faceIndex,
|  | float * | leadingEdgeSharp,
|  | float * | trailingEdgeSharp ) const

inline

Return the sharpness assigned to edges of an incident face.

Definition at line 436 of file vertexDescriptor.h.

## GetIncidentFaceSize()

int GetIncidentFaceSize | ( | int | faceIndex | ) | const

inline

Return the size of an incident face.

Definition at line 362 of file vertexDescriptor.h.

## GetManifoldEdgeSharpness()

float GetManifoldEdgeSharpness | ( | int | edgeIndex | ) | const

inline

Return the sharpness assigned to a manifold edge.

Definition at line 420 of file vertexDescriptor.h.

## GetVertexSharpness()

float GetVertexSharpness | ( |  | ) | const

inline

Return the sharpness of the vertex.

Definition at line 386 of file vertexDescriptor.h.

## HasEdgeSharpness()

bool HasEdgeSharpness | ( |  | ) | const

inline

Return if sharpness was assigned to the incident edges.

Definition at line 394 of file vertexDescriptor.h.

## HasIncidentFaceSizes()

bool HasIncidentFaceSizes | ( |  | ) | const

inline

Return if the sizes of incident faces are assigned.

Definition at line 346 of file vertexDescriptor.h.

## HasVertexSharpness()

bool HasVertexSharpness | ( |  | ) | const

inline

Return if sharpness was assigned to the vertex.

Definition at line 373 of file vertexDescriptor.h.

## Initialize()

bool Initialize | ( | int | numIncidentFaces | ) |

Initialize specification with the number of incident faces.

## IsBoundary()

bool IsBoundary | ( |  | ) | const

inline

Return if vertex neighborhood is on a boundary.

Definition at line 338 of file vertexDescriptor.h.

## IsManifold()

bool IsManifold | ( |  | ) | const

inline

Return if vertex neighborhood is manifold.

Definition at line 329 of file vertexDescriptor.h.

## IsValid()

bool IsValid | ( |  | ) | const

inline

Return if instance is valid.

Definition at line 320 of file vertexDescriptor.h.

## SetBoundary()

void SetBoundary | ( | bool | isOnBoundary | ) |

inline

Declare the vertex neighborhood as being on a boundary.

Definition at line 334 of file vertexDescriptor.h.

## SetIncidentFaceEdgeSharpness()

void SetIncidentFaceEdgeSharpness | ( | int | faceIndex,
|  | float | leadingEdgeSharp,
|  | float | trailingEdgeSharp )

inline

Assign sharpness to the edges of an incident face.

In all cases, sharpness can be assigned to edges by associating those edges with their incident faces. This method assigns sharpness to the two edges incident edges of an incident face. An alternative is available for the case of a manifold vertex.

Parameters

  faceIndex | Index of the incident face
  leadingEdgeSharp | Sharpness to assign to the leading edge of the incident face, i.e. the edge of the face following the vertex.
  trailingEdgeSharp | Sharpness to assign to the trailing edge of the incident face, i.e. the edge of the face preceding the vertex.

Definition at line 427 of file vertexDescriptor.h.

## SetIncidentFaceSize()

void SetIncidentFaceSize | ( | int | faceIndex,
|  | int | faceSize )

inline

Assign the size of an incident face.

Definition at line 355 of file vertexDescriptor.h.

## SetManifold()

void SetManifold | ( | bool | isManifold | ) |

inline

Declare the vertex neighborhood as manifold (ordered).

Definition at line 325 of file vertexDescriptor.h.

## SetManifoldEdgeSharpness()

void SetManifoldEdgeSharpness | ( | int | edgeIndex,
|  | float | edgeSharpness )

inline

Assign sharpness to the edge of a manifold neighborhood.

For use with a vertex declared manifold only, assigns a given sharpness to the indicated edge in the ordered sequence of edges around the vertex. In the case of a boundary vertex, the number of incident edges in this ordered sequence will exceed the number of incident faces by one.

Parameters

  edgeIndex | Index of the edge in the ordered sequence
  edgeSharpness | Sharpness to be assigned to the edge

Definition at line 403 of file vertexDescriptor.h.

## SetVertexSharpness()

void SetVertexSharpness | ( | float | sharpness | ) |

inline

Assign sharpness to the vertex.

Definition at line 382 of file vertexDescriptor.h.

The documentation for this class was generated from the following file:

- opensubdiv/bfr/vertexDescriptor.h