MeshLib Documentation
Loading...
Searching...
No Matches
MRAncillaryMesh.h
Go to the documentation of this file.
1#pragma once
2
3#include "exports.h"
4#include "MRMesh/MRMeshFwd.h"
5#include <memory>
6
7namespace MR
8{
9
11struct MRVIEWER_CLASS AncillaryMesh
12{
13 std::shared_ptr<ObjectMesh> obj;
14
15 AncillaryMesh() = default;
16
18 AncillaryMesh( AncillaryMesh && b ) noexcept : obj{ std::move( b.obj ) } {}
19 AncillaryMesh & operator =( AncillaryMesh && b ) { reset(); obj = std::move( b.obj ); return *this; }
20
22 explicit AncillaryMesh( Object& parent ) { make( parent ); }
23
25 MRVIEWER_API void make( Object& parent );
26
28 MRVIEWER_API void reset();
29
31 ~AncillaryMesh() { reset(); }
32};
33
34} //namespace MR
named object in the data model
Definition MRObject.h:60
Definition MRCameraOrientationPlugin.h:8
Helper class to manage ancillary visual mesh used by plugins.
Definition MRAncillaryMesh.h:12
MRVIEWER_API void make(Object &parent)
Make not-pickable object, link it to parent object.
AncillaryMesh()=default
~AncillaryMesh()
detach owned object from parent, stops owning it
Definition MRAncillaryMesh.h:31
AncillaryMesh(Object &parent)
Make not-pickable object, link it to parent object.
Definition MRAncillaryMesh.h:22
AncillaryMesh(AncillaryMesh &&b) noexcept
since this uniquely owns an ancillary object, we provide only move operations, not copy
Definition MRAncillaryMesh.h:18
MRVIEWER_API void reset()
detach owned object from parent, stops owning it
std::shared_ptr< ObjectMesh > obj
Definition MRAncillaryMesh.h:13