Rhino C++ API  8.14
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
ON_MeshTriangle Class Reference

#include <opennurbs_mesh.h>

Public Member Functions

void Flip ()
 
bool GetTriangleNormal (const class ON_3dPoint *dV, class ON_3dVector &triangle_normal) const
 
bool GetTriangleNormal (const class ON_3dPointListRef &vertex_list, class ON_3dVector &triangle_normal) const
 
bool GetTriangleNormal (const class ON_3fPoint *fV, class ON_3dVector &triangle_normal) const
 
bool IsValid (const class ON_3dPointListRef &vertex_list) const
 
bool IsValid (size_t mesh_vertex_count) const
 
bool IsValid (size_t mesh_vertex_count, const class ON_3dPoint *vertex_list) const
 
bool IsValid (size_t mesh_vertex_count, const class ON_3fPoint *vertex_list) const
 

Static Public Member Functions

static bool GetTriangleNormal (ON_3dPoint point0, ON_3dPoint point1, ON_3dPoint point2, class ON_3dVector &triangle_normal)
 

Public Attributes

unsigned int m_vi [3]
 vertex index list More...
 

Static Public Attributes

static const ON_MeshTriangle UnsetMeshTriangle
 all vi[] values are ON_UNSET_UINT_INDEX. More...
 

Member Function Documentation

◆ Flip()

void ON_MeshTriangle::Flip ( )

Description: Swaps the values of m_vi[1] and m_vi[2]. m_vi[0] is not changed.

◆ GetTriangleNormal() [1/4]

bool ON_MeshTriangle::GetTriangleNormal ( const class ON_3dPoint dV,
class ON_3dVector triangle_normal 
) const

Description: Compute the triangle normal Parameters: dV - [in] double precision vertex array for the mesh fV - [in] float precision vertex array for the mesh vertex_list - [in] vertex locations triangle_normal - [out] triangle normal Returns: true if triangle_normal is valid.

◆ GetTriangleNormal() [2/4]

bool ON_MeshTriangle::GetTriangleNormal ( const class ON_3dPointListRef vertex_list,
class ON_3dVector triangle_normal 
) const

◆ GetTriangleNormal() [3/4]

bool ON_MeshTriangle::GetTriangleNormal ( const class ON_3fPoint fV,
class ON_3dVector triangle_normal 
) const

◆ GetTriangleNormal() [4/4]

static bool ON_MeshTriangle::GetTriangleNormal ( ON_3dPoint  point0,
ON_3dPoint  point1,
ON_3dPoint  point2,
class ON_3dVector triangle_normal 
)
static

◆ IsValid() [1/4]

bool ON_MeshTriangle::IsValid ( const class ON_3dPointListRef vertex_list) const

◆ IsValid() [2/4]

bool ON_MeshTriangle::IsValid ( size_t  mesh_vertex_count) const

Description: Determine if a triangle is valid by checking that the vertices are distinct. Parameters: mesh_vertex_count - [in] number of vertices in the mesh vertex_list - [in] optional list of mesh vertex locations. Returns: true The triangle is valid. false The triangle is not valid.

◆ IsValid() [3/4]

bool ON_MeshTriangle::IsValid ( size_t  mesh_vertex_count,
const class ON_3dPoint vertex_list 
) const

◆ IsValid() [4/4]

bool ON_MeshTriangle::IsValid ( size_t  mesh_vertex_count,
const class ON_3fPoint vertex_list 
) const

Member Data Documentation

◆ m_vi

unsigned int ON_MeshTriangle::m_vi[3]

vertex index list

◆ UnsetMeshTriangle

const ON_MeshTriangle ON_MeshTriangle::UnsetMeshTriangle
static

all vi[] values are ON_UNSET_UINT_INDEX.