Rhino C++ API  7.21
Public Member Functions | Public Attributes | List of all members
ON_TrianglePlane Class Reference

#include <opennurbs_plus_trimesh.h>

Public Member Functions

bool Create (const double A[3], const double B[3], const double C[3], bool bSinglePrecisionPoints)
 
bool Create (const float A[3], const float B[3], const float C[3])
 
bool Create (const ON_3dPoint *A, const ON_3dPoint *B, const ON_3dPoint *C, bool bSinglePrecisionPoints)
 
bool Create (const ON_3fPoint *A, const ON_3fPoint *B, const ON_3fPoint *C)
 
double Elevation (const class ON_3dPoint *point) const
 
double Elevation (const class ON_3fPoint *point) const
 
double Elevation (const double point[3]) const
 
double Elevation (const float point[3]) const
 
bool Normalize ()
 

Public Attributes

double a
 Equation of plane: a*x + b*y + c*z + d = 0. More...
 
double b
 
double c
 
double d
 
double tol
 evaluation tolerance More...
 

Detailed Description

NoKeywords

/ / Copyright (c) 1993-2012 Robert McNeel & Associates. All rights reserved. / OpenNURBS, Rhinoceros, and Rhino3D are registered trademarks of Robert / McNeel & Associates. / / THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY. / ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND OF / MERCHANTABILITY ARE HEREBY DISCLAIMED. /
/ For complete openNURBS copyright information see http://www.opennurbs.org. / //////////////////////////////////////////////////////////////

Member Function Documentation

◆ Create() [1/4]

bool ON_TrianglePlane::Create ( const double  A[3],
const double  B[3],
const double  C[3],
bool  bSinglePrecisionPoints 
)

Description: Create a triangle plane equation from three points. Parameters: A - [in] B - [in] C - [in] corners of the triangle. bSinglePrecisionPoints - [in] True if the point locations were created from single precision information (floats). False if the point locations were created from double precision information. Returns: True if the three points are not coplanar and a plane equation was created. False if a plane equation could not be created. When false is returned, a, b, and c are set to ON_UNSET_VALUE and d and tol are set to 0.

◆ Create() [2/4]

bool ON_TrianglePlane::Create ( const float  A[3],
const float  B[3],
const float  C[3] 
)

Description: Create a triangle plane equation from three points. Parameters: A - [in] B - [in] C - [in] corners of the triangle. Returns: True if the three points are not coplanar and a plane equation was created. False if a plane equation could not be created. When false is returned, a, b, and c are set to ON_UNSET_VALUE and d and tol are set to 0.

◆ Create() [3/4]

bool ON_TrianglePlane::Create ( const ON_3dPoint A,
const ON_3dPoint B,
const ON_3dPoint C,
bool  bSinglePrecisionPoints 
)

Description: Create a triangle plane equation from three points. Parameters: A - [in] B - [in] C - [in] corners of the triangle. bSinglePrecisionPoints - [in] True if the point locations were created from single precision information (floats). False if the point locations were created from double precision information. Returns: True if the three points are not coplanar and a plane equation was created. False if a plane equation could not be created. When false is returned, a, b, and c are set to ON_UNSET_VALUE and d and tol are set to 0.

◆ Create() [4/4]

bool ON_TrianglePlane::Create ( const ON_3fPoint A,
const ON_3fPoint B,
const ON_3fPoint C 
)

Description: Create a triangle plane equation from three points. Parameters: A - [in] B - [in] C - [in] corners of the triangle. Returns: True if the three points are not coplanar and a plane equation was created. False if a plane equation could not be created. When false is returned, a, b, and c are set to ON_UNSET_VALUE and d and tol are set to 0.

◆ Elevation() [1/4]

double ON_TrianglePlane::Elevation ( const class ON_3dPoint point) const

Parameters: point - [in] Returns: Signed elevation of point above/below triangle's plane.

◆ Elevation() [2/4]

double ON_TrianglePlane::Elevation ( const class ON_3fPoint point) const

Parameters: point - [in] Returns: Signed elevation of point above/below triangle's plane.

◆ Elevation() [3/4]

double ON_TrianglePlane::Elevation ( const double  point[3]) const

◆ Elevation() [4/4]

double ON_TrianglePlane::Elevation ( const float  point[3]) const

◆ Normalize()

bool ON_TrianglePlane::Normalize ( )

Description: Scale a,b,c,d and tol by the same factor so that 1 = a^2 + b^2 + c^2. Returns: True if the scaling was successful. False if (a,b,c) is the zero vector or cannot be unitized. When false is returned, the values of a, b, c, d and tol are set to 0.0.

Member Data Documentation

◆ a

double ON_TrianglePlane::a

Equation of plane: a*x + b*y + c*z + d = 0.

◆ b

double ON_TrianglePlane::b

◆ c

double ON_TrianglePlane::c

◆ d

double ON_TrianglePlane::d

◆ tol

double ON_TrianglePlane::tol

evaluation tolerance