Rhino C++ API
8.18
|
#include <opennurbs_model_geometry.h>
Public Member Functions | |
ON_ModelGeometryComponent () ON_NOEXCEPT | |
ON_ModelGeometryComponent (const ON_ModelGeometryComponent &) | |
ON_ModelGeometryComponent (ON_ModelComponent::Type type) ON_NOEXCEPT | |
~ON_ModelGeometryComponent () | |
const ON_3dmObjectAttributes * | Attributes (const ON_3dmObjectAttributes *no_attributes_return_value) const |
void | Dump (ON_TextLog &text_log) const override |
class ON_3dmObjectAttributes * | ExclusiveAttributes () const |
class ON_Geometry * | ExclusiveGeometry () const |
const class ON_Geometry * | Geometry (const class ON_Geometry *no_geometry_return_value) const |
bool | IsEmpty () const |
bool | IsInstanceDefinitionGeometry () const |
ON_ModelGeometryComponent & | operator= (const ON_ModelGeometryComponent &) |
bool | UpdateReferencedComponents (const class ON_ComponentManifest &source_manifest, const class ON_ComponentManifest &destination_manifest, const class ON_ManifestMap &manifest_map) override |
![]() | |
ON_ModelComponent () ON_NOEXCEPT | |
ON_ModelComponent (const ON_ModelComponent &source) | |
ON_ModelComponent (ON_ModelComponent::Type component_type) ON_NOEXCEPT | |
ON_ModelComponent (ON_ModelComponent::Type component_type, const ON_ModelComponent &source) ON_NOEXCEPT | |
Locked status of source attributes is not copied to permit copy and modify operations. More... | |
~ON_ModelComponent ()=default | |
bool | ChangeName (const wchar_t *new_name, class ON_ComponentManifest *manifest) |
bool | ClearComponentType () |
bool | ClearId () |
bool | ClearIndex () |
unsigned int | ClearModelComponentAttributes (unsigned int attributes_filter) |
bool | ClearModelComponentStatus () |
bool | ClearModelSerialNumber () |
bool | ClearName () |
bool | ClearParentId () |
int | CompareName (const ON_UUID &other_parent_id, const wchar_t *other_name) const |
int | CompareName (const wchar_t *other_name) const |
int | CompareNameExact (const ON_UUID &other_parent_id, const wchar_t *other_name) const |
int | CompareNameExact (const wchar_t *other_name) const |
ON_ModelComponent::Type | ComponentType () const |
bool | ComponentTypeIsLocked () const |
bool | ComponentTypeIsSet () const |
ON__UINT64 | ContentVersionNumber () const |
unsigned int | CopyFrom (const ON_ModelComponent &src, unsigned int attributes_filter) |
ON__UINT32 | DataCRC (ON__UINT32 current_remainder) const override |
const ON_wString | DeletedName () const |
const ON_NameHash & | DeletedNameHash () const |
bool | DeletedNameIsSet () const |
bool | DeleteName () |
bool | EraseIdentification (bool bIgnoreLocks) |
const wchar_t * | GetName (ON_wString &component_name) const |
const ON_UUID & | Id () const |
bool | IdIsLocked () const |
bool | IdIsNil () const |
bool | IdIsNotNil () const |
bool | IdIsSet () const |
const ON_UUID & | IfIdIsNilSetId () |
int | Index () const |
int | Index (int unset_index_value) const |
bool | IndexIsLocked () const |
bool | IndexIsSet () const |
unsigned int | InstanceDefinitionModelSerialNumber () const |
bool | IsDeleted () const |
bool | IsHidden () const |
bool | IsLocked () const |
bool | IsReferenceComponent () const |
bool | IsSystemComponent () const |
bool | IsValid (class ON_TextLog *text_log=nullptr) const override |
void | LockAllSettingsExceptName () |
void | LockComponentType () |
void | LockId () |
void | LockIndex () |
void | LockModelComponentStatus () |
void | LockModelSerialNumber () |
void | LockName () |
void | LockParentId () |
ON_ComponentStatus | ModelComponentStatus () const |
bool | ModelComponentStatusIsLocked () const |
bool | ModelComponentStatusIsSet () const |
ON_UUID | ModelObjectId () const override |
unsigned int | ModelSerialNumber () const |
bool | ModelSerialNumberIsLocked () const |
bool | ModelSerialNumberIsSet () const |
const ON_wString | Name () const |
const wchar_t * | NameAsPointer () const |
const ON_NameHash & | NameHash () const |
bool | NameIsEmpty () const |
bool | NameIsLocked () const |
bool | NameIsNotEmpty () const |
bool | NameIsSet () const |
const ON_NameHash | NewNameHash (const wchar_t *new_name) const |
ON_ModelComponent & | operator= (const ON_ModelComponent &source) |
const ON_UUID & | ParentId () const |
bool | ParentIdIsLocked () const |
bool | ParentIdIsNil () const |
bool | ParentIdIsNotNil () const |
bool | ParentIdIsSet () const |
bool | ReadModelComponentAttributes (class ON_BinaryArchive &archive) |
unsigned int | ReferenceModelSerialNumber () const |
ON__UINT64 | RuntimeSerialNumber () const |
const ON_UUID & | SetAndLockId () |
bool | SetAsSystemComponent () |
bool | SetAsUnsetSystemComponent () |
bool | SetComponentType (ON_ModelComponent::Type component_component_type) |
bool | SetDeletedModelComponentState (bool bDeleted, class ON_ComponentManifest *manifest) |
void | SetHiddenModelComponentState (bool bHidden) |
const ON_UUID & | SetId () |
bool | SetId (const ON_UUID &component_id) |
bool | SetIdentification (const class ON_ComponentManifestItem &manifest_item, const wchar_t *manifest_name, bool bSetId, bool bParentId, bool bSetName, bool bSetIndex) |
bool | SetIndex (int component_index) |
bool | SetLocalizedSystemComponentName (const wchar_t *system_component_localized_name) |
void | SetLockedModelComponentState (bool bLocked) |
bool | SetModelComponentStatus (ON_ComponentStatus component_status) |
bool | SetModelSerialNumber (unsigned int model_serial_number) |
bool | SetModelSerialNumber (unsigned int model_serial_number, unsigned int reference_model_serial_number, unsigned int instance_definition_model_serial_number) |
bool | SetName (const wchar_t *component_name) |
bool | SetParentId (const ON_UUID &parent_id) |
unsigned int | SizeOf () const override |
bool | UndeleteName () |
bool | WriteModelComponentAttributes (class ON_BinaryArchive &archive, unsigned int attributes_filter) const |
![]() | |
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 bool | DeleteComponents (const ON_COMPONENT_INDEX *ci_list, size_t ci_count) |
virtual void | DestroyRuntimeCache (bool bDelete=true) |
bool | DetachUserData (class ON_UserData *pUserData) |
void | EmergencyDestroy () |
class ON_UserData * | FirstUserData () const |
virtual unsigned int | GetComponentsWithSetStates (ON_ComponentStatus states_filter, bool bAllEqualStates, ON_SimpleArray< ON_COMPONENT_INDEX > &components) const |
class ON_UserData * | GetUserData (const ON_UUID &userdata_uuid) const |
bool | GetUserString (const wchar_t *key, ON_wString &string_value) const |
int | GetUserStringKeys (ON_ClassArray< ON_wString > &user_string_keys) const |
int | GetUserStrings (ON_ClassArray< ON_UserString > &user_strings) const |
bool | IsCorrupt (bool bRepair, bool bSilentError, class ON_TextLog *text_log) const |
bool | IsKindOf (const ON_ClassId *pClassId) const |
virtual void | MarkAggregateComponentStatusAsNotCurrent () const |
virtual void | MemoryRelocate () |
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_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) |
int | UserStringCount () const |
virtual bool | Write (ON_BinaryArchive &binary_archive) const |
Static Public Attributes | |
static const ON_ModelGeometryComponent | Unset |
![]() | |
static const ON_wString | NamePathSeparator |
static const ON_wString | ReferencePrefixDelimiter |
static const ON_wString | ReferencePrefixSeparator |
static const ON_ModelComponent | Unset |
*static const ON_wString WorksessionReferencePrefix *const | wchar_t |
Copyright (c) 1993-2022 Robert McNeel & Associates. All rights reserved. OpenNURBS, Rhinoceros, and Rhino3D are registered trademarks of Robert McNeel & Associates.
THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY. ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND OF MERCHANTABILITY ARE HEREBY DISCLAIMED.
For complete openNURBS copyright information see http://www.opennurbs.org. Description: Used to store geometry table object definition and attributes in an ONX_Model.
ON_ModelGeometryComponent::ON_ModelGeometryComponent | ( | ) |
ON_ModelGeometryComponent::ON_ModelGeometryComponent | ( | ON_ModelComponent::Type | type | ) |
ON_ModelGeometryComponent::~ON_ModelGeometryComponent | ( | ) |
ON_ModelGeometryComponent::ON_ModelGeometryComponent | ( | const ON_ModelGeometryComponent & | ) |
const ON_3dmObjectAttributes* ON_ModelGeometryComponent::Attributes | ( | const ON_3dmObjectAttributes * | no_attributes_return_value | ) | const |
Description: Get a pointer to attributes. The returned pointer may be shared and should not be used to modify the attributes. Parameters: no_attributes_return_value - [in] This value is returned if no attributes have been set. A good choices for this parameter's value depends on the context. Common options are nullptr, &ON_3dmObjectAttributes::Unset, &ON_3dmObjectAttributes::Default, or the model's current default attributes. Returns: The layer, rendering and other attributes for this element, or no_attributes_return_value if the attributes have not been set. See Also: ON_ModelGeometryComponent::Attributes() ON_ModelGeometryComponent::Geometry() ON_ModelGeometryComponent::ExclusiveAttributes() ON_ModelGeometryComponent::ExclusiveGeometry(); ON_ModelComponentRef::ExclusiveModelComponent(); ONX_Model::ComponentFromRuntimeSerialNumber()
|
static |
Parameters: geometry - [in] ON_Curve, ON_Surface, ON_Brep, ON_Mesh, ON_Light, annotation, detail, ... A new copy of the geometry is managed by the ON_ModelGeometryComponent class. attributes - [in] nullptr if not available. A new copy of the attributes is managed by the ON_ModelGeometryComponent class. model_geometry_component - [in] If not nullptr, this class is set. Otherwise operator new allocates an ON_ModelGeometryComponent class. Remarks: The returned ON_ModelGeometryComponent manages geometry and attributes and will eventually delete them.
|
static |
Parameters: bManageGeometry - [in] If true, geometry_object was created on the heap using operator new and the ON_ModelGeometryComponent destructor will delete geometry_object. Otherwise the expert caller is carefully managing the geometry_object instance and memory. geometry_object - [in] ON_Curve, ON_Surface, ON_Brep, ON_Mesh, ON_Light, annotation, detail, ... bManageAttributes - [in] If true, attributes is nullptr or was created on the heap using operator new and the ON_ModelGeometryComponent destructor will delete attributes. Otherwise the expert caller is carefully managing the attributes instance and memory. attributes - [in] nullptr if not available model_geometry_component - [in] If not nullptr, this class is set. Otherwise operator new allocates an ON_ModelGeometryComponent class.
|
static |
Parameters: geometry_object - [in] ON_Curve, ON_Surface, ON_Brep, ON_Mesh, ON_Light, annotation, detail, ... geometry_object was created on the heap using operator new and the ON_ModelGeometryComponent destructor will delete geometry_object. attributes - [in] attributes is nullptr or was created on the heap using operator new and the ON_ModelGeometryComponent destructor will delete attributes. model_geometry - [in] If not nullptr, this class is set. Otherwise operator new allocates an ON_ModelGeometryComponent class. Remarks: The returned ON_ModelGeometryComponent manages geometry_object and attributes and will eventually delete them.
|
overridevirtual |
Description: Creates a text dump of the object. Remarks: Dump() is intended for debugging and is not suitable for creating high quality text descriptions of an object.
The default implementations of this virtual function prints the class's name.
Reimplemented from ON_ModelComponent.
class ON_3dmObjectAttributes* ON_ModelGeometryComponent::ExclusiveAttributes | ( | ) | const |
Description: Get a pointer to attributes that can be used to modify the attributes. The returned pointer is not shared at the time it is returned and will not be shared until a copy of this ON_ModelGeometryComponent is created. Returns: If this ON_ModelGeometryComponent is the only reference to the attributes, then a pointer to the attributes is returned. Otherwise, nullptr is returned. See Also: ON_ModelGeometryComponent::Attributes() ON_ModelGeometryComponent::Geometry() ON_ModelGeometryComponent::ExclusiveAttributes() ON_ModelGeometryComponent::ExclusiveGeometry(); ON_ModelComponentRef::ExclusiveModelComponent(); ONX_Model::ComponentFromRuntimeSerialNumber()
class ON_Geometry* ON_ModelGeometryComponent::ExclusiveGeometry | ( | ) | const |
Description: Get a pointer to geometry that can be used to modify the geometry. The returned pointer is not shared at the time it is returned and will not be shared until a copy of this ON_ModelGeometryComponent is created. Returns: If this ON_ModelGeometryComponent is the only reference to the geometry, then a pointer to the geometry is returned. Otherwise, nullptr is returned. See Also: ON_ModelGeometryComponent::Attributes() ON_ModelGeometryComponent::Geometry() ON_ModelGeometryComponent::ExclusiveAttributes() ON_ModelGeometryComponent::ExclusiveGeometry(); ON_ModelComponentRef::ExclusiveModelComponent(); ONX_Model::ComponentFromRuntimeSerialNumber()
|
static |
const class ON_Geometry* ON_ModelGeometryComponent::Geometry | ( | const class ON_Geometry * | no_geometry_return_value | ) | const |
Description: Get a pointer to geometry. The returned pointer may be shared and should not be used to modify the geometry. Parameters: no_geometry_return_value - [in] This value is returned if no geometric object has been set. A good choices for this parameter's value depends on the context. Common options are nullptr. Returns: The curve, surface, annotation, detail, light, ... geometry, or no_geometry_return_value if the geometry has not been set.
If the geometry is a light, then ComponentType() will return ON_ModelComponent::Type::RenderLight.
If the geometry is set and something besides light, then ComponentType() will return ON_ModelComponent::Type::ModelGeometry. Otherwise, ComponentType() will return ON_ModelComponent::Type::ModelGeometry::Unset. See Also: ON_ModelGeometryComponent::Attributes() ON_ModelGeometryComponent::Geometry() ON_ModelGeometryComponent::ExclusiveAttributes() ON_ModelGeometryComponent::ExclusiveGeometry(); ON_ModelComponentRef::ExclusiveModelComponent(); ONX_Model::ComponentFromRuntimeSerialNumber()
bool ON_ModelGeometryComponent::IsEmpty | ( | ) | const |
bool ON_ModelGeometryComponent::IsInstanceDefinitionGeometry | ( | ) | const |
ON_ModelGeometryComponent& ON_ModelGeometryComponent::operator= | ( | const ON_ModelGeometryComponent & | ) |
|
overridevirtual |
Description: Uses the destination_manifest to update references to other components. This is typically done when a component's references came from a "source" context and are being updated to the "destination" context. For example, inserting one model into another when index, id, and name conflicts need to be resolved at the time of insertion. Parameters: source_manifest - [in] A manifest of the source context with indices and ids corresponding to the current component references. If this manifest is not available, pass ON_ComponentManifest::Empty. destination_manifest - [in] A manifest of the destination context with indices and ids corresponding to the desired component references. If this manifest is not available, pass ON_ComponentManifest::Empty. manifest_map - [in] A map from the source (current) referenced component index/id values to the destination (desired) component index/id values. Returns: True if successful. False indicates a referenced component was not found in the manifest and the reference was changed to a default value. Example: If this object is an ON_Layer, the line pattern and render material references are updated. If this object is an ON_DimStyle, the text style reference is updated. If this object is an ON_3dmObjectAttributes, the layer, material, line pattern, and group references are updated.
Reimplemented from ON_Object.
|
static |