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"
6#include <memory>
7
8namespace MR
9{
12
13
15struct MRVIEWER_CLASS AncillaryLines
16{
17 std::shared_ptr<ObjectLines> obj;
18
19 AncillaryLines() = default;
20
22 AncillaryLines( AncillaryLines && b ) noexcept = default;
23 AncillaryLines & operator =( AncillaryLines && b ) { reset(); obj = std::move( b.obj ); return *this; }
24
26 explicit AncillaryLines( Object& parent ) { make( parent ); }
27 explicit AncillaryLines( Object& parent, const Contour3f& contour ) { make( parent, contour ); }
28 explicit AncillaryLines( Object& parent, const Contours3f& contours ) { make( parent, contours ); }
29
31 MRVIEWER_API void make( Object& parent );
32 MRVIEWER_API void make( Object& parent, const Contour3f& contour );
33 MRVIEWER_API void make( Object& parent, const Contours3f& contours );
34
36 MRVIEWER_API void colorizeAxes();
37
39 MRVIEWER_API void reset();
40
42 ~AncillaryLines() { reset(); }
43
45 MRVIEWER_API void setContours( const Contours3f& contours );
46
48 MRVIEWER_API void resetContours();
49
51 MRVIEWER_API void setDepthTest( bool depthTest );
52};
53
54}
named object in the data model
Definition MRObject.h:62
AncillaryLines(Object &parent, const Contours3f &contours)
Definition MRAncillaryLines.h:28
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:26
AncillaryLines(Object &parent, const Contour3f &contour)
Definition MRAncillaryLines.h:27
std::shared_ptr< ObjectLines > obj
Definition MRAncillaryLines.h:17
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:42
MRVIEWER_API void colorizeAxes()
Assign an axis' color from the color theme to each line collinear with the axis.
MRVIEWER_API void make(Object &parent)
Make not-pickable ancillary object, link it to parent object, and set line geometry.
only for bindings generation
Definition MRCameraOrientationPlugin.h:8
Helper class to manage ancillary visual lines used by plugins.
Definition MRAncillaryLines.h:16