23 constexpr static const char*
TypeName() noexcept {
return "ObjectDistanceMap"; }
24 virtual const char*
typeName()
const override {
return TypeName(); }
32 virtual std::string
getClassName()
const override {
return "Distance Map"; }
39 const std::shared_ptr<DistanceMap>& dmap,
40 const AffineXf3f& dmap2local,
41 bool needUpdateMesh =
true,
49 [[nodiscard]]
const std::shared_ptr<DistanceMap>&
getDistanceMap()
const {
return dmap_; }
51 [[nodiscard]]
virtual bool hasModel()
const override {
return bool( dmap_ ); }
74 std::shared_ptr<DistanceMap> dmap_;
75 AffineXf3f dmap2local_;
77 const char * saveDistanceMapFormat_{
"*.raw" };
84 const std::shared_ptr<DistanceMap>& dmap,
85 const AffineXf3f& dmap2local,
86 bool needUpdateMesh =
true,
90 void setDefaultColors_();
93 void setDefaultSceneProperties_();
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:46
#define MRMESH_CLASS
Definition MRMesh/MRMeshFwd.h:50
Definition MRObjectDistanceMap.h:13
MRMESH_API const AffineXf3f & getToWorldParameters() const
unlike the name, actually it is the transformation from distance map in local space
Definition MRObjectDistanceMap.h:54
virtual MRMESH_API Expected< std::future< Expected< void > > > serializeModel_(const std::filesystem::path &path) const override
virtual MRMESH_API void serializeFields_(Json::Value &root) const override
MRMESH_API std::shared_ptr< Mesh > calculateMesh(ProgressCallback cb={}) const
creates a grid for this object
MRMESH_API void updateMesh(const std::shared_ptr< Mesh > &mesh)
updates the grid to the current one
MRMESH_API ObjectDistanceMap()
virtual MRMESH_API std::shared_ptr< Object > clone() const override
ObjectDistanceMap(ObjectDistanceMap &&) noexcept=default
MRMESH_API Expected< void > deserializeModel_(const std::filesystem::path &path, ProgressCallback progressCb={}) override
Reads model from file.
MRMESH_API void deserializeFields_(const Json::Value &root) override
virtual MRMESH_API std::vector< std::string > getInfoLines() const override
return several info lines that can better describe the object in the UI
const std::shared_ptr< DistanceMap > & getDistanceMap() const
Definition MRObjectDistanceMap.h:49
virtual bool hasModel() const override
Definition MRObjectDistanceMap.h:51
virtual MRMESH_API std::shared_ptr< Object > shallowClone() const override
virtual MRMESH_API void swapBase_(Object &other) override
swaps this object with other
virtual MRMESH_API size_t heapBytes() const override
returns the amount of memory this object occupies on heap
virtual std::string getClassName() const override
return human readable name of subclass
Definition MRObjectDistanceMap.h:32
virtual const char * typeName() const override
Definition MRObjectDistanceMap.h:24
MRMESH_API bool setDistanceMap(const std::shared_ptr< DistanceMap > &dmap, const AffineXf3f &dmap2local, bool needUpdateMesh=true, ProgressCallback cb={})
static constexpr const char * TypeName() noexcept
Definition MRObjectDistanceMap.h:23
ObjectDistanceMap(const ObjectDistanceMap &other)=default
virtual MRMESH_API void applyScale(float scaleFactor) override
scale object size (all point positions)
Definition MRObjectMeshHolder.h:30
named object in the data model
Definition MRObject.h:60
std::function< bool(float)> ProgressCallback
Definition MRMesh/MRMeshFwd.h:576
Definition MRCameraOrientationPlugin.h:8
tl::expected< T, E > Expected
Definition MRExpected.h:58
Definition MRObject.h:246