Rhino C++ API
8.10
|
#include <opennurbs_nurbssurface.h>
Public Member Functions | |
ON_MorphControl () | |
virtual | ~ON_MorphControl () |
bool | AddBoxLocalizer (ON_BoundingBox bbox, double support_distance, double falloff_distance) |
bool | AddControlLocalizer (double support_distance, double falloff_distance) |
bool | AddConvexPolygonLocalizer (const ON_SimpleArray< ON_Plane > &planes, double support_distance, double falloff_distance) |
bool | AddCylinderLocalizer (ON_Line axis, double support_distance, double falloff_distance) |
bool | AddPlaneLocalizer (const ON_Plane &plane, double support_distance, double falloff_distance) |
bool | AddSphereLocalizer (ON_3dPoint center, double support_distance, double falloff_distance) |
ON_Brep * | BrepForm (ON_Brep *brep=nullptr) const override |
void | ClearBoundingBox () override |
const double * | CV (ON_3dex) const |
int | CVCount () const |
int | CVCount (int dir) const |
void | Destroy () |
C++ default copy construction and operator= work fine. More... | |
void | DestroyRuntimeCache (bool bDelete=true) override |
int | Dimension () const override |
void | Dump (ON_TextLog &) const override |
bool | GetBBox (double *boxmin, double *boxmax, bool bGrowBox=false) const override |
virtual ON_Geometry GetBBox override More... | |
bool | GetCageMorph (class ON_CageMorph &cage_morph) const |
Get a cage_morph that can be passed to Morph functions. More... | |
bool | GetTightBoundingBox (class ON_BoundingBox &tight_bbox, bool bGrowBox=false, const class ON_Xform *xform=nullptr) const override |
virtual ON_Geometry GetTightBoundingBox override More... | |
bool | HasBrepForm () const override |
bool | IsIdentity (const ON_BoundingBox &bbox) const |
bool | IsMorphable () const override |
bool | IsRational () const |
bool | IsValid (class ON_TextLog *text_log=nullptr) const override |
const double * | Knot (int dir) const |
bool | MakeNonRational () |
bool | MakeRational () |
ON_3dex | MaxCVIndex () const |
void | MemoryRelocate () override |
bool | Morph (const ON_SpaceMorph &morph) override |
ON_3dPoint | MorphPoint (ON_3dPoint point) const |
void | MorphPointLocalizerHelper (const ON_3dPoint &point, double &w, double &clspt_max_dist, const ON_Localizer *&distloc) const |
void | MorphPointVarient1Helper (double t, double w, const ON_Localizer *distloc, ON_3dPoint &Q, ON_3dVector *N) const |
void | MorphPointVarient2Helper (double s, double t, double w, const ON_Localizer *distloc, ON_3dPoint &Q, ON_3dVector *N) const |
ON::object_type | ObjectType () const override |
int | Order (int dir) const |
bool | Read (ON_BinaryArchive &archive) override |
unsigned int | SizeOf () const override |
bool | Transform (const ON_Xform &xform) override |
double | Weight (ON_3dex) const |
bool | Write (ON_BinaryArchive &archive) const override |
![]() | |
ON_Geometry ()=default | |
ON_Geometry (const ON_Geometry &)=default | |
~ON_Geometry ()=default | |
ON_BoundingBox | BoundingBox () const |
virtual ON_COMPONENT_INDEX | ComponentIndex () const |
virtual bool | EvaluatePoint (const class ON_ObjRef &objref, ON_3dPoint &P) const |
bool | GetBoundingBox (ON_3dPoint &bbox_min, ON_3dPoint &bbox_max, bool bGrowBox=false) const |
bool | GetBoundingBox (ON_BoundingBox &bbox, bool bGrowBox=false) const |
virtual bool | IsDeformable () const |
virtual bool | MakeDeformable () |
virtual bool | Morph (const class ON_SpaceMorph &morph) |
ON_Geometry & | operator= (const ON_Geometry &)=default |
bool | Rotate (double rotation_angle, const ON_3dVector &rotation_axis, const ON_3dPoint &rotation_center) |
bool | Rotate (double sin_angle, double cos_angle, const ON_3dVector &rotation_axis, const ON_3dPoint &rotation_center) |
bool | Scale (double scale_factor) |
virtual bool | SwapCoordinates (int i, int j) |
const ON_BoundingBox | TightBoundingBox () const |
bool | Translate (const ON_3dVector &translation_vector) |
![]() | |
ON_Object () ON_NOEXCEPT | |
ON_Object (const ON_Object &) | |
virtual | ~ON_Object () |
virtual ON_AggregateComponentStatus | AggregateComponentStatus () const |
bool | AttachUserData (class ON_UserData *pUserData) |
unsigned int | ClearAllComponentStates () const |
virtual unsigned int | ClearComponentStates (ON_COMPONENT_INDEX component_index, ON_ComponentStatus states_to_clear) const |
virtual unsigned int | ClearComponentStates (ON_ComponentStatus states_to_clear) const |
void | CopyUserData (const ON_Object &source_object) |
unsigned int | CopyUserData (const ON_Object &source_object, ON_UUID source_userdata_item_id, ON_Object::UserDataConflictResolution userdata_conflict_resolution) |
virtual ON__UINT32 | DataCRC (ON__UINT32 current_remainder) const |
virtual bool | DeleteComponents (const ON_COMPONENT_INDEX *ci_list, size_t ci_count) |
bool | DetachUserData (class ON_UserData *pUserData) |
void | EmergencyDestroy () |
class ON_UserData * | FirstUserData () const |
virtual unsigned int | GetComponentsWithSetStates (ON_ComponentStatus states_filter, bool bAllEqualStates, ON_SimpleArray< ON_COMPONENT_INDEX > &components) const |
class ON_UserData * | GetUserData (const ON_UUID &userdata_uuid) const |
bool | GetUserString (const wchar_t *key, ON_wString &string_value) const |
int | GetUserStringKeys (ON_ClassArray< ON_wString > &user_string_keys) const |
int | GetUserStrings (ON_ClassArray< ON_UserString > &user_strings) const |
bool | IsCorrupt (bool bRepair, bool bSilentError, class ON_TextLog *text_log) const |
bool | IsKindOf (const ON_ClassId *pClassId) const |
virtual void | MarkAggregateComponentStatusAsNotCurrent () const |
virtual ON_UUID | ModelObjectId () const |
void | MoveUserData (ON_Object &source_object) |
unsigned int | MoveUserData (ON_Object &source_object, ON_UUID source_userdata_item_id, ON_Object::UserDataConflictResolution userdata_conflict_resolution, bool bDeleteAllSourceItems) |
ON_Object & | operator= (const ON_Object &) |
void | PurgeUserData () |
virtual unsigned int | SetComponentStates (ON_COMPONENT_INDEX component_index, ON_ComponentStatus states_to_set) const |
virtual unsigned int | SetComponentStatus (ON_COMPONENT_INDEX component_index, ON_ComponentStatus status_to_copy) const |
bool | SetUserString (const wchar_t *key, const wchar_t *string_value) |
int | SetUserStrings (int count, const ON_UserString *user_strings, bool bReplace) |
bool | ThisIsNullptr (bool bSilentError) const |
void | TransformUserData (const class ON_Xform &xform) |
virtual bool | UpdateReferencedComponents (const class ON_ComponentManifest &source_manifest, const class ON_ComponentManifest &destination_manifest, const class ON_ManifestMap &manifest_map) |
int | UserStringCount () const |
Public Attributes | |
ON_UuidList | m_captive_id |
Rhino captive object ids. More... | |
ON_ClassArray< ON_Localizer > | m_localizers |
Use ON_GetCageXform to set m_cage_xform. More... | |
ON_NurbsCage | m_nurbs_cage |
ON_Xform | m_nurbs_cage0 = ON_Xform::IdentityTransformation |
ON_NurbsCurve | m_nurbs_curve |
ON_NurbsCurve | m_nurbs_curve0 |
ON_Interval | m_nurbs_curve_domain |
ON_NurbsSurface | m_nurbs_surface |
ON_NurbsSurface | m_nurbs_surface0 |
ON_Interval | m_nurbs_surface_domain [2] |
bool | m_sporh_bPreserveStructure |
bool | m_sporh_bQuickPreview |
double | m_sporh_tolerance |
ON_SpaceMorphOptions. More... | |
int | m_varient |
1= curve, 2 = surface, 3 = cage More... | |
Additional Inherited Members | |
![]() | |
enum | UserDataConflictResolution : unsigned char { UserDataConflictResolution::destination_object = 0, UserDataConflictResolution::source_object = 1, UserDataConflictResolution::source_copycount_gt = 2, UserDataConflictResolution::source_copycount_ge = 3, UserDataConflictResolution::destination_copycount_gt = 4, UserDataConflictResolution::destination_copycount_ge = 5, UserDataConflictResolution::delete_item = 6 } |
![]() | |
const static ON_Geometry | Unset |
ON_MorphControl::ON_MorphControl | ( | ) |
|
virtual |
bool ON_MorphControl::AddBoxLocalizer | ( | ON_BoundingBox | bbox, |
double | support_distance, | ||
double | falloff_distance | ||
) |
bool ON_MorphControl::AddControlLocalizer | ( | double | support_distance, |
double | falloff_distance | ||
) |
Localizers Description: Adds localizer with support near the controlling NURBS object. Parameters: support_distance - [in] >= 0 If the distance a point to the controls NURBS curve/surface/cage is less than or equal to support_distance, then MorphPoint() deformation has 100% effect.
falloff_distance - [in] > 0 If the distance a point to the controls NURBS curve/surface/cage is more than support_distance+falloff_distance, then MorphPoint() deformation does not move the point. As the distance varies from support_distance to support_distance+falloff_distance the deformation attenuates from 100% to 0%.
bool ON_MorphControl::AddConvexPolygonLocalizer | ( | const ON_SimpleArray< ON_Plane > & | planes, |
double | support_distance, | ||
double | falloff_distance | ||
) |
bool ON_MorphControl::AddCylinderLocalizer | ( | ON_Line | axis, |
double | support_distance, | ||
double | falloff_distance | ||
) |
bool ON_MorphControl::AddPlaneLocalizer | ( | const ON_Plane & | plane, |
double | support_distance, | ||
double | falloff_distance | ||
) |
bool ON_MorphControl::AddSphereLocalizer | ( | ON_3dPoint | center, |
double | support_distance, | ||
double | falloff_distance | ||
) |
Description: If possible, BrepForm() creates a brep form of the ON_Geometry. Parameters: brep - [in] if not nullptr, brep is used to store the brep form of the geometry. Result: Returns a pointer to on ON_Brep or nullptr. If the brep parameter is not nullptr, then brep is returned if the geometry has a brep form and nullptr is returned if the geometry does not have a brep form. Remarks: The caller is responsible for managing the brep memory. See Also ON_Geometry::HasBrepForm
Reimplemented from ON_Geometry.
|
overridevirtual |
Description: Some objects cache bounding box information. If you modify an object, then call ClearBoundingBox() to inform the object that any cached bounding boxes are invalid.
Remarks: Generally, ClearBoundingBox() overrides simply invalidate a cached bounding box and then wait for a call to GetBBox() before recomputing the bounding box.
The default implementation does nothing.
Reimplemented from ON_Geometry.
const double* ON_MorphControl::CV | ( | ON_3dex | ) | const |
int ON_MorphControl::CVCount | ( | ) | const |
Returns: Number of control points in the target NURBS object.
int ON_MorphControl::CVCount | ( | int | dir | ) | const |
void ON_MorphControl::Destroy | ( | ) |
C++ default copy construction and operator= work fine.
|
overridevirtual |
Expert interface Description: Expert user function. If you are using openNURBS in its default configuration to read and write 3dm archives, you never need to call this function. Many objects employ lazy creation of (runtime) caches that save information to help speed geometric calculations. This function will destroy all runtime information. Parameters: bDelete - [in] if true, any cached information is properly deleted. If false, any cached information is simply discarded. This is useful when the cached information may be in alternate memory pools that are managed in nonstandard ways.
Reimplemented from ON_Object.
|
overridevirtual |
ON_Geometry virtual functions
Reimplemented from ON_Geometry.
|
overridevirtual |
|
overridevirtual |
virtual ON_Geometry GetBBox override
Reimplemented from ON_Geometry.
bool ON_MorphControl::GetCageMorph | ( | class ON_CageMorph & | cage_morph | ) | const |
Get a cage_morph that can be passed to Morph functions.
|
overridevirtual |
virtual ON_Geometry GetTightBoundingBox override
Reimplemented from ON_Geometry.
|
overridevirtual |
Description: Query an object to see if it has an ON_Brep form. Result: Returns true if the virtual ON_Geometry::BrepForm can compute an ON_Brep representation of this object. Remarks: The default implementation of ON_Geometry::BrepForm returns false. See Also ON_Geometry::BrepForm
Reimplemented from ON_Geometry.
bool ON_MorphControl::IsIdentity | ( | const ON_BoundingBox & | bbox | ) | const |
|
overridevirtual |
Returns: True if the object can be morphed by calling Morph(). See Also: ON_Geometry::Morph
Reimplemented from ON_Geometry.
bool ON_MorphControl::IsRational | ( | ) | const |
Returns: True if the target NURBS object is rational
|
overridevirtual |
Description: Tests an object to see if its data members are correctly initialized. Parameters: text_log - [in] if the object is not valid and text_log is not nullptr, then a brief english description of the reason the object is not valid is appended to the log. The information appended to text_log is suitable for low-level debugging purposes by programmers and is not intended to be useful as a high level user interface tool. Returns: @untitled table true object is valid false object is invalid, uninitialized, etc.
Reimplemented from ON_Geometry.
const double* ON_MorphControl::Knot | ( | int | dir | ) | const |
bool ON_MorphControl::MakeNonRational | ( | ) |
Description: Makes the target NURBS object non-rational.
bool ON_MorphControl::MakeRational | ( | ) |
Description: Makes the target NURBS object rational.
ON_3dex ON_MorphControl::MaxCVIndex | ( | ) | const |
|
overridevirtual |
|
override |
ON_3dPoint ON_MorphControl::MorphPoint | ( | ON_3dPoint | point | ) | const |
Description: Evaluates the deformation. Used by ON_CageMorph::MorphPoint().
void ON_MorphControl::MorphPointLocalizerHelper | ( | const ON_3dPoint & | point, |
double & | w, | ||
double & | clspt_max_dist, | ||
const ON_Localizer *& | distloc | ||
) | const |
Description: Get localizer settings needed in MorphPoint().
void ON_MorphControl::MorphPointVarient1Helper | ( | double | t, |
double | w, | ||
const ON_Localizer * | distloc, | ||
ON_3dPoint & | Q, | ||
ON_3dVector * | N | ||
) | const |
void ON_MorphControl::MorphPointVarient2Helper | ( | double | s, |
double | t, | ||
double | w, | ||
const ON_Localizer * | distloc, | ||
ON_3dPoint & | Q, | ||
ON_3dVector * | N | ||
) | const |
|
overridevirtual |
Description: Useful for switch statements that need to differentiate between basic object types like points, curves, surfaces, and so on.
Returns: ON::object_type enum value.
Remarks: The default implementation of this virtual function returns ON::unknown_object_type
Reimplemented from ON_Object.
int ON_MorphControl::Order | ( | int | dir | ) | const |
|
overridevirtual |
Description: Low level archive writing tool used by ON_BinaryArchive::ReadObject(). Parameters: binary_archive - archive to read from Returns: Returns true if the read is successful. Remarks: Use ON_BinaryArchive::ReadObject() to read objects. This Read() function should read the objects definition back into its data members.
The default implementation of this virtual function returns false and does nothing.
Reimplemented from ON_Object.
|
overridevirtual |
Returns: An estimate of the amount of memory the class uses in bytes.
Reimplemented from ON_Object.
|
overridevirtual |
Description: Transforms the object.
Parameters: xform - [in] transformation to apply to object. If xform.IsSimilarity() is zero, then you may want to call MakeSquishy() before calling Transform.
Remarks: When overriding this function, be sure to include a call to ON_Object::TransformUserData() which takes care of transforming any ON_UserData that may be attached to the object.
See Also: ON_Geometry::IsDeformable();
Remarks: Classes derived from ON_Geometry should call ON_Geometry::Transform() to handle user data transformations and then transform their definition.
Reimplemented from ON_Geometry.
double ON_MorphControl::Weight | ( | ON_3dex | ) | const |
|
overridevirtual |
Description: Low level archive writing tool used by ON_BinaryArchive::WriteObject(). Parameters: binary_archive - archive to write to Returns: Returns true if the write is successful. Remarks: Use ON_BinaryArchive::WriteObject() to write objects. This Write() function should just write the specific definition of this object. It should not write and any chunk typecode or length information.
The default implementation of this virtual function returns false and does nothing.
Reimplemented from ON_Object.
ON_UuidList ON_MorphControl::m_captive_id |
Rhino captive object ids.
ON_ClassArray<ON_Localizer> ON_MorphControl::m_localizers |
Use ON_GetCageXform to set m_cage_xform.
Used to localize the deformation
ON_NurbsCage ON_MorphControl::m_nurbs_cage |
ON_Xform ON_MorphControl::m_nurbs_cage0 = ON_Xform::IdentityTransformation |
ON_NurbsCurve ON_MorphControl::m_nurbs_curve |
ON_NurbsCurve ON_MorphControl::m_nurbs_curve0 |
The value of m_varient determines which nurbs object controls the cage
ON_Interval ON_MorphControl::m_nurbs_curve_domain |
ON_NurbsSurface ON_MorphControl::m_nurbs_surface |
ON_NurbsSurface ON_MorphControl::m_nurbs_surface0 |
ON_Interval ON_MorphControl::m_nurbs_surface_domain[2] |
bool ON_MorphControl::m_sporh_bPreserveStructure |
bool ON_MorphControl::m_sporh_bQuickPreview |
double ON_MorphControl::m_sporh_tolerance |
ON_SpaceMorphOptions.
int ON_MorphControl::m_varient |
1= curve, 2 = surface, 3 = cage