MeshLib
 
Loading...
Searching...
No Matches
MRAncillaryPoints.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 AncillaryPoints
12{
13 std::shared_ptr<ObjectPoints> obj;
14
15 AncillaryPoints() = default;
16
18 AncillaryPoints( AncillaryPoints && b ) noexcept : obj{ std::move( b.obj ) } {}
19 AncillaryPoints & operator =( AncillaryPoints && b ) { reset(); obj = std::move( b.obj ); return *this; }
20
22 explicit AncillaryPoints( Object& parent ) { make( parent ); }
23
25 MRVIEWER_API void make( Object& parent );
26
28 MRVIEWER_API void reset();
29
31 ~AncillaryPoints() { reset(); }
32
34 MRVIEWER_API void addPoint( const Vector3f& point );
35
37 MRVIEWER_API void addPoint( const Vector3f& point, const Color& color );
38
40 MRVIEWER_API void addPoints( const std::vector<Vector3f>& points );
41
43 MRVIEWER_API void addPoints( const std::vector<Vector3f>& points, const std::vector<Vector4f>& colors );
44
46 MRVIEWER_API void setDepthTest( bool depthTest );
47};
48
49} //namespace MR
named object in the data model
Definition MRObject.h:60
represents a 3-dimentional float-typed vector
Definition MRDotNet/MRVector3.h:8
Definition MRCameraOrientationPlugin.h:7
Helper class to manage ancillary visual points used by plugins.
Definition MRAncillaryPoints.h:12
MRVIEWER_API void addPoint(const Vector3f &point, const Color &color)
add ancillary point with color
AncillaryPoints(Object &parent)
Make not-pickable object, link it to parent object.
Definition MRAncillaryPoints.h:22
MRVIEWER_API void addPoints(const std::vector< Vector3f > &points, const std::vector< Vector4f > &colors)
add vector of ancillary points with colors
MRVIEWER_API void reset()
detach owned object from parent, stops owning it
~AncillaryPoints()
detach owned object from parent, stops owning it
Definition MRAncillaryPoints.h:31
AncillaryPoints(AncillaryPoints &&b) noexcept
since this uniquely owns an ancillary object, we provide only move operations, not copy
Definition MRAncillaryPoints.h:18
MRVIEWER_API void addPoints(const std::vector< Vector3f > &points)
add vector of ancillary points
MRVIEWER_API void setDepthTest(bool depthTest)
Set depth test.
MRVIEWER_API void addPoint(const Vector3f &point)
add ancillary point
MRVIEWER_API void make(Object &parent)
Make not-pickable object, link it to parent object.
std::shared_ptr< ObjectPoints > obj
Definition MRAncillaryPoints.h:13
AncillaryPoints()=default
Definition MRColor.h:9