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

#include <opennurbs_xform.h>

Public Types

enum  TYPE {
  no_type = 0, sphere_type = 1, plane_type = 2, cylinder_type = 3,
  curve_type = 4, surface_type = 5, distance_type = 6, force_32bit_localizer_type = 0xFFFFFFFF
}
 

Public Member Functions

 ON_Localizer ()
 
 ON_Localizer (const ON_Localizer &)
 
 ~ON_Localizer ()
 
bool CreateCylinderLocalizer (ON_3dPoint P, ON_3dVector D, double r0, double r1)
 
bool CreatePlaneLocalizer (ON_3dPoint P, ON_3dVector N, double h0, double h1)
 
bool CreateSphereLocalizer (ON_3dPoint P, double r0, double r1)
 
void Destroy ()
 
bool IsZero (const ON_BoundingBox &bbox) const
 
ON_Localizeroperator= (const ON_Localizer &)
 
bool Read (ON_BinaryArchive &)
 
double Value (double distance) const
 
double Value (ON_3dPoint P) const
 
bool Write (ON_BinaryArchive &) const
 

Public Attributes

ON_Interval m_d
 
class ON_NurbsCurvem_nurbs_curve
 
class ON_NurbsSurfacem_nurbs_surface
 
ON_3dPoint m_P
 
TYPE m_type
 
ON_3dVector m_V
 

Member Enumeration Documentation

◆ TYPE

Enumerator
no_type 
sphere_type 
plane_type 
cylinder_type 
curve_type 
surface_type 
distance_type 
force_32bit_localizer_type 

Constructor & Destructor Documentation

◆ ON_Localizer() [1/2]

ON_Localizer::ON_Localizer ( )

◆ ~ON_Localizer()

ON_Localizer::~ON_Localizer ( )

◆ ON_Localizer() [2/2]

ON_Localizer::ON_Localizer ( const ON_Localizer )

Member Function Documentation

◆ CreateCylinderLocalizer()

bool ON_Localizer::CreateCylinderLocalizer ( ON_3dPoint  P,
ON_3dVector  D,
double  r0,
double  r1 
)

Description: Creates a cylindrical localizer. If d = distance from the point to the line, then the localizer has the following behavior:

point distance localizer value d <= r0 < r1 or d >= r0 > r1 0 d >= r1 > r0 or d <= r1 < r0 1

For values of d between r0 and r1, the localizer smoothly transitions between 0 to 1.

Parameters: P - [in] cylinder axis point D - [in] cylinder axis direction r0 - [in] r1 - [in] r0 and r1 are radii that control where the localizer is nonzero.
Both r0 and r1 must be positive and the cannot be equal.
If 0 < r0 < r1, then the localizer is zero for points inside the cylinder of radius r0 and one for points outside the cylinder of radius r1. If 0 < r1 < r0, then the localizer is one for points inside the cylinder of radius r1 and zero for points outside the cylinder of radius r0.

Returns: True if the input is value and the localizer is initialized.

◆ CreatePlaneLocalizer()

bool ON_Localizer::CreatePlaneLocalizer ( ON_3dPoint  P,
ON_3dVector  N,
double  h0,
double  h1 
)

Description: Creates a planar localizer. If d = signed distance from the point to the plane, then the localizer has the following behavior:

point distance localizer value d <= h0 < h1 or d >= h0 > h1 0 d >= h1 > h0 or d <= h1 < h0 1

For values of d between h0 and h1, the localizer smoothly transitions between 0 to 1.

Parameters: P - [in] point on plane N - [in] normal to plane h0 - [in] h1 - [in] h0 and h1 are signed distances that control where the localizer is nonzero.

Returns: True if the input is value and the localizer is initialized.

◆ CreateSphereLocalizer()

bool ON_Localizer::CreateSphereLocalizer ( ON_3dPoint  P,
double  r0,
double  r1 
)

Description: Creates a spherical localizer. If d = distance from the point to the center of the sphere, then the localizer has the following behavior:

point distance localizer value d <= r0 < r1 or d >= r0 > r1 0 d >= r1 > r0 or d <= r1 < r0 1

For values of d between r0 and r1, the localizer smoothly transitions between 0 to 1.

Parameters: P - [in] center of sphere r0 - [in] r1 - [in] r0 and r1 are radii that control where the localizer is nonzero.
Both r0 and r1 must be positive and the cannot be equal.
If 0 < r0 < r1, then the localizer is zero for points inside the cylinder of radius r0 and one for points outside the cylinder of radius r1. If 0 < r1 < r0, then the localizer is one for points inside the cylinder of radius r1 and zero for points outside the cylinder of radius r0.

Returns: True if the input is value and the localizer is initialized.

◆ Destroy()

void ON_Localizer::Destroy ( )

◆ IsZero()

bool ON_Localizer::IsZero ( const ON_BoundingBox bbox) const

Parameters: bbox - [in] Returns: True if localizer is identically zero inside bbox.

◆ operator=()

ON_Localizer& ON_Localizer::operator= ( const ON_Localizer )

◆ Read()

bool ON_Localizer::Read ( ON_BinaryArchive )

◆ Value() [1/2]

double ON_Localizer::Value ( double  distance) const

◆ Value() [2/2]

double ON_Localizer::Value ( ON_3dPoint  P) const

Description: Evaluators. Parameters: P - [in] Evaluation point distance - [in] Evaluation distance Returns: Value of the localizer.

◆ Write()

bool ON_Localizer::Write ( ON_BinaryArchive ) const

Member Data Documentation

◆ m_d

ON_Interval ON_Localizer::m_d

◆ m_nurbs_curve

class ON_NurbsCurve* ON_Localizer::m_nurbs_curve

◆ m_nurbs_surface

class ON_NurbsSurface* ON_Localizer::m_nurbs_surface

◆ m_P

ON_3dPoint ON_Localizer::m_P

◆ m_type

TYPE ON_Localizer::m_type

◆ m_V

ON_3dVector ON_Localizer::m_V