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

#include <RhinoSdkSpaceMorph.h>

Inheritance diagram for CRhinoStretchSpaceMorph:
CRhinoSpaceMorph ON_SpaceMorph

Public Member Functions

 CRhinoStretchSpaceMorph ()
double GetStretchFactor (double new_length)
double GetStretchFactor (ON_3dPoint stretch_point)
bool IsIdentity (const ON_BoundingBox &bbox) const
 virtual ON_SpaceMorph override More...
bool IsValid () const
ON_3dPoint MorphPoint (ON_3dPoint pt) const
 virtual ON_SpaceMorph override More...
bool SetStretchFactor (double stretch_factor)
- Public Member Functions inherited from CRhinoSpaceMorph
 CRhinoSpaceMorph ()
virtual ~CRhinoSpaceMorph ()
- Public Member Functions inherited from ON_SpaceMorph
 ON_SpaceMorph ()
virtual ~ON_SpaceMorph ()
virtual bool Ev1Der (ON_3dPoint rst, ON_3dPoint &xyz, ON_3dVector &Dr, ON_3dVector &Ds, ON_3dVector &Dt) const
bool IsIdentity (const class ON_Curve &Crv, double tol) const
bool IsIdentity (const class ON_Surface &Srf, double tol) const
bool IsIdentity (const ON_SimpleArray< ON_3dPoint > &Points, double tol) const
virtual ON_4dPoint Morph4dPoint (ON_4dPoint point) const
void MorphPointList (int dim, bool is_rat, int count, int stride, double *point) const
void MorphPointList (int dim, bool is_rat, int count, int stride, float *point) const
virtual ON_3dVector MorphVector (ON_3dPoint tail_point, ON_3dVector vector) const
bool PreserveStructure () const
bool QuickPreview () const
void SetPreserveStructure (bool bPreserveStructure)
void SetQuickPreview (bool bQuickPreview)
void SetTolerance (double tolerance)
double Tolerance () const

Static Public Member Functions

static bool IsValidStretchFactor (double stretch_factor)

Public Attributes

ON_Line m_stretch_axis
 Line along which to perform the stretch operation. More...
double m_stretch_factor
ON_BezierCurve m_stretch_function

Detailed Description

Stretch morph Deforms an object by scaling selected portions in one direction.

Constructor & Destructor Documentation

◆ CRhinoStretchSpaceMorph()

CRhinoStretchSpaceMorph::CRhinoStretchSpaceMorph ( )

Member Function Documentation

◆ GetStretchFactor() [1/2]

double CRhinoStretchSpaceMorph::GetStretchFactor ( double  new_length)

Description: Takes a number that represents a new stretch axis length and converts it to a stretch factor value Parameters: double new_length - [in] Returns: A stretch factor, or ON_UNSET_VALUE if m_stretch_axis.Length() is zero.

◆ GetStretchFactor() [2/2]

double CRhinoStretchSpaceMorph::GetStretchFactor ( ON_3dPoint  stretch_point)

Description: Takes a point to stretch to and converts it to a stretch factor value Parameters: ON_3dPoint stretch_point - [in] Returns: A stretch factor if a valid point, otherwise returns ON_UNSET_VALUE

◆ IsIdentity()

bool CRhinoStretchSpaceMorph::IsIdentity ( const ON_BoundingBox bbox) const

virtual ON_SpaceMorph override

Reimplemented from ON_SpaceMorph.

◆ IsValid()

bool CRhinoStretchSpaceMorph::IsValid ( ) const

Description: Identifies whether the m_stretch_axis and m_stretch_factor are set and valid. Returns: true if m_stretch_axis and m_stretch_factor are valid

◆ IsValidStretchFactor()

static bool CRhinoStretchSpaceMorph::IsValidStretchFactor ( double  stretch_factor)

◆ MorphPoint()

ON_3dPoint CRhinoStretchSpaceMorph::MorphPoint ( ON_3dPoint  pt) const

virtual ON_SpaceMorph override

Implements ON_SpaceMorph.

◆ SetStretchFactor()

bool CRhinoStretchSpaceMorph::SetStretchFactor ( double  stretch_factor)

Description: If the stretch_factor is valid, it sets the m_stretch_factor and builds the ON_BezierCurve m_stretch_function Parameters: double stretch_factor - [in] Returns: True if stretch_factor is valid

Member Data Documentation

◆ m_stretch_axis

ON_Line CRhinoStretchSpaceMorph::m_stretch_axis

Line along which to perform the stretch operation.

◆ m_stretch_factor

double CRhinoStretchSpaceMorph::m_stretch_factor

◆ m_stretch_function

ON_BezierCurve CRhinoStretchSpaceMorph::m_stretch_function

NOTE: The m_stretch_function and m_stretch_factor are for expert users only. It is prefered to use the GetStretchFactor and SetStretchFactor functions instead.

The m_stretch_function is a monotone increasing function f() such that: f(0) = 0, f(1) = 1, f'(0) = 0, f'(1) = 1