Rhino C++ API  8.7
Classes | Public Types | Public Member Functions | Protected Member Functions | List of all members
CRhinoWidgetGeometry Class Referenceabstract

#include <rhinoSdkWidget.h>

Inheritance diagram for CRhinoWidgetGeometry:
ON_Geometry ON_Object


class  CSweep
 < Sweep info for ellipsoid and cylindrical drawing. More...

Public Types

enum  eDrawNormal { dn_none, dn_forward, dn_backward, dn_both }
 Direction for AddPlaneToDrawCache. Draws 'normal' arrow(s). More...
- Public Types inherited from ON_Object
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

Public Member Functions

 CRhinoWidgetGeometry ()
 CRhinoWidgetGeometry (const CRhinoWidgetGeometry &g)
virtual ~CRhinoWidgetGeometry ()
virtual void AddAxesToDrawCache (IRhWidgetDrawCache &wdc, const ON_Xform &xform, const UUID &uuidObject) const
 This used to be a test function but I'm reusing it for OCS mapping because I can't add a new virtual function and this one is not being used. More...
virtual void AddBoxToDrawCache (IRhWidgetDrawCache &wdc, const ON_Xform &xform, const UUID &uuidObject) const
virtual void AddCylinderToDrawCache (IRhWidgetDrawCache &wdc, const ON_Xform &xform, const UUID &uuidObject, bool bCapped, const CSweep *pSweep=NULL) const
virtual void AddEllipsoidToDrawCache (IRhWidgetDrawCache &wdc, const ON_Xform &xform, const UUID &uuidObject, const CSweep *pSweep=NULL) const
virtual void AddPlaneToDrawCache (IRhWidgetDrawCache &wdc, const ON_Xform &xform, const UUID &uuidObject, bool bCapped, eDrawNormal dn) const
virtual bool AddToDrawCache (IRhWidgetDrawCache &wdc, const ON_Xform &xformLocal, const UUID &uuidObject)=0
void CleanupGeometryCache (void) const
CRhinoDocDocument (void) const
const CRhinoWidgetGeometryoperator= (const CRhinoWidgetGeometry &)
void SetDocument (const CRhinoDoc &doc)
void SetMapEntry (int iChannelId, const UUID &uuidObject, const ON_TextureMapping &m, const ON_Xform &xformLocal, const CRhinoDoc *pDoc)
void Start (const CRhinoDoc *doc)
void Stop ()
virtual bool Transform (const ON_Xform &xform) override
bool Transforming (ON_Xform &xformToApply) const
- Public Member Functions inherited from ON_Geometry
 ON_Geometry ()=default
 ON_Geometry (const ON_Geometry &)=default
 ~ON_Geometry ()=default
ON_BoundingBox BoundingBox () const
virtual class ON_BrepBrepForm (class ON_Brep *brep=nullptr) const
virtual void ClearBoundingBox ()
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 GetTightBoundingBox (class ON_BoundingBox &tight_bbox, bool bGrowBox=false, const class ON_Xform *xform=nullptr) const
virtual bool HasBrepForm () const
virtual bool IsDeformable () const
virtual bool IsMorphable () const
virtual bool MakeDeformable ()
virtual bool Morph (const class ON_SpaceMorph &morph)
ON_Geometryoperator= (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)
- Public Member Functions inherited from ON_Object
 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)
virtual void DestroyRuntimeCache (bool bDelete=true)
bool DetachUserData (class ON_UserData *pUserData)
virtual void Dump (ON_TextLog &) const
void EmergencyDestroy ()
class ON_UserDataFirstUserData () const
virtual unsigned int GetComponentsWithSetStates (ON_ComponentStatus states_filter, bool bAllEqualStates, ON_SimpleArray< ON_COMPONENT_INDEX > &components) const
class ON_UserDataGetUserData (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 void MemoryRelocate ()
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)
virtual ON::object_type ObjectType () const
ON_Objectoperator= (const ON_Object &)
void PurgeUserData ()
virtual bool Read (ON_BinaryArchive &binary_archive)
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)
virtual unsigned int SizeOf () const
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
virtual bool Write (ON_BinaryArchive &binary_archive) const

Protected Member Functions

virtual int Dimension (void) const override
 < Implement ON_Geometry. More...
virtual bool GetBBox (double *boxmin, double *boxmax, bool bGrowBox=false) const override
 virtual ON_Geometry GetBBox override
CImpl & Impl (void) const
virtual bool IsValid (ON_TextLog *text_log=nullptr) const override

Additional Inherited Members

- Static Public Attributes inherited from ON_Geometry
const static ON_Geometry Unset

Detailed Description


This is an abstract base class for widget geometry.

Member Enumeration Documentation

◆ eDrawNormal

Direction for AddPlaneToDrawCache. Draws 'normal' arrow(s).


Constructor & Destructor Documentation

◆ CRhinoWidgetGeometry() [1/2]

CRhinoWidgetGeometry::CRhinoWidgetGeometry ( )

◆ CRhinoWidgetGeometry() [2/2]

CRhinoWidgetGeometry::CRhinoWidgetGeometry ( const CRhinoWidgetGeometry g)

◆ ~CRhinoWidgetGeometry()

virtual CRhinoWidgetGeometry::~CRhinoWidgetGeometry ( )

Member Function Documentation

◆ AddAxesToDrawCache()

virtual void CRhinoWidgetGeometry::AddAxesToDrawCache ( IRhWidgetDrawCache wdc,
const ON_Xform xform,
const UUID &  uuidObject 
) const

This used to be a test function but I'm reusing it for OCS mapping because I can't add a new virtual function and this one is not being used.

◆ AddBoxToDrawCache()

virtual void CRhinoWidgetGeometry::AddBoxToDrawCache ( IRhWidgetDrawCache wdc,
const ON_Xform xform,
const UUID &  uuidObject 
) const

Note on xform: in V5 it was the inverse of the real xform. In V6 it is the real xform (transforms unit object into the world). This was changed because it was confusing me and would probably have confused future clients.

◆ AddCylinderToDrawCache()

virtual void CRhinoWidgetGeometry::AddCylinderToDrawCache ( IRhWidgetDrawCache wdc,
const ON_Xform xform,
const UUID &  uuidObject,
bool  bCapped,
const CSweep pSweep = NULL 
) const

◆ AddEllipsoidToDrawCache()

virtual void CRhinoWidgetGeometry::AddEllipsoidToDrawCache ( IRhWidgetDrawCache wdc,
const ON_Xform xform,
const UUID &  uuidObject,
const CSweep pSweep = NULL 
) const

◆ AddPlaneToDrawCache()

virtual void CRhinoWidgetGeometry::AddPlaneToDrawCache ( IRhWidgetDrawCache wdc,
const ON_Xform xform,
const UUID &  uuidObject,
bool  bCapped,
eDrawNormal  dn 
) const

◆ AddToDrawCache()

virtual bool CRhinoWidgetGeometry::AddToDrawCache ( IRhWidgetDrawCache wdc,
const ON_Xform xformLocal,
const UUID &  uuidObject 
pure virtual

◆ CleanupGeometryCache()

void CRhinoWidgetGeometry::CleanupGeometryCache ( void  ) const

◆ Dimension()

virtual int CRhinoWidgetGeometry::Dimension ( void  ) const

< Implement ON_Geometry.

Reimplemented from ON_Geometry.

◆ Document()

CRhinoDoc* CRhinoWidgetGeometry::Document ( void  ) const

◆ GetBBox()

virtual bool CRhinoWidgetGeometry::GetBBox ( double *  boxmin,
double *  boxmax,
bool  bGrowBox = false 
) const

virtual ON_Geometry GetBBox override

Reimplemented from ON_Geometry.

◆ Impl()

CImpl& CRhinoWidgetGeometry::Impl ( void  ) const

◆ IsValid()

virtual bool CRhinoWidgetGeometry::IsValid ( ON_TextLog text_log = nullptr) const

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 englis description of the reason the object is not valid is appened 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.

◆ operator=()

const CRhinoWidgetGeometry& CRhinoWidgetGeometry::operator= ( const CRhinoWidgetGeometry )

◆ SetDocument()

void CRhinoWidgetGeometry::SetDocument ( const CRhinoDoc doc)

◆ SetMapEntry()

void CRhinoWidgetGeometry::SetMapEntry ( int  iChannelId,
const UUID &  uuidObject,
const ON_TextureMapping m,
const ON_Xform xformLocal,
const CRhinoDoc pDoc 

◆ Start()

void CRhinoWidgetGeometry::Start ( const CRhinoDoc doc)

◆ Stop()

void CRhinoWidgetGeometry::Stop ( )

◆ Transform()

virtual bool CRhinoWidgetGeometry::Transform ( const ON_Xform xform)

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.

◆ Transforming()

bool CRhinoWidgetGeometry::Transforming ( ON_Xform xformToApply) const