MeshLib C++ Docs
Loading...
Searching...
No Matches
MRAncillaryLines.h
Go to the documentation of this file.
1#pragma once
2
3#include "exports.h"
4#include "MRMesh/MRMeshFwd.h"
5#include "MRMesh/MRVector3.h" //const Contours3f& contours = {}
6#include <memory>
7
8namespace MR
9{
10
12struct MRVIEWER_CLASS AncillaryLines
13{
14 std::shared_ptr<ObjectLines> obj;
15
16 AncillaryLines() = default;
17
19 AncillaryLines( AncillaryLines && b ) noexcept = default;
20 AncillaryLines & operator =( AncillaryLines && b ) { reset(); obj = std::move( b.obj ); return *this; }
21
23 explicit AncillaryLines( Object& parent ) { make( parent ); }
24 explicit AncillaryLines( Object& parent, const Contour3f& contour ) { make( parent, contour ); }
25 explicit AncillaryLines( Object& parent, const Contours3f& contours ) { make( parent, contours ); }
26
28 MRVIEWER_API void make( Object& parent );
29 MRVIEWER_API void make( Object& parent, const Contour3f& contour );
30 MRVIEWER_API void make( Object& parent, const Contours3f& contours );
31
33 MRVIEWER_API void reset();
34
36 ~AncillaryLines() { reset(); }
37
39 MRVIEWER_API void setContours( const Contours3f& contours );
40
42 MRVIEWER_API void resetContours();
43
45 MRVIEWER_API void setDepthTest( bool depthTest );
46};
47
48} // namespace MR
named object in the data model
Definition MRObject.h:60
Definition MRCameraOrientationPlugin.h:8
Contours3< float > Contours3f
Definition MRMesh/MRMeshFwd.h:325
Contour3< float > Contour3f
Definition MRMesh/MRMeshFwd.h:317
Helper class to manage ancillary visual lines used by plugins.
Definition MRAncillaryLines.h:13
AncillaryLines(Object &parent, const Contours3f &contours)
Definition MRAncillaryLines.h:25
AncillaryLines()=default
MRVIEWER_API void make(Object &parent, const Contour3f &contour)
AncillaryLines(Object &parent)
Make not-pickable ancillary object, link it to parent object, and set line geometry.
Definition MRAncillaryLines.h:23
AncillaryLines(Object &parent, const Contour3f &contour)
Definition MRAncillaryLines.h:24
std::shared_ptr< ObjectLines > obj
Definition MRAncillaryLines.h:14
AncillaryLines(AncillaryLines &&b) noexcept=default
since this uniquely owns an ancillary object, we provide only move operations, not copy
MRVIEWER_API void setDepthTest(bool depthTest)
Set depth test.
MRVIEWER_API void make(Object &parent, const Contours3f &contours)
MRVIEWER_API void resetContours()
Reset line geometry.
MRVIEWER_API void reset()
detach owned object from parent, stops owning it
MRVIEWER_API void setContours(const Contours3f &contours)
Set line geometry.
~AncillaryLines()
detach owned object from parent, stops owning it
Definition MRAncillaryLines.h:36
MRVIEWER_API void make(Object &parent)
Make not-pickable ancillary object, link it to parent object, and set line geometry.