Rhino C++ API
8.13
|
#include <opennurbs_mesh.h>
Public Member Functions | |
ON_MeshComponentRef () | |
ON_MeshComponentRef (const class ON_Mesh *mesh, ON_COMPONENT_INDEX ci) | |
~ON_MeshComponentRef () | |
ON_COMPONENT_INDEX | ComponentIndex () const override |
int | Dimension () const override |
overrides of virtual ON_Geometry functions More... | |
void | Dump (ON_TextLog &) const override |
bool | GetBBox (double *boxmin, double *boxmax, bool bGrowBox=false) const override |
virtual ON_Geometry GetBBox override More... | |
unsigned int | GetMeshFace (const class ON_MeshFace *&mesh_face) const |
unsigned int | GetMeshTopologyEdge (const struct ON_MeshTopologyEdge *&tope) const |
unsigned int | GetMeshTopologyEdgeAndLine (const struct ON_MeshTopologyEdge *&tope, ON_Line &line) const |
unsigned int | GetMeshTopologyEdgeLine (class ON_Line &line) const |
unsigned int | GetMeshTopologyVertex (const struct ON_MeshTopologyVertex *&topv) const |
unsigned int | GetMeshTopologyVertexAndPoint (const struct ON_MeshTopologyVertex *&topv, class ON_3dPoint &point) const |
unsigned int | GetMeshTopologyVertexPoint (class ON_3dPoint &point) const |
unsigned int | GetVertexPoint (class ON_3dPoint &point) const |
bool | IsValid (class ON_TextLog *text_log=nullptr) const override |
overrides of virtual ON_Object functions More... | |
const class ON_Mesh * | Mesh () const |
const class ON_MeshFace * | MeshFace () const |
unsigned int | MeshFaceIndex () const |
const class ON_MeshNgon * | MeshNgon () const |
const class ON_MeshNgon * | MeshNgon (class ON_MeshNgonBuffer &ngon_buffer) const |
unsigned int | MeshNgonIndex () const |
const class ON_MeshTopology * | MeshTopology () const |
const struct ON_MeshTopologyEdge * | MeshTopologyEdge () const |
unsigned int | MeshTopologyEdgeIndex () const |
const struct ON_MeshTopologyVertex * | MeshTopologyVertex () const |
unsigned int | MeshTopologyVertexIndex () const |
ON::object_type | ObjectType () const override |
ON_MeshComponentRef & | operator= (const ON_MeshComponentRef &) |
void | Set (const class ON_Mesh *mesh, ON_COMPONENT_INDEX ci) |
unsigned int | SizeOf () const override |
bool | Transform (const ON_Xform &xform) override |
unsigned int | VertexIndex () const |
ON_3dPoint | VertexPoint () const |
Public Member Functions inherited from ON_Geometry | |
ON_Geometry ()=default | |
ON_Geometry (const ON_Geometry &)=default | |
~ON_Geometry ()=default | |
ON_BoundingBox | BoundingBox () const |
virtual class ON_Brep * | BrepForm (class ON_Brep *brep=nullptr) const |
virtual void | ClearBoundingBox () |
virtual bool | EvaluatePoint (const class ON_ObjRef &objref, ON_3dPoint &P) const |
bool | GetBoundingBox (ON_3dPoint &bbox_min, ON_3dPoint &bbox_max, bool bGrowBox=false) const |
bool | GetBoundingBox (ON_BoundingBox &bbox, bool bGrowBox=false) const |
virtual bool | GetTightBoundingBox (class ON_BoundingBox &tight_bbox, bool bGrowBox=false, const class ON_Xform *xform=nullptr) const |
virtual bool | HasBrepForm () const |
virtual bool | IsDeformable () const |
virtual bool | IsMorphable () const |
virtual bool | MakeDeformable () |
virtual bool | Morph (const class ON_SpaceMorph &morph) |
ON_Geometry & | operator= (const ON_Geometry &)=default |
bool | Rotate (double rotation_angle, const ON_3dVector &rotation_axis, const ON_3dPoint &rotation_center) |
bool | Rotate (double sin_angle, double cos_angle, const ON_3dVector &rotation_axis, const ON_3dPoint &rotation_center) |
bool | Scale (double scale_factor) |
virtual bool | SwapCoordinates (int i, int j) |
const ON_BoundingBox | TightBoundingBox () const |
bool | Translate (const ON_3dVector &translation_vector) |
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) |
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 () |
virtual ON_UUID | ModelObjectId () const |
void | MoveUserData (ON_Object &source_object) |
unsigned int | MoveUserData (ON_Object &source_object, ON_UUID source_userdata_item_id, ON_Object::UserDataConflictResolution userdata_conflict_resolution, bool bDeleteAllSourceItems) |
ON_Object & | operator= (const ON_Object &) |
void | PurgeUserData () |
virtual 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 int | Compare (const ON_MeshComponentRef *lhs, const ON_MeshComponentRef *rhs) |
static int | Compare2 (const ON_MeshComponentRef *const *lhs, const ON_MeshComponentRef *const *rhs) |
static int | CompareMeshPointer (const ON_MeshComponentRef *lhs, const ON_MeshComponentRef *rhs) |
Static Public Attributes | |
static const ON_MeshComponentRef | Unset |
Static Public Attributes inherited from ON_Geometry | |
const static ON_Geometry | Unset |
Additional Inherited Members | |
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 } |
ON_MeshComponentRef::ON_MeshComponentRef | ( | ) |
ON_MeshComponentRef::ON_MeshComponentRef | ( | const class ON_Mesh * | mesh, |
ON_COMPONENT_INDEX | ci | ||
) |
ON_MeshComponentRef::~ON_MeshComponentRef | ( | ) |
|
static |
Description: Dictionary compare: 1) Compare m_mesh pointer values as unsigned values 2) ON_COMPONENT_INDEX::Compare() m_mesh_ci values
|
static |
Description: Dictionary compare: 1) Compare m_mesh pointer values as unsigned values 2) ON_COMPONENT_INDEX::Compare() m_mesh_ci values
|
static |
Description: Compare m_mesh pointer values as unsigned values. Ignore m_mesh_ci values.
|
overridevirtual |
Description: Override of the virtual ON_Geometry::ComponentIndex(). Returns: A mesh component index for the face. The type is ON_COMPONENT_INDEX::mesh_face and the index is the index into the ON_Mesh.m_F[] array.
Reimplemented from ON_Geometry.
|
overridevirtual |
overrides of virtual ON_Geometry functions
Reimplemented from ON_Geometry.
|
overridevirtual |
|
overridevirtual |
virtual ON_Geometry GetBBox override
Reimplemented from ON_Geometry.
unsigned int ON_MeshComponentRef::GetMeshFace | ( | const class ON_MeshFace *& | mesh_face | ) | const |
Returns: If the component is a face or an ngon made of a single face, this returns the face. Otherwise null is returned. Remarks: The best way to write code that works with triangle, quad and ngons is to use the ON_MeshComponent::MeshNgon(ngon_buffer).
unsigned int ON_MeshComponentRef::GetMeshTopologyEdge | ( | const struct ON_MeshTopologyEdge *& | tope | ) | const |
unsigned int ON_MeshComponentRef::GetMeshTopologyEdgeAndLine | ( | const struct ON_MeshTopologyEdge *& | tope, |
ON_Line & | line | ||
) | const |
Parameters: line - [out] If the component is an edge, the 3d line is returned here. Returns: If the component is an edge, this returns the edge. Otherwise null is returned.
unsigned int ON_MeshComponentRef::GetMeshTopologyEdgeLine | ( | class ON_Line & | line | ) | const |
unsigned int ON_MeshComponentRef::GetMeshTopologyVertex | ( | const struct ON_MeshTopologyVertex *& | topv | ) | const |
Returns: If the component is a vertex and mesh topology exists or the component is a mesh topology vertex, then this returns the mesh topology vertex index. Otherwise ON_UNSET_UINT_INDEX is returned.
unsigned int ON_MeshComponentRef::GetMeshTopologyVertexAndPoint | ( | const struct ON_MeshTopologyVertex *& | topv, |
class ON_3dPoint & | point | ||
) | const |
Returns: If the component is a vertex and mesh topology exists or the component is a mesh topology vertex, then this returns the mesh topology vertex index. Otherwise ON_UNSET_UINT_INDEX is returned.
unsigned int ON_MeshComponentRef::GetMeshTopologyVertexPoint | ( | class ON_3dPoint & | point | ) | const |
Returns: If the component is a vertex and mesh topology exists or the component is a mesh topology vertex, then this returns the mesh topology vertex index. Otherwise ON_UNSET_UINT_INDEX is returned.
unsigned int ON_MeshComponentRef::GetVertexPoint | ( | class ON_3dPoint & | point | ) | const |
Parameters: point - [out] location of the vertex Returns: If the component is a vertex, this returns the vertex index. Otherwise ON_UNSET_UINT_INDEX is returned.
|
overridevirtual |
overrides of virtual ON_Object functions
Reimplemented from ON_Geometry.
const class ON_Mesh* ON_MeshComponentRef::Mesh | ( | ) | const |
Returns: The referenced mesh.
const class ON_MeshFace* ON_MeshComponentRef::MeshFace | ( | ) | const |
Returns: If the component is a face or an ngon made of a single face, this returns the face. Otherwise null is returned. Remarks: The best way to write code that works with triangle, quad and ngons is to use the ON_MeshComponent::MeshNgon(ngon_buffer).
unsigned int ON_MeshComponentRef::MeshFaceIndex | ( | ) | const |
Returns: If the component is a face or an ngon containing a single face, this returns the face index. Otherwise ON_UNSET_UINT_INDEX is returned. Remarks: The best way to write code that works with triangle, quad and ngons is to use the ON_MeshComponent::MeshNgon(ngon_buffer).
const class ON_MeshNgon* ON_MeshComponentRef::MeshNgon | ( | ) | const |
Returns: If the component is an ngon or a face in an ngon, this returns the ngon. Otherwise null is returned. Remarks: The best way to write code that works with triangle, quad and ngons is to use the ON_MeshComponent::MeshNgon(ngon_buffer).
const class ON_MeshNgon* ON_MeshComponentRef::MeshNgon | ( | class ON_MeshNgonBuffer & | ngon_buffer | ) | const |
Returns:
unsigned int ON_MeshComponentRef::MeshNgonIndex | ( | ) | const |
Returns: If the component is an ngon or a face in an ngon, this returns the ngon index. Otherwise ON_UNSET_UINT_INDEX is returned. Remarks: The best way to write code that works with triangle, quad and ngons is to use the ON_MeshComponent::MeshNgon(ngon_buffer).
const class ON_MeshTopology* ON_MeshComponentRef::MeshTopology | ( | ) | const |
Returns: If the mesh topology exists or the component references a mesh topology component, then this returns a pointer to the mesh topology. Otherwise null is returned.
const struct ON_MeshTopologyEdge* ON_MeshComponentRef::MeshTopologyEdge | ( | ) | const |
Returns: If the component is an edge, this returns the edge. Otherwise null is returned.
unsigned int ON_MeshComponentRef::MeshTopologyEdgeIndex | ( | ) | const |
Returns: If the component is a mesh topology edge, this returns the mesh topology edge index. Otherwise ON_UNSET_UINT_INDEX is returned.
const struct ON_MeshTopologyVertex* ON_MeshComponentRef::MeshTopologyVertex | ( | ) | const |
Returns: If the component is a vertex and mesh topology exists or the component is a mesh topology vertex, then this returns a pointer to the mesh topology vertex index. Otherwise null is returned.
unsigned int ON_MeshComponentRef::MeshTopologyVertexIndex | ( | ) | const |
Returns: If the component is a vertex and mesh topology exists or the component is a mesh topology vertex, then this returns the mesh topology vertex index. Otherwise ON_UNSET_UINT_INDEX is returned.
|
overridevirtual |
Description: Useful for switch statements that need to differentiate between basic object types like points, curves, surfaces, and so on.
Returns: ON::object_type enum value.
Remarks: The default implementation of this virtual function returns ON::unknown_object_type
Reimplemented from ON_Object.
ON_MeshComponentRef& ON_MeshComponentRef::operator= | ( | const ON_MeshComponentRef & | ) |
void ON_MeshComponentRef::Set | ( | const class ON_Mesh * | mesh, |
ON_COMPONENT_INDEX | ci | ||
) |
|
overridevirtual |
Returns: An estimate of the amount of memory the class uses in bytes.
Reimplemented from ON_Object.
|
overridevirtual |
Description: Transforms the object.
Parameters: xform - [in] transformation to apply to object. If xform.IsSimilarity() is zero, then you may want to call MakeSquishy() before calling Transform.
Remarks: When overriding this function, be sure to include a call to ON_Object::TransformUserData() which takes care of transforming any ON_UserData that may be attached to the object.
See Also: ON_Geometry::IsDeformable();
Remarks: Classes derived from ON_Geometry should call ON_Geometry::Transform() to handle user data transformations and then transform their definition.
Reimplemented from ON_Geometry.
unsigned int ON_MeshComponentRef::VertexIndex | ( | ) | const |
Returns: If the component is a vertex, this returns the vertex index. Otherwise ON_UNSET_UINT_INDEX is returned.
ON_3dPoint ON_MeshComponentRef::VertexPoint | ( | ) | const |
Returns: If the component is a mesh vertex or mesh topology vertex, then this returns the vertex location. Otherwise ON_3dPoint::UnsetPoint is returned.
|
static |