ON_SpaceMorph Class Reference

#include <opennurbs_xform.h>

Inheritance diagram for ON_SpaceMorph:
ON_BezierCageMorph ON_CageMorph

Public Member Functions

 ON_SpaceMorph ()
 
virtual ~ON_SpaceMorph ()
 
virtual bool IsIdentity (const ON_BoundingBox &bbox) const
 Provides a quick way to determine if a morph function is the identity (doesn't move the points) on a region of space. More...
 
bool IsIdentity (const ON_SimpleArray< ON_3dPoint > &Points, double tol) const
 A slower way to determine if a morph function is the identity (doesn't move the points) on a set of points, to within a tolerance More...
 
bool IsIdentity (const class ON_Surface &Srf, double tol) const
 A slower way to determine if a morph function is the identity (doesn't move the points) on a surface, to within a tolerance More...
 
bool IsIdentity (const class ON_Curve &Crv, double tol) const
 A slower way to determine if a morph function is the identity (doesn't move the points) on a curve, to within a tolerance. More...
 
bool PreserveStructure () const
 
bool QuickPreview () const
 
void SetPreserveStructure (bool bPreserveStructure)
 Set the preserve structure value. More...
 
void SetQuickPreview (bool bQuickPreview)
 Set the quick preview value. More...
 
void SetTolerance (double tolerance)
 Set the 3d fitting tolerance used when morphing surfaces and breps. More...
 
double Tolerance () const
 Returns the desired accuracy of the morph. This value is primarily used for deforming surfaces and breps. More...
 

Constructor & Destructor Documentation

◆ ON_SpaceMorph()

ON_SpaceMorph::ON_SpaceMorph ( )

◆ ~ON_SpaceMorph()

virtual ON_SpaceMorph::~ON_SpaceMorph ( )
virtual

Member Function Documentation

◆ IsIdentity() [1/4]

virtual bool ON_SpaceMorph::IsIdentity ( const ON_BoundingBox bbox) const
virtual

Provides a quick way to determine if a morph function is the identity (doesn't move the points) on a region of space.

Parameters
bbox[in] region of space to test.
Returns
The default always returns false. If you override this function, then return true when every point in the bounding box is fixed by the morph.

Reimplemented in ON_CageMorph.

◆ IsIdentity() [2/4]

bool ON_SpaceMorph::IsIdentity ( const ON_SimpleArray< ON_3dPoint > &  Points,
double  tol 
) const

A slower way to determine if a morph function is the identity (doesn't move the points) on a set of points, to within a tolerance

Parameters
Points[in] Set of points to test.
tol[in] Distance tolerance.
Returns
True if none of the points move a distance of tol or more under the morph function. Uses MorphPoint()

◆ IsIdentity() [3/4]

bool ON_SpaceMorph::IsIdentity ( const class ON_Surface Srf,
double  tol 
) const

A slower way to determine if a morph function is the identity (doesn't move the points) on a surface, to within a tolerance

Parameters
Srf[in] Surface to be tested.
tol[in] Distance tolerance.
Returns
Uses MorphPoint() on a dense sample of points. True if none of the points move a distance of tol or more under the morph function. Remark: Call IsIdentity(Srf.BoundingBox()) first. Use this on surfaces whose nurb form is rational or has a different parameterization.

◆ IsIdentity() [4/4]

bool ON_SpaceMorph::IsIdentity ( const class ON_Curve Crv,
double  tol 
) const

A slower way to determine if a morph function is the identity (doesn't move the points) on a curve, to within a tolerance.

Parameters
Crv[in] Curve to be tested.
tol[in] Distance tolerance.
Returns
Uses MorphPoint() on a dense sample of points. True if none of the points move a distance of tol or more under the morph function. Remark: Call IsIdentity(Crv.BoundingBox()) first. Use this on curves whose nurb form is rational or has a different parameterization.

◆ PreserveStructure()

bool ON_SpaceMorph::PreserveStructure ( ) const
Returns
True if the morph should be done in a way that preserves the structure of the geometry. In particular, for NURBS objects, true means that only the control points are moved.

The value returned by PreserveStructure() does not affect the way meshes and points are morphed. The default is false.

◆ QuickPreview()

bool ON_SpaceMorph::QuickPreview ( ) const
Returns
True if the morph should be done as quickly as possible because the result is being used for some type of dynamic preview. If QuickPreview is true, the tolerance may be ignored.

The value returned by QuickPreview() does not affect the way meshes and points are morphed. The default is false.

◆ SetPreserveStructure()

void ON_SpaceMorph::SetPreserveStructure ( bool  bPreserveStructure)

Set the preserve structure value.

Parameters
bPreserveStructure[in]

◆ SetQuickPreview()

void ON_SpaceMorph::SetQuickPreview ( bool  bQuickPreview)

Set the quick preview value.

Parameters
bQuickPreview[in]

◆ SetTolerance()

void ON_SpaceMorph::SetTolerance ( double  tolerance)

Set the 3d fitting tolerance used when morphing surfaces and breps.

Parameters
tolerance[in] values < 0.0 are treated as 0.0.

◆ Tolerance()

double ON_SpaceMorph::Tolerance ( ) const

Returns the desired accuracy of the morph. This value is primarily used for deforming surfaces and breps.

Returns
3d fitting tolerance.

The default is 0.0 and any value <= 0.0 is ignored by morphing functions. The value returned by Tolerance() does not affect the way meshes and points are morphed.