Rhino C++ API
8.14
|
#include <opennurbs_mesh.h>
Public Member Functions | |
ON_MeshRef () ON_NOEXCEPT | |
ON_MeshRef (const ON_MeshRef &src) ON_NOEXCEPT | |
~ON_MeshRef () | |
void | Clear () |
class ON_Mesh & | CopyMesh (const ON_Mesh &src) |
class ON_Mesh & | CopyMesh (const ON_MeshRef &src) |
bool | IsEmpty () const |
bool | IsNotEmpty () const |
const class ON_Mesh & | Mesh () const |
class ON_Mesh & | NewMesh () |
ON_MeshRef & | operator= (const ON_MeshRef &src) |
unsigned int | ReferenceCount () const |
class ON_Mesh * | SetMeshForExperts (class ON_Mesh *&mesh) |
const std::shared_ptr< class ON_Mesh > & | SharedMesh () const |
class ON_Mesh & | UniqueMesh () |
Static Public Attributes | |
static const ON_MeshRef | Empty |
ON_MeshRef::ON_MeshRef | ( | ) |
ON_MeshRef::~ON_MeshRef | ( | ) |
ON_MeshRef::ON_MeshRef | ( | const ON_MeshRef & | src | ) |
void ON_MeshRef::Clear | ( | ) |
Description: Allocates a new ON_Mesh and has this ON_MeshRef reference it. Parameters: src - [in] The new ON_Mesh managed by this ON_MeshRef will be a copy of src. Returns: A reference to the new ON_Mesh managed by this ON_MeshRef.
class ON_Mesh& ON_MeshRef::CopyMesh | ( | const ON_MeshRef & | src | ) |
Description: Allocates a new ON_Mesh and has this ON_MeshRef reference it. Parameters: src - [in] The new ON_Mesh managed by this ON_MeshRef will be a copy of src.Mesh(). Returns: A reference to the new ON_Mesh managed by this ON_MeshRef.
bool ON_MeshRef::IsEmpty | ( | ) | const |
Returns: True if no ON_Mesh is being managed by this ON_MeshRef. Remarks: It is always the case that exactly one of IsEmpty() and IsNotEmpty() is true. Both are provided so code using ON_MeshRef can be clean and easily read.
bool ON_MeshRef::IsNotEmpty | ( | ) | const |
Returns: True if an ON_Mesh is being managed by this ON_MeshRef. Remarks: It is always the case that exactly one of IsEmpty() and IsNotEmpty() is true. Both are provided so code using ON_MeshRef can be clean and easily read.
const class ON_Mesh& ON_MeshRef::Mesh | ( | ) | const |
Returns: The mesh being managed by this ON_MeshRef. If this ON_MeshRef is not managing an ON_Mesh, then ON_Mesh::Empty is returned.
class ON_Mesh& ON_MeshRef::NewMesh | ( | ) |
Description: Allocates a new empty ON_Mesh and has this ON_MeshRef reference it.
ON_MeshRef& ON_MeshRef::operator= | ( | const ON_MeshRef & | src | ) |
unsigned int ON_MeshRef::ReferenceCount | ( | ) | const |
Returns: Number of references to the managed ON_Mesh, including the one by this ON_MeshRef.
Description: Expert user function to have this ON_MeshRef manage mesh. Parameters: mesh - [in/out] mesh must point to an ON_Mesh that was constructed on the heap using an operator new call with a public ON_Mesh constructor. Returns: a pointer to the managed mesh Example: ON_Mesh* mesh = new ON_Mesh(...); ON_MeshRef mesh_ref; ON_Mesh* managed_mesh = mesh_ref.SetMesh(mesh); / mesh = nullptr / managed_mesh = pointer you can use
const std::shared_ptr<class ON_Mesh>& ON_MeshRef::SharedMesh | ( | ) | const |
Returns: The mesh being managed by this ON_MeshRef. If this ON_MeshRef is not managing an ON_Mesh, then ON_Mesh::Empty is returned.
class ON_Mesh& ON_MeshRef::UniqueMesh | ( | ) |
Description: If ReferenceCount() > 1, then have this ON_MeshRef reference a new copy. Otherwise do nothing. The result being that this will be the unique reference to the ON_Mesh managed by this ON_MeshRef. Returns: A reference to the ON_Mesh uniquely managed by this ON_MeshRef.
|
static |