Rhino C++ API  7.19
Public Types | Public Member Functions | Static Public Attributes | List of all members
ON_SilhouetteParameters Class Reference

#include <opennurbs_plus_sil.h>

Public Types

enum  SilhouetteTypes : unsigned int { kUnsetSilhouetteType = 0, kParallelProjection = 1, kPerspectiveProjection = 2, kDraftAngle = 3 }
 

Public Member Functions

 ON_SilhouetteParameters ()
 
double AngleToleranceRadians () const
 
double DraftAngleRadians () const
 
ON_3dVector DraftPullDirection () const
 
unsigned int GetTypeMask () const
 
ON_3dVector ParallelCameraDirection () const
 
ON_3dPoint PerspectiveCameraLocation () const
 
bool SetDraftCurve (ON_3dVector pullDirection, double draftAngleRadians, double tolerance, double angleToleranceRadians)
 
bool SetParallel (ON_3dVector cameraDirection, double tolerance, double angleToleranceRadians)
 
bool SetPerspective (ON_3dPoint cameraLocation, double tolerance, double angleToleranceRadians)
 
void SetTypeMask (unsigned int m_mask)
 
SilhouetteTypes SilhouetteType () const
 
double Tolerance () const
 
ON_3dVector ViewDirection (const ON_3dPoint &P0) const
 

Static Public Attributes

const static unsigned int kAllOptionalTypes
 
static const ON_SilhouetteParameters UnsetParameters
 

Member Enumeration Documentation

◆ SilhouetteTypes

Enumerator
kUnsetSilhouetteType 
kParallelProjection 
kPerspectiveProjection 
kDraftAngle 

Constructor & Destructor Documentation

◆ ON_SilhouetteParameters()

ON_SilhouetteParameters::ON_SilhouetteParameters ( )

Member Function Documentation

◆ AngleToleranceRadians()

double ON_SilhouetteParameters::AngleToleranceRadians ( ) const

◆ DraftAngleRadians()

double ON_SilhouetteParameters::DraftAngleRadians ( ) const

Returns: If SilhouetteType() is kDraftAngle then the function returns the draft angle setting, otherwise the function returns ON_UNSET_VALUE.

◆ DraftPullDirection()

ON_3dVector ON_SilhouetteParameters::DraftPullDirection ( ) const

Returns: If SilhouetteType() is kDraftAngle then the function returns the pull direction (directed away from the object), otherwise the function returns ON_3dVector::UnsetVector.

◆ GetTypeMask()

unsigned int ON_SilhouetteParameters::GetTypeMask ( ) const

Description: For parallel or perspective view silhouette calculations this type mask selects which of the optional ON_SIL_EVENT types are produced by calls to the silhouette finder. Only the following types are optional

kSilBoundary - include kSilBoundary events in the results kNonSilCrease - include kNonSilCrease events in the results kNonSilTangent - includekNonSilTangent events in the results kNonSilSeam - include kNonSilSeam events in the results

The default value is ON_SIL_EVENT::kSilBoundary Details: For example the Silhouette command in Rhino uses kSilBoundary | kNonSilCrease So that all boundaries and creased edges are shown.

◆ ParallelCameraDirection()

ON_3dVector ON_SilhouetteParameters::ParallelCameraDirection ( ) const

Returns: If SilhouetteType() is kParallelProjection then the function returns the unit camera direction (directed toward the scene), otherwise the function returns ON_3dVector::UnsetVector.

◆ PerspectiveCameraLocation()

ON_3dPoint ON_SilhouetteParameters::PerspectiveCameraLocation ( ) const

Returns: If SilhouetteType() is kPerspectiveProjection then the function returns the camera location otherwise the function returns ON_3dPoint::UnsetVector.

◆ SetDraftCurve()

bool ON_SilhouetteParameters::SetDraftCurve ( ON_3dVector  pullDirection,
double  draftAngleRadians,
double  tolerance,
double  angleToleranceRadians 
)

Description: Specify the parameters for calculating draft curves. The draft curve seperates the regions with draft at least equal to the draft angle from regions with draft less than the draft angle. Parameters: pullDirection -[in] 3d direction for the mold to be pulled in, directed away from the object draftAngleRadians -[in] draft angle can be positve or negative tolerance - [in] angleToleranceRadians -[in]

◆ SetParallel()

bool ON_SilhouetteParameters::SetParallel ( ON_3dVector  cameraDirection,
double  tolerance,
double  angleToleranceRadians 
)

Description: Specify the parameters for calculating parallel view silhouettes. Parameters: cameraDirection -[in] 3d camera direction, directed toward the scene. tolerance - [in] A surface which projects in the image plane to within tolerance of a curve may be reported as a projecting surface. When in doubt use CRhinoDoc::AbsoluteTolerance(). angleToleranceRadians -[in] A surface with unit normal N that saisfies N o cameraDirection < sin( angleToleranceRadians) may be reported as projecting surface. When in doubt use CRhinoDoc::AngleToleranceRadians().

◆ SetPerspective()

bool ON_SilhouetteParameters::SetPerspective ( ON_3dPoint  cameraLocation,
double  tolerance,
double  angleToleranceRadians 
)

Description: Specify the parameters for calculating perspective view silhouettes. Parameters: cameraLocation -[in] 3d camera location tolerance - [in] A surface which projects in the image plane to within tolerance of a curve may be treated as projecting surface. When in doubt use CRhinoDoc::AbsoluteTolerance(). angleToleranceRadians -[in] A surface with unit normal N that saisfies N o cameraDirection < sin( angleToleranceRadians) may be considered projecting. When in doubt use CRhinoDoc::AngleToleranceRadians().

◆ SetTypeMask()

void ON_SilhouetteParameters::SetTypeMask ( unsigned int  m_mask)

◆ SilhouetteType()

SilhouetteTypes ON_SilhouetteParameters::SilhouetteType ( ) const

Description: Returns the silhouette type setting.

◆ Tolerance()

double ON_SilhouetteParameters::Tolerance ( ) const

◆ ViewDirection()

ON_3dVector ON_SilhouetteParameters::ViewDirection ( const ON_3dPoint P0) const

Description: Find the unit view direction from the camera to the given 3dPoint P0. Parameters: P0 - [in] Details: For parallel views ViewDirection does not depend on P0.

Member Data Documentation

◆ kAllOptionalTypes

const static unsigned int ON_SilhouetteParameters::kAllOptionalTypes
static
Initial value:
=
ON_SIL_EVENT::TYPE::kSilBoundary |
ON_SIL_EVENT::TYPE::kNonSilCrease |
ON_SIL_EVENT::TYPE::kNonSilTangent |
ON_SIL_EVENT::TYPE::kNonSilSeam

◆ UnsetParameters

const ON_SilhouetteParameters ON_SilhouetteParameters::UnsetParameters
static