Rhino C++ API
8.14
|
#include <RhinoSdkSpaceMorph.h>
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 |
Stretch morph Deforms an object by scaling selected portions in one direction.
CRhinoStretchSpaceMorph::CRhinoStretchSpaceMorph | ( | ) |
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.
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
|
virtual |
virtual ON_SpaceMorph override
Reimplemented from ON_SpaceMorph.
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
|
static |
|
virtual |
virtual ON_SpaceMorph override
Implements ON_SpaceMorph.
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
ON_Line CRhinoStretchSpaceMorph::m_stretch_axis |
Line along which to perform the stretch operation.
double CRhinoStretchSpaceMorph::m_stretch_factor |
ON_BezierCurve CRhinoStretchSpaceMorph::m_stretch_function |
NOTE: The m_stretch_function and m_stretch_factor are for expert users only. It is preferred 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