Drake
Drake C++ Documentation
SurfaceTriangle Class Reference

Detailed Description

SurfaceTriangle represents a triangular face in a TriangleSurfaceMesh.

#include <drake/geometry/proximity/triangle_surface_mesh.h>

Public Member Functions

 SurfaceTriangle (int v0, int v1, int v2)
 Constructs SurfaceTriangle. More...
 
 SurfaceTriangle (const int v[3])
 Constructs SurfaceTriangle. More...
 
int num_vertices () const
 Returns the number of vertices in this face. More...
 
int vertex (int i) const
 Returns the vertex index in TriangleSurfaceMesh of the i-th vertex of this triangle. More...
 
void ReverseWinding ()
 Reverses the order of the vertex indices – this essentially flips the triangle normal based on the right-handed normal rule. More...
 
Implements CopyConstructible, CopyAssignable, MoveConstructible, MoveAssignable
 SurfaceTriangle (const SurfaceTriangle &)=default
 
SurfaceTriangleoperator= (const SurfaceTriangle &)=default
 
 SurfaceTriangle (SurfaceTriangle &&)=default
 
SurfaceTriangleoperator= (SurfaceTriangle &&)=default
 

Constructor & Destructor Documentation

◆ SurfaceTriangle() [1/4]

SurfaceTriangle ( const SurfaceTriangle )
default

◆ SurfaceTriangle() [2/4]

SurfaceTriangle ( SurfaceTriangle &&  )
default

◆ SurfaceTriangle() [3/4]

SurfaceTriangle ( int  v0,
int  v1,
int  v2 
)

Constructs SurfaceTriangle.

Parameters
v0Index of the first vertex in TriangleSurfaceMesh.
v1Index of the second vertex in TriangleSurfaceMesh.
v2Index of the last vertex in TriangleSurfaceMesh.
Precondition
index values are non-negative.

◆ SurfaceTriangle() [4/4]

SurfaceTriangle ( const int  v[3])
explicit

Constructs SurfaceTriangle.

Parameters
varray of three integer indices of the vertices of the triangle in TriangleSurfaceMesh.
Precondition
index values are non-negative.

Member Function Documentation

◆ num_vertices()

int num_vertices ( ) const

Returns the number of vertices in this face.

◆ operator=() [1/2]

SurfaceTriangle& operator= ( SurfaceTriangle &&  )
default

◆ operator=() [2/2]

SurfaceTriangle& operator= ( const SurfaceTriangle )
default

◆ ReverseWinding()

void ReverseWinding ( )

Reverses the order of the vertex indices – this essentially flips the triangle normal based on the right-handed normal rule.

◆ vertex()

int vertex ( int  i) const

Returns the vertex index in TriangleSurfaceMesh of the i-th vertex of this triangle.

Parameters
iThe local index of the vertex in this triangle.
Precondition
0 <= i < 3

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