MeshLib
 
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 : obj{ std::move( b.obj ) } {}
20 AncillaryLines & operator =( AncillaryLines && b ) { reset(); obj = std::move( b.obj ); return *this; }
22
24 explicit AncillaryLines( Object& parent, const Contours3f& contours = {} ) { make( parent, contours ); }
25
27 MRVIEWER_API void make( Object& parent, const Contours3f& contours = {} );
28
30 MRVIEWER_API void reset();
31
33 ~AncillaryLines() { reset(); }
34
36 MRVIEWER_API void setContours( const Contours3f& contours );
37
39 MRVIEWER_API void resetContours();
40
42 MRVIEWER_API void setDepthTest( bool depthTest );
43};
44
45} // namespace MR
named object in the data model
Definition MRObject.h:60
Definition MRCameraOrientationPlugin.h:7
Contours3< float > Contours3f
Definition MRMesh/MRMeshFwd.h:284
Helper class to manage ancillary visual lines used by plugins.
Definition MRAncillaryLines.h:13
AncillaryLines(AncillaryLines &&b) noexcept
since this uniquely owns an ancillary object, we provide only move operations, not copy
Definition MRAncillaryLines.h:19
AncillaryLines()=default
AncillaryLines(Object &parent, const Contours3f &contours={})
Make not-pickable ancillary object, link it to parent object, and set line geometry.
Definition MRAncillaryLines.h:24
std::shared_ptr< ObjectLines > obj
Definition MRAncillaryLines.h:14
MRVIEWER_API void setDepthTest(bool depthTest)
Set depth test.
MRVIEWER_API void resetContours()
Reset line geometry.
MRVIEWER_API void reset()
detach owned object from parent, stops owning it
AncillaryLines(AncillaryLines &b)=default
MRVIEWER_API void setContours(const Contours3f &contours)
Set line geometry.
~AncillaryLines()
detach owned object from parent, stops owning it
Definition MRAncillaryLines.h:33
MRVIEWER_API void make(Object &parent, const Contours3f &contours={})
Make not-pickable ancillary object, link it to parent object, and set line geometry.