Rhino C++ API
8.13
|
Base class for all runtime Rhino objects. More...
#include <rhinoSdkObject.h>
Public Types | |
enum | GEOMETRY_TYPE { unknown_object_type = ON::object_type::unknown_object_type, point_object = ON::object_type::point_object, pointset_object = ON::object_type::pointset_object, curve_object = ON::object_type::curve_object, surface_object = ON::object_type::surface_object, polysrf_object = ON::object_type::polysrf_filter, edge_object = ON::object_type::edge_filter, polyedge_object = ON::object_type::polyedge_filter, loop_object = ON::object_type::loop_object, brepvertex_filter = ON::object_type::brepvertex_filter, mesh_object = ON::object_type::mesh_object, annotation_object = ON::object_type::annotation_object, light_object = ON::object_type::light_object, instance_reference = ON::object_type::instance_reference, grip_object = ON::object_type::grip_object, morph_control_object = ON::object_type::morph_control_object, subd_object = ON::object_type::subd_object, meshvertex_filter = ON::object_type::meshvertex_filter, meshedge_filter = ON::object_type::meshedge_filter, meshface_filter = ON::object_type::meshface_filter, meshcomponent_reference = ON::object_type::meshcomponent_reference, cage_object = ON::object_type::cage_object, hatch_object = ON::object_type::hatch_object, phantom_object = ON::object_type::phantom_object, extrusion_object = ON::object_type::extrusion_object, any_object = ON::object_type::any_object } |
enum | objectframe_flags : unsigned int { objectframe_standard = 0, objectframe_include_scale_transforms = 1, objectframe_return_unset = 2 } |
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 | |
CRhinoObject () | |
assigns a new object UUID More... | |
CRhinoObject (const CRhinoObject &) | |
copies source object UUID More... | |
CRhinoObject (const ON_3dmObjectAttributes &) | |
virtual | ~CRhinoObject () |
virtual void | AddToDocNotification () |
BOOL32 | AttachAttributeUserData (ON_UserData *pUserData) |
bool | AttachGeometryUserData (ON_UserData *pUserData) |
CRhinoObjectAttributes & | Attributes () |
virtual const CRhinoObjectAttributes & | Attributes () const |
virtual void | BeginTransform (CRhinoDoc &doc, bool bDeleteOriginal, bool bAddNewObjectToDoc, bool bAddTransformHistory) |
virtual ON_BoundingBox | BoundingBox () const |
virtual ON_BoundingBox | BoundingBox (const class CRhinoViewport *pViewport) const |
unsigned int | BrepReferenceCount () const |
class CRhObjectReferenceCounter * | BrepReferenceCounter (void) const |
void | BrepReferenceCounter_DestroyRuntimeCache (bool bDelete) const |
bool | BrepReferenceCounterExists () const |
bool | CopyHistoryOnReplace () const |
virtual int | CreateMeshes (ON::mesh_type mesh_type, const ON_MeshParameters &mp, bool bIgnoreCustom=false) |
BOOL32 | DeleteAttributeUserData (ON_UUID userdata_uuid) |
void | DeleteDynamicTransform () |
virtual void | DeleteFromDocNotification () |
bool | DeleteGeometryUserData (ON_UUID userdata_uuid) |
void | DestroyMeshes (ON::mesh_type mesh_type) |
virtual void | DestroyMeshes (ON::mesh_type mesh_type, bool bDeleteMeshes) |
void | DestroyRuntimeCache (bool bDelete=true) override |
virtual ON_Object override More... | |
class CRhinoDoc * | Document () const |
unsigned int | DocumentRuntimeSerialNumber () const |
virtual void | Draw (class CRhinoDisplayPipeline &) const |
Draws object based on pipeline display attributes... More... | |
void | Draw (CRhinoViewport &) const |
virtual void | DrawGrips (class CRhinoDisplayPipeline &) const |
virtual void | DrawHighlightedSubObjects (class CRhinoDisplayPipeline &) const |
virtual void | DrawSubObject (class CRhinoDisplayPipeline &, ON_COMPONENT_INDEX) const |
Draws wireframe representation of a sub object. More... | |
virtual void | DrawV6 (class CRhinoObjectDrawContext *draw_context) const RHINO_NOEXCEPT |
virtual CRhinoObject * | DuplicateRhinoObject () const |
*enum ANALYSIS_MODE **bool | EnableAnalysisMode (ON_UUID am_id, bool bEnable=true) const |
new way (not virtual) More... | |
virtual bool | EnableCustomGrips (class CRhinoObjectGrips *custom_grips) |
virtual void | EnableGrips (bool bGripsOn) |
virtual void | EndTransform (CRhinoDoc &doc, bool bDeleteOriginal, bool bAddNewObjectToDoc, bool bAddTransformHistory) |
const ON_Geometry * | Geometry () const |
returns a pointer to the object's geometry More... | |
ON_UserData * | GetAttributeUserData (ON_UUID userdata_uuid) const |
bool | GetDynamicTransform (ON_Xform &dynamic_xform) const |
virtual bool | GetFrame (ON_Plane &plane) const |
ON_UserData * | GetGeometryUserData (ON_UUID userdata_uuid) const |
virtual int | GetGrips (ON_SimpleArray< class CRhinoGripObject * > &grip_list) const |
virtual int | GetHighlightedSubObjects (ON_SimpleArray< ON_COMPONENT_INDEX > &component_indices) const |
std::vector< std::shared_ptr< const ON_Mesh > > | GetMeshes (ON::mesh_type mesh_type) const |
virtual int | GetMeshes (ON::mesh_type mesh_type, ON_SimpleArray< const ON_Mesh * > &meshes) const |
void | GetRenderMeshParameters (ON_MeshParameters &mp) const |
virtual int | GetSelectedSubObjects (ON_SimpleArray< ON_COMPONENT_INDEX > &component_indices) const |
virtual int | GetSubobjectMaterialComponents (ON_SimpleArray< ON_COMPONENT_INDEX > &components_with_subobject_materials) const |
virtual int | GetSubObjects (ON_SimpleArray< CRhinoObject * > &subObjects, const class CRhinoViewport *pViewport=NULL) const |
virtual bool | GetTightBoundingBox (ON_BoundingBox &tight_bbox, bool bGrowBox=false, const ON_Xform *xform=nullptr) const |
virtual int | GetWireframeCurves (ON_SimpleArray< ON_Curve * > &curve_list) const |
const class CRhinoGripsEnabler * | GripsEnabler () const |
int | GripsOn () const |
bool | GripsSelected () const |
bool | HasCustomRenderMeshes (ON::mesh_type mt, const ON_Viewport *vp=nullptr, ON__UINT32 *flags=nullptr, const class CRhinoPlugIn *requestingPlugIn=nullptr, const class CDisplayPipelineAttributes *pAttributes=nullptr) const |
Determine if custom render meshes will be supplied for a particular object. More... | |
bool | HasDynamicTransform () const |
virtual bool | HasSubobjectMaterials (void) const |
bool | Highlight (bool bHighlight=true) const |
virtual bool | HighlightRequiresRedraw () const |
virtual bool | HighlightSubObject (ON_COMPONENT_INDEX component_index, bool bHighlight=true) const |
const CRhinoHistoryRecord * | HistoryRecord () const |
const ON_UUID | Id () const |
bool | InAnalysisMode () const |
bool | InAnalysisMode (const ON_UUID &am_id) const |
bool AnalysisMode( ANALYSIS_MODE am ) const; ///< old way More... | |
ON_Plane | InitialObjectFrame (const CRhinoDoc &) const |
const class CRhinoVisualAnalysisMode * | InShadedAnalysisMode () const |
unsigned int | IsActiveInDocument () const |
virtual bool | IsActiveInViewport (const class CRhinoViewport &) const |
virtual bool | IsDeletable () const |
bool | IsDeleted () const |
virtual bool | IsGroupObject () const |
bool | IsHidden () const |
int | IsHighlighted (BOOL32 bCheckSubObjects=false) const |
highlighted state (almost always = IsSelected() except in one or two commands) More... | |
bool | IsInstanceDefinitionGeometry () const |
int | IsInstanceDefinitionGeometryEx () const |
bool | IsLocked () const |
int | IsMarked () const |
virtual bool | IsMeshable (ON::mesh_type) const |
Returns true if the object is capable of having a mesh of the specified type. More... | |
bool | IsModelObject () const |
bool | IsNormal () const |
bool | IsPageObject () const |
int | IsProxy () const |
bool | IsReference () const |
bool | IsSelectable (bool bIgnoreSelectionState, bool bIgnoreGripsState, bool bIgnoreLocking, bool bIgnoreVisibility) const |
bool | IsSelectable (bool bIgnoreSelectionState=false, bool bIgnoreGripsState=false) const |
int | IsSelected (bool bCheckSubObjects=false) const |
virtual bool | IsSolid () const |
virtual bool | IsSubObjectHighlighted (ON_COMPONENT_INDEX component_index) const |
true if specified component is highlighted More... | |
bool | IsSubObjectSelectable (ON_COMPONENT_INDEX component_index, bool bIgnoreSelectionState=false) const |
virtual bool | IsSubObjectSelected (ON_COMPONENT_INDEX component_index) const |
bool | IsValid (ON_TextLog *text_log=nullptr) const override |
bool | IsVisible () const |
unsigned int | LinkedInstanceDefinitionSerialNumber () const |
void | Mark (int) |
void | MemoryRelocate () override |
virtual ON_Object override More... | |
virtual int | MeshCount (ON::mesh_type mesh_type, const ON_MeshParameters *mp=0) const |
virtual const class CDisplayPipelineAttributes * | MeshDisplayAttributes (int mesh_index, const ON_Mesh &mesh, const class CDisplayPipelineAttributes &display_attrs) const |
const ON_ModelComponent & | ModelComponent () const |
ON_UUID | ModelObjectId () const override |
virtual bool | ModifyAttributes (const ON_3dmObjectAttributes &new_attributes, bool bEnableUndo=true, bool bQuiet=false) |
const ON_wString | Name () const |
ON_Color | ObjectDrawColor (bool bIgnoreObjectState=false) const |
ON_Color | ObjectDrawColor (const CRhinoObjectAttributes &attributes, bool bIgnoreObjectState=false) const |
ON_Color | ObjectDrawColor (const CRhinoObjectAttributes &attributes, const ON_UUID &viewport_id, bool bIgnoreObjectState) const |
ON_Plane | ObjectFrame (const ON_COMPONENT_INDEX &ci, unsigned int objectframe_flags) const |
const class CRhinoLayer & | ObjectLayer () const |
const class CRhinoLayer * | ObjectLayerPtr () const |
const CRhinoLinetype & | ObjectLinetype () const |
const CRhinoLinetype * | ObjectLinetypePtr () const |
virtual const CRhinoMaterial & | ObjectMaterial () const |
virtual const CRhinoMaterial & | ObjectMaterial (const ON_3dmObjectAttributes &attrs) const |
virtual const CRhinoMaterial & | ObjectMaterial (const ON_COMPONENT_INDEX &ci, const ON_UUID &plugin_id=RhinoDefaultRendererId(), const ON_3dmObjectAttributes *attrs=NULL) const |
This is now the preferred version of the function. This should be used to get materials component-wise in all cases. More... | |
virtual const CRhinoMaterial & | ObjectMaterial (const ON_UUID &plugin_id) const |
virtual const CRhRdkMaterial * | ObjectRdkMaterial (const ON_COMPONENT_INDEX &ci, const ON_UUID &plugin_id=RhinoDefaultRendererId(), const ON_3dmObjectAttributes *attrs=NULL) const |
virtual ON::object_type | ObjectType () const override=0 |
virtual ON_wString | OnDoubleClick (const CRhinoDoubleClickContext &double_click_context) const |
CRhinoObject & | operator= (const CRhinoObject &) |
copies source object UUID More... | |
bool | PerViewportIsVisible (ON_UUID viewport_id) const |
virtual int | Pick (const CRhinoPickContext &pick_context, class CRhinoObjRefArray &pick_list) const |
virtual bool | PickFilter (const class CRhinoGetObject &, bool) const |
virtual void | PreDrawUpdate (CRhinoDisplayPipeline &dp) const |
virtual bool | PrepareToWrite (int archive_3dm_version) |
virtual bool | PromotePreviewMeshes (ON::mesh_type) |
std::shared_ptr< const RhRdk::CustomRenderMeshes::IRenderMeshes > | RenderMeshes (ON::mesh_type mt, bool recursive, const ON_Viewport *vp=nullptr, const class CRhRdkObjectAncestry *ancestry_only_for_by_parent_attributes=nullptr, const CRhinoPlugIn *requestingPlugIn=nullptr, const CDisplayPipelineAttributes *pAttributes=nullptr, std::shared_ptr< const RhRdk::CustomRenderMeshes::IRenderMeshes > optional_initial_primitives=nullptr) const |
Returns a complete set of custom render meshes (primitives) for the object. Simple version with no need for flags. More... | |
std::shared_ptr< const RhRdk::CustomRenderMeshes::IRenderMeshes > | RenderMeshes (ON::mesh_type mt, const ON_Viewport *vp=nullptr, const class CRhRdkObjectAncestry *ancestry_only_for_by_parent_attributes=nullptr, ON__UINT32 *flags=nullptr, const CRhinoPlugIn *requestingPlugIn=nullptr, const CDisplayPipelineAttributes *pAttributes=nullptr, std::shared_ptr< const RhRdk::CustomRenderMeshes::IRenderMeshes > optional_initial_primitives=nullptr) const |
Returns a complete set of custom render meshes (primitives) for the object. More... | |
unsigned int | RuntimeSerialNumber () const |
int | Select (bool bSelect, bool bSynchHighlight, bool bPersistentSelect, bool bIgnoreGripsState, bool bIgnoreLayerLocking, bool bIgnoreLayerVisibility) const |
int | Select (bool bSelect=true, bool bSynchHighlight=true, bool bPersistentSelect=true, bool bIgnoreGripsState=false) const |
virtual int | SelectSubObject (ON_COMPONENT_INDEX component_index, bool bSelect=true, bool bSynchHighlight=true, bool bPersistentSelect=false) const |
bool | SetCachedTextureCoordinates (const ON_TextureMapping &mapping, const ON_Xform *object_xform, bool bLazy=true) const |
bool | SetCachedTextureCoordinatesFromPlugIn (const ON_UUID &plugin_id) const |
bool | SetCachedTextureCoordinatesFromPlugIn (const ON_UUID &plugin_id, const ON_SimpleArray< ON_TextureMapping::TYPE > &mappings_to_cache) const |
void | SetCopyHistoryOnReplace (bool bCopy) const |
bool | SetDynamicTransform (const ON_Xform &dynamic_xform) |
bool | SetHistory (class CRhinoHistory &history) |
void | SetObjectFrame (const ON_COMPONENT_INDEX &ci, const ON_Plane &plane) |
void | SetObjectFrame (const ON_COMPONENT_INDEX &ci, const ON_Xform &wcs_to_ocs) |
virtual bool | SetRenderMeshParameters (const ON_MeshParameters &mp) |
virtual bool | SetTextureCoordinates (const ON_TextureMapping &mapping, const ON_Xform *object_xform, bool bLazy=true) const |
virtual bool | SetTextureCoordinatesFromPlugIn (const ON_UUID &plugin_id, int mapping_channel_id) const |
virtual const wchar_t * | ShortDescription (bool bPlural) const =0 |
virtual unsigned int | SizeOf () const override |
returns number of bytes used by this particular instance More... | |
virtual bool | SnapTo (const CRhinoSnapContext &snap_context, CRhinoSnapEvent &snap_event) const |
ON::active_space | Space () const |
virtual ON_ComponentStatus | SubObjectStatus () const |
virtual bool | SupportsBrepProxyReferenceCounting () const |
bool | UndoModifyAttributes (unsigned int ur_sn=0) |
virtual int | UnhighlightAllSubObjects () |
returns number of changed subobjects More... | |
virtual int | UnselectAllSubObjects () |
returns number of unselected subobjects More... | |
void | UpdateBoundingBox () |
virtual bool | VetoTransformObject (CRhinoDoc &doc, bool bDeleteOriginal, bool bAddNewObjectToDoc, bool bAddTransformHistory) const |
unsigned int | WorksessionReferenceModelSerialNumber () const |
Public Member Functions inherited from ON_Object | |
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) |
virtual void | Dump (ON_TextLog &) const |
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 |
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 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) |
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 |
Static Public Member Functions | |
static const CRhinoObject * | FromId (unsigned int rhino_doc_runtime_serial_number, ON_UUID rhino_object_id) |
static const CRhinoObject * | FromRuntimeSerialNumber (unsigned int rhino_doc_runtime_serial_number, unsigned int rhino_object_runtime_serial_number) |
static unsigned int | NextRuntimeObjectSerialNumber () |
Public Attributes | |
class CRhObjectSdkExtension * | m__object_sdk_extension |
const class CRhinoObjectVisualAnalysisMode * | m_analysis_mode_list |
list of enabled analysis modes More... | |
CRhinoCacheHandle | m_cache |
class CRhinoObjectGrips * | m_grips |
managed by derived objects More... | |
unsigned char | m_use_preview_mesh |
Static Public Attributes | |
static int | m_no_show_mark |
Protected Member Functions | |
void | Destroy () |
virtual bool | InternalVirtual_IsSelectable (bool bIgnoreSelectionState, bool bIgnoreGripsState, bool bIgnoreLocking, bool bIgnoreVisibility) const |
virtual bool | IsSelectableWithGripsOn () const |
true if can be selected while grips are on More... | |
virtual int | SubObjectsAreHighlighted () const |
returns number of highlighted subobjects More... | |
virtual int | SubObjectsAreSelected () const |
returns number of selected subobjects More... | |
virtual void | SynchAttributes () |
light objects are special because they are not in the geometry lists More... | |
Protected Attributes | |
ON_BoundingBox | m_bbox |
world coordinate bounding box More... | |
unsigned char | m_geomem_type |
ON_Geometry * | m_geometry |
const CRhinoHistoryRecord * | m_history_record |
Friends | |
class | CRhCameraIcon |
class | CRhinoDoc |
class | CRhinoGripObject |
class | CRhinoHistoryManager |
class | CRhinoHistoryRecordTable |
class | CRhinoInstanceDefinition |
class | CRhinoInstanceDefinitionTable |
class | CRhinoLight |
class | CRhinoLightTable |
class | CRhinoObjectGrips |
used to determine if geometry is in document More... | |
class | CRhinoObjectIterator |
class | CRhinoPhantomObject |
class | CRhinoProxyObject |
class | CRhinoRead3dmHelper |
class | CRhObjectFinder |
class | CRhObjectSdkExtension |
class | CRhRenderPreview |
class | CRhSnapToVisible |
Base class for all runtime Rhino objects.
Geometry types for CRhinoObjRef (same as the ON::object_type) In an ideal world, the CRhinoObject::GEOMETRY_TYPE would be removed and ON::object_type would be used everywhere.
Enumerator | |
---|---|
unknown_object_type | |
point_object | single point |
pointset_object | point cloud or point grid |
curve_object | curve (can be 3d edge in a brep) |
surface_object | surface (can be face in a brep) |
polysrf_object | brep with 2 or more faces |
edge_object | brep edge (with an associated ON_BrepTrim) |
polyedge_object | a chain of edges and/or curves |
loop_object | brep loop |
brepvertex_filter | brep vertex |
mesh_object | |
annotation_object | |
light_object | |
instance_reference | |
grip_object | |
morph_control_object | |
subd_object | |
meshvertex_filter | mesh vertex as an ON_MeshComponentRef |
meshedge_filter | mesh edge as an ON_MeshComponentRef |
meshface_filter | mesh triangle, quad or ngon as an ON_MeshComponentRef |
meshcomponent_reference | mesh vertex, edge, face, ngon (ON_MeshComponentRef) |
cage_object | |
hatch_object | |
phantom_object | |
extrusion_object | |
any_object |
enum CRhinoObject::objectframe_flags : unsigned int |
CRhinoObject::CRhinoObject | ( | ) |
assigns a new object UUID
CRhinoObject::CRhinoObject | ( | const ON_3dmObjectAttributes & | ) |
|
virtual |
CRhinoObject::CRhinoObject | ( | const CRhinoObject & | ) |
copies source object UUID
|
virtual |
Description: This call informs an object it is about to be added to the list of active objects in the document. Some objects, like clipping planes, need to do a little extra cleanup before they are deleted.
Reimplemented in CRhinoWidget, CRhinoClippingPlaneObject, and CRhinoDetailViewObject.
BOOL32 CRhinoObject::AttachAttributeUserData | ( | ON_UserData * | pUserData | ) |
Description: Attach user data to the Rhino object's attributes. Parameters: pUserData - [in] user data to attach to object's attributes. The ON_UserData pointer passed to AttachUserData() must be created with new. If successful, the returned value of pUserData is NULL. Returns: If TRUE is returned, then ON_Object will delete the user data when appropriate. If FALSE is returned, then data could not be attached and caller must delete.
Remarks: AttachUserData() will fail if the user data's m_userdata_uuid field is nil or not unique.
bool CRhinoObject::AttachGeometryUserData | ( | ON_UserData * | pUserData | ) |
user data Description: Attach user data to the Rhino object's geometry. This user data will persist through file IO if the user data correctly implements file IO support. Parameters: pUserData - [in] user data to attach to object. The ON_UserData pointer passed to AttachUserData() must be created with new. Returns: If TRUE is returned, then ON_Object will delete the user data when appropriate. If FALSE is returned, then data could not be attached and caller must delete it.
Remarks: AttachGeometryUserData() will fail if the user data's m_userdata_uuid field is nil or not unique.
CRhinoObjectAttributes& CRhinoObject::Attributes | ( | ) |
|
virtual |
Description: Object attributes include normal/locked/hidden status, name, layer, rendering attributes, display attributes, group membership, and so on.
Returns: Attributes
Remarks: Some attributes like drawing color and rendering material can be specified per object or per layer. The values of the attributes ColorSource() and MaterialSource() determine which definition should be used.
See Also: CRhinoObject::ObjectLayer, CRhinoObject::ObjectMaterial, CRhinoObject::ObjectColor
Reimplemented in CRhinoGripObject.
|
virtual |
Description: Expert user tool Called immediately after duplication of the transformed object, and before changes are made to it.
Reimplemented in CRhinoNamedViewCameraIcon.
|
virtual |
Description: Gets 3d axis aligned bounding box that contains the object.
Returns: 3d bounding box
Remarks: The default implementation uses m_geometry->BoundingBox(), lazy evaluation, and caches the result in m_bbox.
If you override this function, then you must set m_bbox.
Reimplemented in CRhinoNamedViewCameraIcon, CRhinoInstanceObject, CRhinoSubDObject, CRhinoWidget, CRhinoHatch, CRhinoAnnotation, CRhinoTextDot, CRhinoBrepObject, CRhinoClippingPlaneObject, CRhinoCurveObject, and CRhinoLight.
|
virtual |
Description: Gets 3d axis aligned world coordinate bounding box that contains the geometry used to display the object.
For most objects, this is the same as BoundingBox(). For objects like lights that use an icon, the world coordinate bounding box depends on the view.
Returns: 3d bounding box
Remarks: The default implementation calls BoundingBox().
Reimplemented in CRhinoSubDObject, and CRhinoBrepObject.
unsigned int CRhinoObject::BrepReferenceCount | ( | ) | const |
class CRhObjectReferenceCounter* CRhinoObject::BrepReferenceCounter | ( | void | ) | const |
Description: If you are writing a command or plug-in and and need a brep form of an object type that supports BrepForm, call Geometry()->BrepForm().
The definition of CRhReferenceCountedBrep is not available in the SDK and this function is for use in the core Rhino code. The returned class must be deleted by the caller.
void CRhinoObject::BrepReferenceCounter_DestroyRuntimeCache | ( | bool | bDelete | ) | const |
bool CRhinoObject::BrepReferenceCounterExists | ( | ) | const |
bool CRhinoObject::CopyHistoryOnReplace | ( | ) | const |
Description: Returns whether the CopyHistoryOnReplace flag is set. Returns: true if the object has history and the flag is set false if there's no history or the flag is clear
|
virtual |
Description: Create meshes used to render and analyze surface and polysurface objects. Parameters: mesh_type - [in] type of meshes to create mp - [in] in parameters that control the quality of the meshes that are created. mapping - [in] If not NULL, the texture coordinates are calculated using the call ON_Mesh::SetTextureCoordinates(*mapping,mapping,true) mapping_xform - [in] See mapping parameter description. See Also: CRhinoObject::GetMeshes CRhinoObject::MeshCount CRhinoObject::IsMeshable
Reimplemented in CRhinoInstanceObject, CRhinoSubDObject, CRhinoExtrusionObject, CRhinoBrepObject, and CRhinoMeshObject.
Description: Remove user data from a Rhino object's attributes. Parameters: userdata_uuid - [in] value of the user data's m_userdata_uuid field. Returns: If TRUE is returned, then the user data was attached to this object and it was detached. If FALSE is returned, then the user data was not attached to this object to begin with. In all cases, you can be assured that the user data is no longer attached to "this". Remarks: Call delete pUserData if you want to destroy the user data.
void CRhinoObject::DeleteDynamicTransform | ( | ) |
Description: Delete the dynamic transformation.
|
virtual |
Description: This call informs an object it is about to be deleted. Some objects, like clipping planes, need to do a little extra cleanup before they are deleted.
Reimplemented in CRhinoNamedViewCameraIcon, CRhinoSubDObject, CRhinoWidget, CRhinoHatch, CRhinoPointCloudObject, CRhinoBrepObject, CRhinoClippingPlaneObject, CRhinoCurveObject, and CRhinoTextDot.
bool CRhinoObject::DeleteGeometryUserData | ( | ON_UUID | userdata_uuid | ) |
Description: Remove user data from a Rhino object's geometry. Parameters: pUserData - [in] user data to attach to object. The ON_UserData pointer passed to DetachUserData() must have been previously attached using AttachUserData().
Returns: If TRUE is returned, then the user data was attached to this object and it was detached. If FALSE is returned, then the user data was not attached to this object to begin with. In all cases, you can be assured that the user data is no longer attached to "this". Remarks: Call delete pUserData if you want to destroy the user data.
|
protected |
void CRhinoObject::DestroyMeshes | ( | ON::mesh_type | mesh_type | ) |
virtual
|
virtual |
Description: Destroy meshes used to render and analyze surface and polysurface objects. Parameters: mesh_type - [in] type of mesh to destroy bDeleteMeshes - [in] if true, cached meshes are deleted. If false, pointers to cached meshes are just set to NULL. See Also: CRhinoObject::GetMeshes CRhinoObject::MeshCount CRhinoObject::IsMeshable
Reimplemented in CRhinoSubDObject, CRhinoBrepObject, CRhinoInstanceObject, CRhinoExtrusionObject, and CRhinoMeshObject.
|
overridevirtual |
virtual ON_Object override
Reimplemented from ON_Object.
Reimplemented in CRhinoSubDObject, and CRhinoPointCloudObject.
class CRhinoDoc* CRhinoObject::Document | ( | ) | const |
unsigned int CRhinoObject::DocumentRuntimeSerialNumber | ( | ) | const |
Description: Gets document that owns the object.
Returns: Document that manages object.
Remarks: When an object is created, it does not belong to a document. CRhinoDoc::AddObject() or CRhinoDoc::ReplaceObject() are used to add new objects to a document. After the object is added to a document, it it managed by that document. If the CRhinoObject::Document() returns NULL, then the object is not part of a document.
|
virtual |
Draws object based on pipeline display attributes...
Reimplemented in CRhinoNamedViewCameraIcon, CRhinoInstanceObject, CRhinoSubDObject, CRhinoWidget, CRhinoText, CRhinoPointCloudObject, CRhinoHatch, CRhinoDimOrdinate, CRhinoCentermark, CRhinoBrepObject, CRhinoMeshObject, CRhinoDimLinear, CRhinoDimAngular, CRhinoDimRadial, CRhinoDetailViewObject, CRhinoLeader, CRhinoTextDot, CRhinoClippingPlaneObject, CRhinoCurveObject, CRhinoWireframeObject, CRhinoGroupObject, CRhinoPointObject, CRhinoLight, and CRhinoExtrusionObject.
void CRhinoObject::Draw | ( | CRhinoViewport & | ) | const |
|
virtual |
Draws the object's grips, control polygon, and dynamic wireframe object. Dynamic shaded objects are drawn in the Draw
|
virtual |
Draws wireframe representation of highlighted sub objects. objects that support subobject highlighting must override this function
Reimplemented in CRhinoSubDObject, CRhinoPointCloudObject, CRhinoBrepObject, CRhinoInstanceObject, CRhinoCurveObject, CRhinoGroupObject, CRhinoMeshObject, and CRhinoExtrusionObject.
|
virtual |
Draws wireframe representation of a sub object.
Reimplemented in CRhinoPointCloudObject, CRhinoBrepObject, CRhinoSubDObject, CRhinoInstanceObject, CRhinoCurveObject, CRhinoGroupObject, CRhinoMeshObject, and CRhinoExtrusionObject.
|
virtual |
Rhino V6 object drawing function.
Ideally, DrawV6() will replace all the drawing functions below. The single parameter will indicate what should be drawn, where it is being drawn, and how it should appear. If that happens, then this function will be renamed "Draw".
For now it is called DrawV6() so it is easy to search for it.
The class CRhinoObjectDrawContext is defined in rhinoSdkDraw.h.
For now, you must include rhinoSdkDraw.h by hand. Once the header file rhinoSdkDraw.h is being changed less than once a day, it will be included by rhinoSdk.h.
Reimplemented in CRhinoBrepObject, CRhinoPointCloudObject, CRhinoMeshObject, CRhinoPointObject, CRhinoExtrusionObject, and CRhinoCurveObject.
|
virtual |
Description: Duplicates the Rhino object. If "this" is a CRhinoProxyObject, the duplicate is a "real" Rhino object. If "this" is an ordinary Rhino object like a CRhinoCurveObject, CRhinoPointObject, and so on, then the duplicate is another rhino object of the same type.
Returns: NULL or a pointer to the duplicate. The new object is not added to the Rhino document.
Reimplemented in CRhinoProxyObject, and CRhinoClippingPlaneObject.
* enum ANALYSIS_MODE* * bool CRhinoObject::EnableAnalysisMode | ( | ON_UUID | am_id, |
bool | bEnable = true |
||
) | const |
new way (not virtual)
Description: Used to turn analysis modes on and off. Parameters: am - [in] specifies analysis mode bEnable - [in] true to turn mode on. Remarks: The zebra, Emap, curvature, and draft angle surface analysis modes are mutually exclusive. Turning one on will automatically turn off the other three.
The edge and curvature_graph modes are independent of all other modes. Returns: True if this object supports the analysis mode. virtual bool EnableAnalysisMode( ANALYSIS_MODE am, bool bEnable = true ) const; ///< old way
|
virtual |
Description: Turns on/off the object's editing grips Parameters: grips - [in] This class must be on the heap. The Rhino PointsOff command calls CRhinoObject::EnableGrips(0), which will delete grips. If NULL, grips are turned off. Returns: True if the call succeeded. If you attempt to add custom grips to an object that does not support custom grips, then false is returned and it is your responsibility to delete custom_grips. See Also: CRhinoObject::GripsOn CRhinoObject::GetGrips
|
virtual |
Description: Turns on the object's default editing grips Parameters: bDefaultGripsOn - [in] True to turn on the object's default grips. False to turn off any grips. See Also: CRhinoObject::GripsOn CRhinoObject::GetGrips
Reimplemented in CRhinoSubDObject, CRhinoPointCloudObject, CRhinoBrepObject, CRhinoCurveObject, CRhinoInstanceObject, CRhinoHatch, CRhinoText, CRhinoMorphControl, CRhinoDimOrdinate, CRhinoCageObject, CRhinoCentermark, CRhinoDimLinear, CRhinoMeshObject, CRhinoDimAngular, CRhinoDetailViewObject, CRhinoDimRadial, CRhinoLight, CRhinoClippingPlaneObject, CRhinoLeader, CRhinoExtrusionObject, CRhinoNamedViewCameraIcon, and CRhinoWidget.
|
virtual |
Description: Expert user tool Called at the end of the transformation process. Default implementation doesn't do anything
Reimplemented in CRhinoNamedViewCameraIcon.
|
static |
|
static |
Description: Get a pointer to a CRhinoObject from a runtime_serial number or id. Parameters: rhino_doc_runtime_serial_number - [in] If you want to search all documents, pass 0. Specifying a document improves performance. rhino_object_runtime_serial_number - [in] rhino_object_id - [in] Returns: The Rhino object with the matching runtime serial number or null if no object exists. Remarks:
const ON_Geometry* CRhinoObject::Geometry | ( | ) | const |
returns a pointer to the object's geometry
ON_UserData* CRhinoObject::GetAttributeUserData | ( | ON_UUID | userdata_uuid | ) | const |
Description: Get a pointer to user data on a Rhino object's attributes. Parameters: userdata_uuid - [in] value of the user data's m_userdata_uuid field. Remarks: The returned user data is still attached to the object. Deleting the returned user data will automatically remove the user data from the object.
bool CRhinoObject::GetDynamicTransform | ( | ON_Xform & | dynamic_xform | ) | const |
dynamic transformation commands Description: While an object is being dynamically transformed (dragged, rotated, ...), the current transformation can be retrieved and used for creating dynamic display. Properties: xform - [out] Returns: True if the object is being edited and its transformation is available. False if the object is not being edited, in which case the identity xform is returned.
|
virtual |
Description: Gets 3d frame for object. Parameters: plane - [out] 3d frame Returns: true if successful
Reimplemented in CRhinoInstanceObject, CRhinoCurveObject, CRhinoPointObject, and CRhinoBrepObject.
ON_UserData* CRhinoObject::GetGeometryUserData | ( | ON_UUID | userdata_uuid | ) | const |
Description: Get a pointer to user data on a Rhino object's geometry. Parameters: userdata_uuid - [in] value of the user data's m_userdata_uuid field. Remarks: The returned user data is still attached to the object. Deleting the returned user data will automatically remove the user data from the object.
|
virtual |
Description: If grips are enabled, then GetGrips appends the object's grips to the grip_list[] array. Returns: Number of grips appended to the array. See Also: CRhinoObject::GripsOn CRhinoObject::EnableGrips
|
virtual |
Description: Get a list of all highlighted sub-objects Parameters: component_indices - [out] component indices of highlighted sub-objects. Returns: number of highlighted subobjects
Reimplemented in CRhinoSubDObject, CRhinoPointCloudObject, CRhinoBrepObject, CRhinoInstanceObject, CRhinoCurveObject, CRhinoGroupObject, CRhinoExtrusionObject, and CRhinoMeshObject.
std::vector<std::shared_ptr<const ON_Mesh> > CRhinoObject::GetMeshes | ( | ON::mesh_type | mesh_type | ) | const |
Description: Get existing meshes used to render and analyze surface and polysurface objects. Parameters: ON::mesh_type - [in] type of mesh to get Returns: Shared pointers to const meshes as stored on the objects. See Also: CRhinoObject::DestroyMeshes CRhinoObject::MeshCount CRhinoObject::IsMeshable virtual
|
virtual |
Description: Get existing meshes used to render and analyze surface and polysurface objects. Parameters: ON::mesh_type - [in] type of mesh to get meshes - [out] meshes are appended to this array. The CRhinoObject owns these meshes so the meshes cannot be modified. Returns: Number of meshes added to meshes array See Also: CRhinoObject::DestroyMeshes CRhinoObject::MeshCount CRhinoObject::IsMeshable
Reimplemented in CRhinoSubDObject, CRhinoBrepObject, CRhinoExtrusionObject, and CRhinoMeshObject.
void CRhinoObject::GetRenderMeshParameters | ( | ON_MeshParameters & | mp | ) | const |
|
virtual |
Description: Get a list of all selected sub-objects Parameters: component_indices - [out] component indices of selected sub-objects. Returns: number of selected subobjects
Reimplemented in CRhinoSubDObject, CRhinoPointCloudObject, CRhinoBrepObject, CRhinoInstanceObject, CRhinoCurveObject, CRhinoGroupObject, CRhinoExtrusionObject, and CRhinoMeshObject.
|
virtual |
Reimplemented in CRhinoSubDObject, and CRhinoBrepObject.
|
virtual |
Description: Explode this object into subobjects. Parameters: subObjects - [out] subobjects are appended to this list. The returned objects have not been added to the document and it is the caller's responsibility to manage them. pViewport - [in] Some objects' appearance is viewport dependent. If not NULL, the object should be exploded with respect to its appearance in this viewport. Returns: Number of subobjects ( >= 2 ) or 0 if this object cannot be exploded.
Reimplemented in CRhinoBrepObject, and CRhinoSubDObject.
|
virtual |
Description: Get tight bounding box of this Rhino object. Parameters: tight_bbox - [in/out] tight bounding box bGrowBox -[in] (default=false)
If true and the input tight_bbox is valid, then returned tight_bbox is the union of the input tight_bbox and the tight bounding box of this Rhino object. xform -[in] (default=NULL) If not NULL, the tight bounding box of the transformed Rhino object is calculated. The Rhino object is not modified. Returns: True if the returned tight_bbox is set to a valid bounding box.
Reimplemented in CRhinoPointCloudObject, CRhinoBrepObject, CRhinoCurveObject, CRhinoInstanceObject, CRhinoSubDObject, CRhinoExtrusionObject, CRhinoDetailViewObject, CRhinoClippingPlaneObject, CRhinoMeshObject, CRhinoLight, CRhinoPointObject, CRhinoHatch, and CRhinoAnnotation.
|
virtual |
Description: Get curves that are used to display the object's wireframe. Parameters: curve_list - [in] 3d world space wireframe curves are appended to this list. The caller is responsible for deleting the curves. Returns: Number of curves appended to the list.
Reimplemented in CRhinoSubDObject, CRhinoBrepObject, CRhinoCurveObject, CRhinoInstanceObject, CRhinoExtrusionObject, CRhinoMeshObject, and CRhinoWireframeObject.
const class CRhinoGripsEnabler* CRhinoObject::GripsEnabler | ( | ) | const |
Returns: If the object has grips on, this returns the enabler to turn on that type of grips. If the object does not have grips on, this returns NULL.
int CRhinoObject::GripsOn | ( | ) | const |
Returns: CRhinoGripObject::GRIP_TYPE value 0 = off See Also: CRhinoObject::EnableGrips CRhinoObject::GripsSelected
bool CRhinoObject::GripsSelected | ( | ) | const |
Returns: True if grips are turned on and at least one is selected. See Also: CRhinoObject::GripsOn
bool CRhinoObject::HasCustomRenderMeshes | ( | ON::mesh_type | mt, |
const ON_Viewport * | vp = nullptr , |
||
ON__UINT32 * | flags = nullptr , |
||
const class CRhinoPlugIn * | requestingPlugIn = nullptr , |
||
const class CDisplayPipelineAttributes * | pAttributes = nullptr |
||
) | const |
Determine if custom render meshes will be supplied for a particular object.
OBSOLETE - REMOVE ALL CALLS TO THIS FUNCTION ON_DEPRECATED bool SetTextureMapping() const;
vp | The viewport being rendered. If nullptr, no support for view dependent meshes. |
flags | See RhRdk::CustomRenderMeshes::IManager::Flags. If nullptr, assumed to be Flags::None and no support for returning flags. |
requestingPlugIn | The requesting plug-in - typically the render plug-in requesting the meshes. Can be nullptr. |
pAttributes | The display attributes currently being used - nullptr if this is production rendering. Can be nullptr. |
bool CRhinoObject::HasDynamicTransform | ( | ) | const |
Returns: True if the object has a dynamic transformation.
|
virtual |
Reimplemented in CRhinoSubDObject, and CRhinoBrepObject.
bool CRhinoObject::Highlight | ( | bool | bHighlight = true | ) | const |
|
virtual |
true if pixels used by highlighted object differ from pixels used by highlighted object.
Reimplemented in CRhinoInstanceObject, CRhinoSubDObject, CRhinoCurveObject, CRhinoGroupObject, CRhinoExtrusionObject, CRhinoMeshObject, and CRhinoBrepObject.
|
virtual |
const CRhinoHistoryRecord* CRhinoObject::HistoryRecord | ( | ) | const |
Description: Gets the history record that describes how this object was created. This information is used to update this object when Rhino history is enabled and an input object changes. Returns: NULL or a pointer to the history record for this object.
const ON_UUID CRhinoObject::Id | ( | ) | const |
Code that uses CRhinoObject.Id() now will not need to be modified when m_uuidis removed from ON_3dmObjectAttributes.
bool CRhinoObject::InAnalysisMode | ( | ) | const |
Returns: True if any visual analysis mode is active
bool CRhinoObject::InAnalysisMode | ( | const ON_UUID & | am_id | ) | const |
bool AnalysisMode( ANALYSIS_MODE am ) const; ///< old way
Description: Reports if an analysis mode is currently enabled for an object Parameters: am - [in] Returns: True if the analysis display mode is currently enabled. new way
Description: Gets a guess at the initial object frame - this used to be the code that guesses the gumball location and orientation from the object geometry.
Returns: A plane defining the object frame.
Remarks: This is a "fake" virtual function - because I can't extend the SDK. The implementation is to switch over the built in types and return a guessed frame. If that doesn't work, it returns a CPlane aligned bounding box center assuming the cplane can be found for the current document view. If that fails, a world plane BB center. virtual
const class CRhinoVisualAnalysisMode* CRhinoObject::InShadedAnalysisMode | ( | ) | const |
Description: An object can have at most one shaded analysis mode active at any time. It is possible to have multiple wireframe modes active. For example, you can have zebra, edge, and curvature hair analysis on at the same time, but you cannot have zebra and draft angle on at the same time. Returns: If the object has a shaded analysis mode on, a pointer to the mode's controller is returned. For any mode, this pointer is always the same and is valid for the entire life of the application.
|
protectedvirtual |
Description: Objects derived from CRhinoObject may override InternalVirtual_IsSelectable() when the default behavior needs to be modified.
unsigned int CRhinoObject::IsActiveInDocument | ( | ) | const |
Description: Determine if an object is active in a document. This is a required piece of information when deciding if a modification to an object should set the document modified flag. Returns: 0: The object does not belong to a document or it is deleted. != 0: The object is active in a document and the serial number of that document is returned.
|
virtual |
Description: Query to determine if this object is active in a particular viewport.
Parameters: viewport - [in] Returns: True if the object is active in viewport. Remarks: The default implementation tests for space and viewport id. This handles things like testing if a page space object is visible in a modeling view.
|
virtual |
Description: Some objects cannot be deleted, like grips on lights and annotation objects. Returns: True if object can be deleted.
Reimplemented in CRhinoGripObject, CRhinoWidget, and CRhinoGroupObject.
bool CRhinoObject::IsDeleted | ( | ) | const |
Description: Returns true if the object is deleted.
Returns: true if object is deleted.
Remarks: Use CRhinoDoc::UndeleteObject() to undelete an object.
|
virtual |
Description: Test object to see if it is a proxy CRhinoGroupObject. Returns: true if this is a CRhinoGroupObject.
Reimplemented in CRhinoGroupObject.
bool CRhinoObject::IsHidden | ( | ) | const |
int CRhinoObject::IsHighlighted | ( | BOOL32 | bCheckSubObjects = false | ) | const |
highlighted state (almost always = IsSelected() except in one or two commands)
Description: Check highlight state. Parameters: bCheckSubObjects - [in] If true and the entire object is not highlighted, and some subset of the object is highlighted, like some edges of a surface, then 3 is returned. If false and the entire object is not highlighted, then zero is returned. Returns: @untitled table 0 object is not highlighted 1 entire object is highlighted 3 one or more proper sub-objects are highlighted
bool CRhinoObject::IsInstanceDefinitionGeometry | ( | ) | const |
Description: Returns true if the object is used as part of an instance definition.
Returns: true if object is is used as part of an instance definition.
int CRhinoObject::IsInstanceDefinitionGeometryEx | ( | ) | const |
Description: Returns the value of m_is_idef_geometry.
bool CRhinoObject::IsLocked | ( | ) | const |
int CRhinoObject::IsMarked | ( | ) | const |
marking - no impact on display - not saved or copied Use CRhinoDoc::ClearMarks() to set all marks to zero.
|
virtual |
Returns true if the object is capable of having a mesh of the specified type.
Render and Analysis mesh interface
Reimplemented in CRhinoInstanceObject, CRhinoSubDObject, CRhinoExtrusionObject, CRhinoBrepObject, and CRhinoMeshObject.
bool CRhinoObject::IsModelObject | ( | ) | const |
Returns: True if the object is in model space.
bool CRhinoObject::IsNormal | ( | ) | const |
there are 3 mutually exclusive object states
bool CRhinoObject::IsPageObject | ( | ) | const |
Returns: True if the object is in page layout space.
int CRhinoObject::IsProxy | ( | ) | const |
bool CRhinoObject::IsReference | ( | ) | const |
Description: Determine if an object is a reference object. Returns: True if the object is a reference object. Remarks: An object from a work session reference model is reference a reference object and cannot be modified. An object is a reference object if, and only if, it is on a reference layer.
bool CRhinoObject::IsSelectable | ( | bool | bIgnoreSelectionState, |
bool | bIgnoreGripsState, | ||
bool | bIgnoreLocking, | ||
bool | bIgnoreVisibility | ||
) | const |
Description: Reports if an object can be selected. Parameters: bIgnoreSelectionState - [in] (default=false) If true, then selected objects are selectable. If false, the selected objects are not selectable. bIgnoreGripsState - [in] If true, then objects with grips on can be selected. If false, then the value returned by the object's virtual IsSelectableWithGripsOn() function decides if the object can be selected. bIgnoreLocking - [in] (default=false)
If true, then locked objects and objects on locked layers are selectable. If false, then locked objects and objects on locked layers are not selectable. bIgnoreVisibility - [in] (default=false)
If true, then hidden objects and objects on hidden layers are selectable. If false, then hidden objects and objects on hidden layers are not selectable. Returns: True if object is capable of being selected Remarks: Objects that are locked or hidden cannot be selected. If IsSelectableWithGripsOn() returns false, then an that object is not selectable if it has grips turned on.
Calls the virtual function InternalVirtual_IsSelectable(bIgnoreSelectionState,bIgnoreGripsState,bIgnoreLocking,bIgnoreVisibility)
bool CRhinoObject::IsSelectable | ( | bool | bIgnoreSelectionState = false , |
bool | bIgnoreGripsState = false |
||
) | const |
Description: Reports if an object can be selected. Parameters: bIgnoreSelectionState - [in] (default=false) If true, then selected objects are selectable. If false, the selected objects are not selectable. bIgnoreGripsState - [in] If true, then objects with grips on can be selected. If false, then the value returned by the object's virtual IsSelectableWithGripsOn() function decides if the object can be selected. Remarks: Objects that are locked, hidden, or on locked or hidden layers cannot be selected. If IsSelectableWithGripsOn() returns false, then an that object is not selectable if it has grips turned on.
Calls the virtual function InternalVirtual_IsSelectable(bIgnoreSelectionState,bIgnoreGripsState,false,false)
bIgnoreSelectionState | true if object is capable of being selected |
|
protectedvirtual |
true if can be selected while grips are on
Reimplemented in CRhinoWidget.
int CRhinoObject::IsSelected | ( | bool | bCheckSubObjects = false | ) | const |
Description: Check selection state. Parameters: bCheckSubObjects - [in] If true and the entire object is not selected, and some subset of the object is selected, like some edges of a surface, then 3 is returned. If false and the entire object is not selected, then zero is returned. Returns: @untitled table 0 object is not selected 1 object is selected 2 entire object is selected persistently 3 one or more proper sub-objects are selected
|
virtual |
Returns true if object is a closed solid otherwise false. GetMeshes may return more than one mesh to represent a solid object.
Reimplemented in CRhinoInstanceObject, CRhinoSubDObject, CRhinoBrepObject, CRhinoExtrusionObject, CRhinoMeshObject, and CRhinoCurveObject.
|
virtual |
true if specified component is highlighted
Reimplemented in CRhinoSubDObject, CRhinoPointCloudObject, CRhinoBrepObject, CRhinoInstanceObject, CRhinoCurveObject, CRhinoGroupObject, CRhinoExtrusionObject, and CRhinoMeshObject.
bool CRhinoObject::IsSubObjectSelectable | ( | ON_COMPONENT_INDEX | component_index, |
bool | bIgnoreSelectionState = false |
||
) | const |
Description: Reports if a subobject can be selected. Parameters: component_index - [in] index of subobject to check bIgnoreSelectionState - [in] (default=false) If true, then selected objects are selectable. If false, the selected objects are not selectable. Remarks: Objects that are locked, hidden, or on locked or hidden layers cannot be selected. If IsSelectableWithGripsOn() returns false, then an that object is not selectable if it has grips turned on.
|
virtual |
Description: Check sub-object selection state. Parameters: component_index - [in] index of subobject to check Remarks: subobject cannot be persistently selected Returns: @untitled table false sub-object is not selected true sub-object is selected
Reimplemented in CRhinoSubDObject, CRhinoPointCloudObject, CRhinoBrepObject, CRhinoInstanceObject, CRhinoCurveObject, CRhinoGroupObject, CRhinoExtrusionObject, and CRhinoMeshObject.
|
overridevirtual |
bool CRhinoObject::IsVisible | ( | ) | const |
Returns true if an object is visible and is on a layer that is visible.
unsigned int CRhinoObject::LinkedInstanceDefinitionSerialNumber | ( | ) | const |
Returns: 0: The object is not part of a linked instance definition 1-1000: These numbers are reserved for future use. >1000: CRhinoDoc::m_instance_defintion_table.FindBySerialNumber() can be used to find the linked instance definition this object is part of. Remarks: The linked instance definition serial number is a runtime value. It is not saved in files and it is generally different the next time a file is read.
void CRhinoObject::Mark | ( | int | ) |
|
overridevirtual |
virtual ON_Object override
Reimplemented from ON_Object.
Reimplemented in CRhinoPointCloudObject, and CRhinoPointObject.
|
virtual |
Description: CRhinoHeaders can have several different types of meshes and different numbers of meshes. A b-rep can have a render and an analysis mesh on each face. A mesh object has a single render mesh and no analysis mesh. Curve, point, and annotation objects have no meshes. Parameters: mesh_type - [in] type of mesh to count mp - [in] if not NULL and if the object can change its mesh (like a brep), then only meshes that were created with these mesh parameters are counted. Returns: number of meshes.
Reimplemented in CRhinoBrepObject, CRhinoSubDObject, CRhinoInstanceObject, CRhinoExtrusionObject, and CRhinoMeshObject.
|
virtual |
Description: When Rhino draws the meshes returned by GetMeshes(), it gives you the opportunity to modify the display attributes for that mesh. Parameters: mesh_index - [in] index of the mesh in the meshes[] array returned by the GetMeshes() function. mesh - [in] The mesh in meshes[mesh_index]. display_attrs - [in/out] Display attributes that will be used to draw this mesh. The input values are what Rhino normally uses. You may modify them as needed. See Also: CRhinoObject::GetMeshes
Reimplemented in CRhinoSubDObject, and CRhinoBrepObject.
const ON_ModelComponent& CRhinoObject::ModelComponent | ( | ) | const |
|
overridevirtual |
Description: All objects in an opennurbs model have an id ( ON_Layer.m_layer_id, ON_Font.m_font_id, ON_Material.m_material_id, ON_3dmObjectAttributes.m_uuid ). Returns: The id used to identify the object in the opennurbs model.
Reimplemented from ON_Object.
|
virtual |
Description: Used to change object attributes like name, layer, color, rendering material, etc.
Parameters: new_attributes - [in] new object attributes. Values are copied. bEnableUndo - [in] if true, the attribute change can be undone by calling UndoModifyAttributes(). bQuiet - [in] true to run quietly.
Example: Change the layer of an object.
int new_layer_index = ...; CRhinoObject& obj = ...;
/ copy attributes CRhinoObjectAttributes a = obj.Attributes(); / change attribute settings a.SetLayerIndex( new_layer_index ); / modify object's attributes obj.ModifyAttributes( a );
Returns: true if successful. false if the layer index, material index, or any of the group indices are invalid.
Remarks: ModifyAttributes() will not change the object's UUID. If doc.m_layer_table[new_attributes.LayerIndex()].IsDeleted() is true, the layer is automatically undeleted. If doc.m_material_table[new_attributes.RenderMaterialIndex()].IsDeleted() is true, the material is automatically undeleted.
Reimplemented in CRhinoGripObject.
const ON_wString CRhinoObject::Name | ( | ) | const |
Code that uses CRhinoObject.Name() now will not need to be modified when m_name is removed from ON_3dmObjectAttributes.
|
static |
Description: Get the runtime serial number that will be assigned to the next CRhinoObject that is created. Returns: The runtime serial number that will be assigned to the next CRhinoObject that is created. Example:
unsigned int s0 = CRhinoObject::NextRuntimeSerialNumber(); ... do a bunch of stuff unsigned int s1 = CRhinoObject::NextRuntimeSerialNumber(); ... const CRhinoObject* pObject = ...; if ( s0 <= pObject->RuntimeSerialNumber() && pObject->RuntimeSerialNumber() < s1 ) {
/ pObject was created during "... do a bunch of stuff" }
See Also: CRhinoObject::RuntimeSerialNumber()
ON_Color CRhinoObject::ObjectDrawColor | ( | bool | bIgnoreObjectState = false | ) | const |
Description: Examines the attributes and gets the color that should be used to draw a wireframe image of this object.
Parameters: bIgnoreObjectState - [in] Objects can be in one of 4 states: selected, normal, locked, and hidden. locked objects. By default, selected objects are drawn in RhinoApp().AppSettings().SelectedObjectColor(), locked objects are drawn in RhinoApp().AppSettings().LockedObjectColor(), and normal objects are drawn in the color determined by the attributes settings. If you want to ignore the object state and get the color determined by the attributes, the pass true.
Returns: wireframe image drawing color
Remarks: Objects and layers can have colors assigned to them The value of CRhinoObject::Attributes().ColorSource() determines if the object's color or the object's layer color should be used to draw the object in a normal state.
See Also:
ON_Color CRhinoObject::ObjectDrawColor | ( | const CRhinoObjectAttributes & | attributes, |
bool | bIgnoreObjectState = false |
||
) | const |
Description: Examines the attributes and gets the color that should be used to draw this object.
Parameters: attributes - [in] Source for color information...normally color information is taken from the object's attributes, however, in this case all color info will be determined base on the passed in attributes object. bIgnoreObjectState - [in] Objects can be in one of 4 states: selected, normal, locked, and hidden. locked objects. By default, selected objects are drawn in RhinoApp().AppSettings().SelectedObjectColor(), locked objects are drawn in RhinoApp().AppSettings().LockedObjectColor(), and normal objects are drawn in the color determined by the attributes settings. If you want to ignore the object state and get the color determined by the attributes, the pass true.
Returns: drawing color
Remarks: Objects and layers can have colors assigned to them The value of attributes.ColorSource() determines if the object's color or the object's layer color should be used to draw the object in a normal state.
See Also:
ON_Color CRhinoObject::ObjectDrawColor | ( | const CRhinoObjectAttributes & | attributes, |
const ON_UUID & | viewport_id, | ||
bool | bIgnoreObjectState | ||
) | const |
ON_Plane CRhinoObject::ObjectFrame | ( | const ON_COMPONENT_INDEX & | ci, |
unsigned int | objectframe_flags | ||
) | const |
const class CRhinoLayer& CRhinoObject::ObjectLayer | ( | ) | const |
Description: All objects are assigned to a layer. Returns: Layer this object is assigned to.
NOTE WELL: This layer reference may become invalid if the layer table is modified in any way. Do not use this pointer as a long term reference to a layer. See Also: CRhinoObject::Attributes
const class CRhinoLayer* CRhinoObject::ObjectLayerPtr | ( | ) | const |
const CRhinoLinetype& CRhinoObject::ObjectLinetype | ( | ) | const |
Description: All objects reference a linetype. Returns: Linetype this object is references to. ( -1 == solid/continuous)
NOTE WELL: This linetype reference may become invalid if the linetype table is modified in any way. Do not use this pointer as a long term reference to a linetype. See Also: CRhinoObject::Attributes
const CRhinoLinetype* CRhinoObject::ObjectLinetypePtr | ( | ) | const |
|
virtual |
Description: Gets the material used to render the object's front side. Parameters: plugin_id - [in] (optional) If not present, the plugin_id returned by RhinoApp().GetDefaultRenderApp() is used. Returns: A reference to a rendering material. When no material is explicitly specified, this is the default material RhinoApp().AppSettings().DefaultMaterial().
NOTE WELL: If the material table is modified, this pointer will become invalid. Do not use this pointer for saving long term reference to the material. Use the material index or id instead. See Also CRhinoObjectAttributes::ObjectMaterialRef CRhinoMaterialTable::GetMaterials CRhinoObject::ObjectMaterialRef
Reimplemented in CRhinoSubDObject.
|
virtual |
|
virtual |
This is now the preferred version of the function. This should be used to get materials component-wise in all cases.
Reimplemented in CRhinoBrepObject, and CRhinoSubDObject.
|
virtual |
|
virtual |
This version of ObjectMaterial returns the RDK material associated with an object if there is one. It directly corresponds to the function above that returns the material in the document material table.
Reimplemented in CRhinoBrepObject.
|
overridepure virtual |
Description: Returns a constant that determines the type of CRhinoObject. Returns: @untitled table ON::point_object CRhinoPointObject ON::pointset_object CRhinoPointCloudObject ON::curve_object CRhinoCurveObject ON::brep_object CRhinoBrepObject ON::mesh_object CRhinoMeshObject ON::annotation_object CRhinoAnnotation ON::light_object CRhinoLight Remarks: A brep object can be a surface or polysurface. An annotation object can be anything derived from CRhinoAnnotation.
Reimplemented from ON_Object.
Implemented in CRhinoAnnotation, CRhinoLeader, CRhinoNamedViewCameraIcon, CRhinoProxyObject, CRhinoPhantomObject, CRhinoInstanceObject, CRhinoSubDObject, CRhinoGripObject, CRhinoWidget, CRhinoMorphControl, CRhinoCageObject, CRhinoPointCloudObject, CRhinoGroupObject, CRhinoHatch, CRhinoDimension, CRhinoDetailViewObject, CRhinoBrepObject, CRhinoTextDot, CRhinoClippingPlaneObject, CRhinoMeshObject, CRhinoPointObject, CRhinoLight, CRhinoCurveObject, and CRhinoExtrusionObject.
|
virtual |
Description: Called when a user double clicks on this object. If the function returns a non-empty string, the string is interpreted as a command macro to execute.
Reimplemented in CRhinoBrepObject, CRhinoText, CRhinoTextDot, CRhinoDimOrdinate, CRhinoDimLinear, CRhinoDimAngular, CRhinoDimRadial, CRhinoLeader, and CRhinoInstanceObject.
CRhinoObject& CRhinoObject::operator= | ( | const CRhinoObject & | ) |
copies source object UUID
bool CRhinoObject::PerViewportIsVisible | ( | ON_UUID | viewport_id | ) | const |
Parameters: viewport_id - [in] If viewport_id is nil or does not identify an existing viewport, then the IsVisible() is returned. Return: true if the object is visible in the viewport.
|
virtual |
Description: Expert level tool. Should not normally be used by Rhino plug-ins. Parameters: pick_list: [in/out] If object should be picked, it is appended to the pick_list Returns: Number of items added to pick_list.
Reimplemented in CRhinoSubDObject, CRhinoBrepObject, CRhinoDimOrdinate, CRhinoCentermark, CRhinoDimLinear, CRhinoDimAngular, CRhinoDimRadial, CRhinoText, CRhinoHatch, CRhinoTextDot, CRhinoLeader, CRhinoWidget, CRhinoNamedViewCameraIcon, CRhinoInstanceObject, CRhinoPointCloudObject, CRhinoExtrusionObject, CRhinoMeshObject, CRhinoPointObject, CRhinoDetailViewObject, CRhinoLight, CRhinoClippingPlaneObject, CRhinoCurveObject, and CRhinoWireframeObject.
|
virtual |
Description: Low level tool for internal use only. See definition of CRhinoObject::PickFilter for detailed information. Remarks: This function should not be used in Rhino plug-ins.
|
virtual |
Reimplemented in CRhinoWidget.
|
virtual |
Description: Called before the object is saved to a 3dm archive so that the object pointed to by m_geometry can prepared for writing. Parameters: archive_3dm_version - [in] Version of the 3dm archive 2 = Rhino2, 3 = Rhino3, 4 = Rhino4. Returns: True if m_geometry should be saved. False otherwise.
Reimplemented in CRhinoDetailViewObject.
|
virtual |
Reimplemented in CRhinoInstanceObject, CRhinoSubDObject, CRhinoExtrusionObject, and CRhinoBrepObject.
std::shared_ptr<const RhRdk::CustomRenderMeshes::IRenderMeshes> CRhinoObject::RenderMeshes | ( | ON::mesh_type | mt, |
bool | recursive, | ||
const ON_Viewport * | vp = nullptr , |
||
const class CRhRdkObjectAncestry * | ancestry_only_for_by_parent_attributes = nullptr , |
||
const CRhinoPlugIn * | requestingPlugIn = nullptr , |
||
const CDisplayPipelineAttributes * | pAttributes = nullptr , |
||
std::shared_ptr< const RhRdk::CustomRenderMeshes::IRenderMeshes > | optional_initial_primitives = nullptr |
||
) | const |
Returns a complete set of custom render meshes (primitives) for the object. Simple version with no need for flags.
vp | The viewport being rendered. If nullptr, no support for view dependent meshes. |
recursive | True if block instances should be unpacked. Same as IManager::Flags::Recursive. |
ancestry_only_for_by_parent_attributes | The ancestry of the object - ie, block references referring to this definition. This is only used to handle ByParent attributes, and should not be used to transform geometry. For objects in the document (ie - not block objects), it's fine to pass nullptr. |
requestingPlugIn | The requesting plug-in - typically the render plug-in requesting the meshes. |
pAttributes | The display attributes currently being used - nullptr if this is production rendering. |
optional_initial_primitives | Optionally a custom set of initial primitives. If this parameter is empty, the standard render meshes for the object will be used, or an empty set of primitives will be used where they are not available. This is typically used in meshing exporters, which produce specific meshes for the output rather than using the render meshes. |
std::shared_ptr<const RhRdk::CustomRenderMeshes::IRenderMeshes> CRhinoObject::RenderMeshes | ( | ON::mesh_type | mt, |
const ON_Viewport * | vp = nullptr , |
||
const class CRhRdkObjectAncestry * | ancestry_only_for_by_parent_attributes = nullptr , |
||
ON__UINT32 * | flags = nullptr , |
||
const CRhinoPlugIn * | requestingPlugIn = nullptr , |
||
const CDisplayPipelineAttributes * | pAttributes = nullptr , |
||
std::shared_ptr< const RhRdk::CustomRenderMeshes::IRenderMeshes > | optional_initial_primitives = nullptr |
||
) | const |
Returns a complete set of custom render meshes (primitives) for the object.
vp | The viewport being rendered. If nullptr, no support for view dependent meshes. |
ancestry_only_for_by_parent_attributes | The ancestry of the object - ie, block references referring to this definition. This is only used to handle ByParent attributes, and should not be used to transform geometry. For objects in the document (ie - not block objects), it's fine to pass nullptr. |
flags | See RhRdk::CustomRenderMeshes::IManager::Flags. If nullptr, assumed to be Flags::None and no support for returning flags. |
requestingPlugIn | The requesting plug-in - typically the render plug-in requesting the meshes. |
pAttributes | The display attributes currently being used - nullptr if this is production rendering. |
optional_initial_primitives | Optionally a custom set of initial primitives. If this parameter is empty, the standard render meshes for the object will be used, or an empty set of primitives will be used where they are not available. This is typically used in meshing exporters, which produce specific meshes for the output rather than using the render meshes. |
unsigned int CRhinoObject::RuntimeSerialNumber | ( | ) | const |
Description: The CRhinoObject runtime serial number is a value >= 1 that and is unique for each instance of a CRhinoObject class in a given instance of the Rhino.exe application. The first CRhinoObject created has serial number 1. The serial number can be used to identify find and identify Rhino objects and is a fast and robust way to specify a rhino object (as opposed to passing around a CRhinoObject pointer or reference). A value of 0 is unset and never identifies an object. See Also: CRhinoObject::FromSerialNumber(); Remarks: The CRhinoObject runtime serial number value is not saved in 3DM archives and is not unique between instances of Rhino.exe.
int CRhinoObject::Select | ( | bool | bSelect, |
bool | bSynchHighlight, | ||
bool | bPersistentSelect, | ||
bool | bIgnoreGripsState, | ||
bool | bIgnoreLayerLocking, | ||
bool | bIgnoreLayerVisibility | ||
) | const |
Description: Reports if an object can be selected. Parameters: bSelect - [in] (default=true) bSynchHighlight - [in] (default=true) If true, then the object is highlighted if it is selected and not highlighted if is is not selected. bPersistentSelect - [in] (default=true) Objects that are persistently selected stay selected when a command terminates. bIgnoreGripsState - [in] If true, then objects with grips on can be selected. If false, then the value returned by the object's virtual IsSelectableWithGripsOn() function decides if the object can be selected when it has grips turned on. bIgnoreLayerLocking - [in] (default=false) If true, then objects on locked layers can be selected. If false, the objects on locked layers cannot be selected. bIgnoreLayerVisibility - [in] (default=false) If true, then objects on hidden layers can be selectable. If false, the objects on hidden layers cannot be selected. Returns: 0: object is not selected 1: object is selected 2: object is selected persistently Remarks: Objects that are locked, hidden, or on locked or hidden layers cannot be selected. If IsSelectableWithGripsOn() returns false, then an that object is not selectable if it has grips turned on. See Also: CRhinoDoc::UnselectAll
int CRhinoObject::Select | ( | bool | bSelect = true , |
bool | bSynchHighlight = true , |
||
bool | bPersistentSelect = true , |
||
bool | bIgnoreGripsState = false |
||
) | const |
Description: Reports if an object can be selected. Parameters: bSelect - [in] (default=true) bSynchHighlight - [in] (default=true) If true, then the object is highlighted if it is selected and not highlighted if is is not selected. bPersistentSelect - [in] (default=true) Objects that are persistently selected stay selected when a command terminates. bIgnoreGripsState - [in] If true, then objects with grips on can be selected. If false, then the value returned by the object's virtual IsSelectableWithGripsOn() function decides if the object can be selected when it has grips turned on. Returns: 0: object is not selected 1: object is selected 2: object is selected persistently Remarks: Objects that are locked, hidden, or on locked or hidden layers cannot be selected. If IsSelectableWithGripsOn() returns false, then an that object is not selectable if it has grips turned on. See Also: CRhinoDoc::UnselectAll
|
virtual |
Description: Reports if an object can be selected. Parameters: component_index - [in] index of subobject to check bSelect - [in] (default=true) bSynchHighlight - [in] (default=true) If true, then the object is highlighted if it is selected and not highlighted if is is not selected. bPersistentSelect - [in] (default=false) Subobjects that are persistently selected stay selected when a command terminates. Returns: 0: object is not selected 1: object is selected 2: object is selected persistently Remarks: Objects that are locked, hidden, or on locked or hidden layers cannot be selected. If IsSelectableWithGripsOn() returns false, then an that object is not selectable if it has grips turned on. See Also: CRhinoDoc::UnselectAll CRhinoView::UnselectAllSubObjects
Reimplemented in CRhinoPointCloudObject, CRhinoBrepObject, CRhinoInstanceObject, CRhinoSubDObject, CRhinoCurveObject, CRhinoGroupObject, CRhinoExtrusionObject, and CRhinoMeshObject.
bool CRhinoObject::SetCachedTextureCoordinates | ( | const ON_TextureMapping & | mapping, |
const ON_Xform * | object_xform, | ||
bool | bLazy = true |
||
) | const |
Description: If the object is a mesh or has existing render meshes, then this call uses mapping to set the cached texture coordinates. Parameters: mapping - [in] Texture mapping function used to calculate the mesh's cached texture coordinates. object_xform - [in] (optional) Pass if the object has been transformed after the mapping was set.
For example, if a mapping M was used to calculate the object's texture coordinates, the object was subsequently transformed by T, and for some reason you needed to use M to recalculate the original texture coordinates, then you would pass the T as object_xform. bLazy - [in] If true, then the calculation is performed only if the current mesh texture coordinates were calculated with a different mapping. Returns: True if the object's cached texture coordinates are set. False if the the cached coordinates cannot be set (the object may not have texture coordinates, like a point, or it may not have render mesh, like a new CRhinoBrepObject, or the mapping calculation may fail.
The CRinoObject::Attributes()::m_rendering_attributes and CRhinoDoc::m_texture_mapping_table has tools to get texture mappings.
See Also: ON_TextureMapping::GetCachedTextureCoordinates ON_Mesh::SetCachedTextureCoordinates CRhinoObject::GetTextureMapping
bool CRhinoObject::SetCachedTextureCoordinatesFromPlugIn | ( | const ON_UUID & | plugin_id | ) | const |
Description: Set cached texture coordinates for all mappings that require per vertex texture texture coordinates. Includes mappings referenced by object material and sub-object materials. Parameters: plugin_id - [in] The id of the render plug-in to use to get the mapping ref. Returns: True if the object's cached texture coordinates are set. False if the the cached coordinates cannot be set (the object may not have texture coordinates, like a point, or it may not have render mesh, like a new CRhinoBrepObject, or the mapping calculation may fail. See Also: ON_TextureMapping::GetCachedTextureCoordinates ON_Mesh::SetCachedTextureCoordinates CRhinoObject::GetTextureMapping
bool CRhinoObject::SetCachedTextureCoordinatesFromPlugIn | ( | const ON_UUID & | plugin_id, |
const ON_SimpleArray< ON_TextureMapping::TYPE > & | mappings_to_cache | ||
) | const |
Description: Set cached texture coordinates for mappings listed in the array 'mappings_to_cache'. Includes mappings referenced by object material and sub-object materials. Parameters: plugin_id - [in] The id of the render plug-in to use to get the mapping ref. mappings_to_cache - [in] An array indicating which types of mappings that should be cached. If the array is empty, all found mappings will be cached. Returns: True if the object's cached texture coordinates are set. False if the the cached coordinates cannot be set (the object may not have texture coordinates, like a point, or it may not have render mesh, like a new CRhinoBrepObject, or the mapping calculation may fail. See Also: ON_TextureMapping::GetCachedTextureCoordinates ON_Mesh::SetCachedTextureCoordinates CRhinoObject::GetTextureMapping
void CRhinoObject::SetCopyHistoryOnReplace | ( | bool | bCopy | ) | const |
Description: Sets a flag on the object's history record (if one exists) that causes the history record to be copied and the copy applied to the new object when this object is replaced in the document. That allows some changes to be made to objects with history without breaking the history.
bool CRhinoObject::SetDynamicTransform | ( | const ON_Xform & | dynamic_xform | ) |
Description: Set the transformation currently being used. Properties: xform - [in] Returns: True if the xform is a valid and was set.
bool CRhinoObject::SetHistory | ( | class CRhinoHistory & | history | ) |
void CRhinoObject::SetObjectFrame | ( | const ON_COMPONENT_INDEX & | ci, |
const ON_Plane & | plane | ||
) |
void CRhinoObject::SetObjectFrame | ( | const ON_COMPONENT_INDEX & | ci, |
const ON_Xform & | wcs_to_ocs | ||
) |
|
virtual |
Reimplemented in CRhinoSubDObject, and CRhinoBrepObject.
|
virtual |
Description: If the object is a mesh or has existing render meshes, then this call uses mapping to set the texture coordinates. Parameters: mapping - [in] Texture mapping function used to calculate the mesh's texture coordinates. object_xform - [in] (optional) Pass if the object has been transformed after the mapping was set.
For example, if a mapping M was used to calculate the object's texture coordinates, the object was subsequently transformed by T, and for some reason you needed to use M to recalculate the original texture coordinates, then you would pass the T as object_xform. bLazy - [in] If true, then the calculation is performed only if the current mesh texture coordinates were calculated with a different mapping. Returns: True if the object's texture coordinates are set. False if the the coordinates cannot be set (the object may not have texture coordinates, like a point, or it may not have render mesh, like a new CRhinoBrepObject, or the mapping calculation may fail.
The CRinoObject::Attributes()::m_rendering_attributes and CRhinoDoc::m_texture_mapping_table has tools to get texture mappings.
See Also: ON_TextureMapping::GetTextureCoordinates ON_Mesh::SetTextureCoordinates CRhinoObject::GetTextureMapping
Reimplemented in CRhinoSubDObject, CRhinoBrepObject, CRhinoExtrusionObject, and CRhinoMeshObject.
|
virtual |
Reimplemented in CRhinoInstanceObject.
|
pure virtual |
Description: Localized short description of object like "curve", "surface", "mesh", etc.). Parameters: bPlural - [in] If true, then a plural, like "curves", "surfaces", etc., is returned. Returns: NULL terminated string.
Implemented in CRhinoText, CRhinoLeader, CRhinoSubDObject, CRhinoBrepObject, CRhinoCurveObject, CRhinoNamedViewCameraIcon, CRhinoProxyObject, CRhinoPhantomObject, CRhinoInstanceObject, CRhinoGripObject, CRhinoHatch, CRhinoPointCloudObject, CRhinoMorphControl, CRhinoDimOrdinate, CRhinoGroupObject, CRhinoMeshObject, CRhinoCageObject, CRhinoCentermark, CRhinoTextDot, CRhinoPointObject, CRhinoLight, CRhinoDimLinear, CRhinoDetailViewObject, CRhinoDimAngular, CRhinoClippingPlaneObject, CRhinoExtrusionObject, and CRhinoDimRadial.
|
overridevirtual |
returns number of bytes used by this particular instance
Reimplemented from ON_Object.
Reimplemented in CRhinoSubDObject.
|
virtual |
Description: Low level tool for internal use only. See definition of CRhinoObject::SnapTo for detailed information. Remarks: This function should not be used in Rhino plug-ins.
Reimplemented in CRhinoSubDObject, CRhinoGripObject, CRhinoPointCloudObject, CRhinoBrepObject, CRhinoPointObject, CRhinoCurveObject, CRhinoNamedViewCameraIcon, CRhinoInstanceObject, CRhinoText, CRhinoHatch, CRhinoDimOrdinate, CRhinoExtrusionObject, CRhinoCentermark, CRhinoMeshObject, CRhinoDimLinear, CRhinoTextDot, CRhinoDetailViewObject, CRhinoLight, CRhinoDimAngular, CRhinoClippingPlaneObject, CRhinoDimRadial, CRhinoWireframeObject, and CRhinoLeader.
ON::active_space CRhinoObject::Space | ( | ) | const |
Returns: The space this object belongs to.
|
protectedvirtual |
returns number of highlighted subobjects
Reimplemented in CRhinoInstanceObject, CRhinoSubDObject, CRhinoPointCloudObject, CRhinoGroupObject, CRhinoCurveObject, CRhinoExtrusionObject, CRhinoMeshObject, and CRhinoBrepObject.
|
protectedvirtual |
returns number of selected subobjects
Reimplemented in CRhinoInstanceObject, CRhinoSubDObject, CRhinoPointCloudObject, CRhinoGroupObject, CRhinoCurveObject, CRhinoExtrusionObject, CRhinoMeshObject, and CRhinoBrepObject.
|
virtual |
Description: See if at least one subobject has at least on of the states specified by the status parameter. Parameters: status - [in] Set the states you want to test for.
Returns: If any subobject has a status state set to a non-default value, the corresponding state is set in the returned ON_ComponentStatus. Remarks: For the purpose of this function, ON_ON_ComponentStatus::SELECTED_STATE::selected and ON_ON_ComponentStatus::SELECTED_STATE::selected_persistent are treated as equal states.
|
virtual |
Reimplemented in CRhinoSubDObject, and CRhinoExtrusionObject.
|
protectedvirtual |
light objects are special because they are not in the geometry lists
bool CRhinoObject::UndoModifyAttributes | ( | unsigned int | ur_sn = 0 | ) |
|
virtual |
returns number of changed subobjects
Reimplemented in CRhinoInstanceObject, CRhinoSubDObject, CRhinoPointCloudObject, CRhinoCurveObject, CRhinoGroupObject, CRhinoExtrusionObject, CRhinoMeshObject, and CRhinoBrepObject.
|
virtual |
returns number of unselected subobjects
Reimplemented in CRhinoInstanceObject, CRhinoSubDObject, CRhinoPointCloudObject, CRhinoCurveObject, CRhinoGroupObject, CRhinoExtrusionObject, CRhinoMeshObject, and CRhinoBrepObject.
void CRhinoObject::UpdateBoundingBox | ( | ) |
updates CRhinoObject.m_bbox member. This function calls BoundingBox() with no viewport so it will get the bounding box wrong on annotations
|
virtual |
transformation callbacks Description: Expert user tool Called to determine if the object supports transformation in this case. The default implementation to returns true. MappingWidgets return false.
Reimplemented in CRhinoNamedViewCameraIcon.
unsigned int CRhinoObject::WorksessionReferenceModelSerialNumber | ( | ) | const |
Returns: Worksession reference model id. 0: layer is not in a reference model. 1: layer is in an unidentified worksession reference model. >1000: Serial number of the worksession reference model.
Remarks: The reference model serial number is a runtime value. It is not saved in files and it is generally different the next time a file is read.
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
used to determine if geometry is in document
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
class CRhObjectSdkExtension* CRhinoObject::m__object_sdk_extension |
const class CRhinoObjectVisualAnalysisMode* CRhinoObject::m_analysis_mode_list |
list of enabled analysis modes
|
protected |
world coordinate bounding box
world coordinate bounding box
|
mutable |
|
protected |
0 = m_geometry pointer managed with new/delete 1 = m_geometry points to a class member.
|
protected |
class CRhinoObjectGrips* CRhinoObject::m_grips |
managed by derived objects
|
protected |
History record table entry for this object. The CRhinoDoc::m_history_record_table[] manages the history record. It is common for this pointer to be NULL, in which case the object has no construction history.
|
static |
if m_no_show_mark!= 0 and m_no_show_mark == m_mark, then the IsVisible() returns false. This is used when inserting files.
unsigned char CRhinoObject::m_use_preview_mesh |
When an object like a CRhinoBrepObject is being meshed and the display code should use the preview mesh instead of the render or analysis mesh, then this flag is set to 1. Otherwise it is set to zero.