#include <MRVisualObject.h>
Public Member Functions | |
MRMESH_API | VisualObject () |
VisualObject (VisualObject &&)=default | |
VisualObject & | operator= (VisualObject &&)=default |
virtual | ~VisualObject ()=default |
virtual const char * | typeName () const override |
virtual std::string | getClassName () const override |
return human readable name of subclass | |
virtual MRMESH_API bool | supportsVisualizeProperty (AnyVisualizeMaskEnum type) const |
Returns true if this class supports the property type . Otherwise passing it to the functions below is illegal. | |
MRMESH_API void | setVisualizeProperty (bool value, AnyVisualizeMaskEnum type, ViewportMask viewportMask) |
set visual property in all viewports specified by the mask | |
virtual MRMESH_API void | setVisualizePropertyMask (AnyVisualizeMaskEnum type, ViewportMask viewportMask) |
set visual property mask | |
MRMESH_API bool | getVisualizeProperty (AnyVisualizeMaskEnum type, ViewportMask viewportMask) const |
returns true if the property is set at least in one viewport specified by the mask | |
virtual MRMESH_API const ViewportMask & | getVisualizePropertyMask (AnyVisualizeMaskEnum type) const |
returns mask of viewports where given property is set | |
MRMESH_API void | toggleVisualizeProperty (AnyVisualizeMaskEnum type, ViewportMask viewportMask) |
toggle visual property in all viewports specified by the mask | |
virtual MRMESH_API AllVisualizeProperties | getAllVisualizeProperties () const |
get all visualize properties masks | |
void | setAllVisualizeProperties (const AllVisualizeProperties &properties) |
set all visualize properties masks | |
void | showLabels (bool on) |
shows/hides labels | |
bool | showLabels () const |
void | showName (bool on) |
shows/hides object name in all viewports | |
bool | showName () const |
returns whether object name is shown in any viewport | |
MRMESH_API const Color & | getFrontColor (bool selected=true, ViewportId viewportId={}) const |
returns color of object when it is selected/not-selected (depending on argument) in given viewport | |
virtual MRMESH_API void | setFrontColor (const Color &color, bool selected, ViewportId viewportId={}) |
sets color of object when it is selected/not-selected (depending on argument) in given viewport | |
virtual MRMESH_API const ViewportProperty< Color > & | getFrontColorsForAllViewports (bool selected=true) const |
returns color of object when it is selected/not-selected (depending on argument) in all viewports | |
virtual MRMESH_API void | setFrontColorsForAllViewports (ViewportProperty< Color > val, bool selected=true) |
sets color of object when it is selected/not-selected (depending on argument) in all viewports | |
virtual MRMESH_API const ViewportProperty< Color > & | getBackColorsForAllViewports () const |
returns backward color of object in all viewports | |
virtual MRMESH_API void | setBackColorsForAllViewports (ViewportProperty< Color > val) |
sets backward color of object in all viewports | |
MRMESH_API const Color & | getBackColor (ViewportId viewportId={}) const |
returns backward color of object in given viewport | |
virtual MRMESH_API void | setBackColor (const Color &color, ViewportId viewportId={}) |
sets backward color of object in given viewport | |
MRMESH_API const uint8_t & | getGlobalAlpha (ViewportId viewportId={}) const |
returns global transparency alpha of object in given viewport | |
virtual MRMESH_API void | setGlobalAlpha (uint8_t alpha, ViewportId viewportId={}) |
sets global transparency alpha of object in given viewport | |
virtual MRMESH_API const ViewportProperty< uint8_t > & | getGlobalAlphaForAllViewports () const |
returns global transparency alpha of object in all viewports | |
virtual MRMESH_API void | setGlobalAlphaForAllViewports (ViewportProperty< uint8_t > val) |
sets global transparency alpha of object in all viewports | |
MRMESH_API const Color & | getLabelsColor (ViewportId viewportId={}) const |
virtual MRMESH_API void | setLabelsColor (const Color &color, ViewportId viewportId={}) |
MRMESH_API const ViewportProperty< Color > & | getLabelsColorsForAllViewports () const |
virtual MRMESH_API void | setLabelsColorsForAllViewports (ViewportProperty< Color > val) |
virtual MRMESH_API void | setDirtyFlags (uint32_t mask, bool invalidateCaches=true) |
MRMESH_API uint32_t | getDirtyFlags () const |
returns current dirty flags for the object | |
MRMESH_API void | resetDirty () const |
resets all dirty flags (except for cache flags that will be reset automatically on cache update) | |
MRMESH_API Box3f | getBoundingBox () const |
returns cached bounding box of this object in local coordinates | |
virtual MRMESH_API Box3f | getWorldBox (ViewportId={}) const override |
virtual bool | getRedrawFlag (ViewportMask viewportMask) const override |
returns true if the object must be redrawn (due to dirty flags) in one of specified viewports | |
bool | isPickable (ViewportMask viewportMask=ViewportMask::any()) const |
whether the object can be picked (by mouse) in any of given viewports | |
virtual MRMESH_API void | setPickable (bool on, ViewportMask viewportMask=ViewportMask::all()) |
sets the object as can/cannot be picked (by mouse) in all of given viewports | |
const VertColors & | getVertsColorMap () const |
returns per-vertex colors of the object | |
virtual void | setVertsColorMap (VertColors vertsColorMap) |
sets per-vertex colors of the object | |
virtual void | updateVertsColorMap (VertColors &vertsColorMap) |
swaps per-vertex colors of the object with given argument | |
ColoringType | getColoringType () const |
returns the current coloring mode of the object | |
virtual MRMESH_API void | setColoringType (ColoringType coloringType) |
sets coloring mode of the object with given argument | |
virtual MRMESH_API void | copyColors (const VisualObject &src, const VertMap &thisToSrc, const FaceMap &thisToSrcFaces={}) |
copies point colors from given source object | |
float | getShininess () const |
returns the current shininess visual value | |
virtual void | setShininess (float shininess) |
sets shininess visual value of the object with given argument | |
float | getSpecularStrength () const |
returns intensity of reflections | |
virtual void | setSpecularStrength (float specularStrength) |
sets intensity of reflections | |
float | getAmbientStrength () const |
returns intensity of non-directional light | |
virtual void | setAmbientStrength (float ambientStrength) |
sets intensity of non-directional light | |
const std::vector< PositionedText > & | getLabels () const |
virtual void | setLabels (std::vector< PositionedText > labels) |
virtual MRMESH_API std::shared_ptr< Object > | clone () const override |
virtual MRMESH_API std::shared_ptr< Object > | shallowClone () const override |
virtual MRMESH_API bool | render (const ModelRenderParams &) const |
virtual MRMESH_API void | renderForPicker (const ModelBaseRenderParams &, unsigned) const |
draws this object for picking | |
virtual MRMESH_API void | renderUi (const UiRenderParams ¶ms) const |
draws this object for 2d UI | |
VisualObject (ProtectedStruct, const VisualObject &obj) | |
this ctor is public only for std::make_shared used inside clone() | |
virtual MRMESH_API size_t | heapBytes () const override |
returns the amount of memory this object occupies on heap | |
virtual MRMESH_API std::vector< std::string > | getInfoLines () const override |
return several info lines that can better describe the object in the UI | |
MRMESH_API bool | useDefaultScenePropertiesOnDeserialization () const |
MRMESH_API void | setUseDefaultScenePropertiesOnDeserialization (bool useDefaultScenePropertiesOnDeserialization) |
Public Member Functions inherited from MR::Object | |
Object ()=default | |
Object (Object &&) noexcept=default | |
Object & | operator= (Object &&) noexcept=default |
virtual | ~Object ()=default |
template<typename T > | |
T * | asType () |
template<typename T > | |
const T * | asType () const |
const std::string & | name () const |
virtual void | setName (std::string name) |
MRMESH_API std::shared_ptr< const Object > | find (const std::string_view &name) const |
finds a direct child by name | |
std::shared_ptr< Object > | find (const std::string_view &name) |
template<typename T > | |
std::shared_ptr< const T > | find () const |
finds a direct child by type | |
template<typename T > | |
std::shared_ptr< T > | find () |
template<typename T > | |
std::shared_ptr< const T > | find (const std::string_view &name) const |
finds a direct child by name and type | |
template<typename T > | |
std::shared_ptr< T > | find (const std::string_view &name) |
const AffineXf3f & | xf (ViewportId id={}, bool *isDef=nullptr) const |
virtual MRMESH_API void | setXf (const AffineXf3f &xf, ViewportId id={}) |
virtual MRMESH_API void | resetXf (ViewportId id={}) |
forgets specific transform in given viewport (or forgets all specific transforms for {} input) | |
const ViewportProperty< AffineXf3f > & | xfsForAllViewports () const |
returns xfs for all viewports, combined into a single object | |
virtual void | setXfsForAllViewports (ViewportProperty< AffineXf3f > xf) |
modifies xfs for all viewports at once | |
MRMESH_API AffineXf3f | worldXf (ViewportId id={}, bool *isDef=nullptr) const |
MRMESH_API void | setWorldXf (const AffineXf3f &xf, ViewportId id={}) |
virtual MRMESH_API void | applyScale (float scaleFactor) |
scale object size (all point positions) | |
MRMESH_API ViewportMask | globalVisibilityMask () const |
returns all viewports where this object is visible together with all its parents | |
bool | globalVisibility (ViewportMask viewportMask=ViewportMask::any()) const |
returns true if this object is visible together with all its parents in any of given viewports | |
MRMESH_API void | setGlobalVisibility (bool on, ViewportMask viewportMask=ViewportMask::any()) |
if true sets all predecessors visible, otherwise sets this object invisible | |
bool | isLocked () const |
object properties lock for UI | |
virtual void | setLocked (bool on) |
bool | isParentLocked () const |
virtual void | setParentLocked (bool lock) |
const Object * | parent () const |
returns parent object in the tree | |
Object * | parent () |
MRMESH_API bool | isAncestor (const Object *ancestor) const |
return true if given object is ancestor of this one, false otherwise | |
MRMESH_API Object * | findCommonAncestor (Object &other) |
const Object * | findCommonAncestor (const Object &other) const |
virtual MRMESH_API bool | detachFromParent () |
const std::vector< std::shared_ptr< Object > > & | children () |
an object can hold other sub-objects | |
const std::vector< std::shared_ptr< const Object > > & | children () const |
virtual MRMESH_API bool | addChild (std::shared_ptr< Object > child, bool recognizedChild=true) |
virtual MRMESH_API bool | addChildBefore (std::shared_ptr< Object > newChild, const std::shared_ptr< Object > &existingChild) |
bool | removeChild (const std::shared_ptr< Object > &child) |
returns false if it was not child of this | |
virtual MRMESH_API bool | removeChild (Object *child) |
virtual MRMESH_API void | removeAllChildren () |
detaches all recognized children from this, keeping all unrecognized ones | |
MRMESH_API void | sortChildren () |
sort recognized children by name | |
virtual MRMESH_API bool | select (bool on) |
selects the object, returns true if value changed, otherwise returns false | |
virtual bool | isSelected () const |
virtual MRMESH_API void | setAncillary (bool ancillary) |
bool | isAncillary () const |
MRMESH_API void | setVisible (bool on, ViewportMask viewportMask=ViewportMask::all()) |
sets the object visible in the viewports specified by the mask (by default in all viewports) | |
bool | isVisible (ViewportMask viewportMask=ViewportMask::any()) const |
checks whether the object is visible in any of the viewports specified by the mask (by default in any viewport) | |
virtual MRMESH_API void | setVisibilityMask (ViewportMask viewportMask) |
specifies object visibility as bitmask of viewports | |
virtual ViewportMask | visibilityMask () const |
gets object visibility as bitmask of viewports | |
void | resetRedrawFlag () const |
MRMESH_API std::shared_ptr< Object > | cloneTree () const |
clones all tree of this object (except ancillary and unrecognized children) | |
MRMESH_API std::shared_ptr< Object > | shallowCloneTree () const |
MRMESH_API Expected< std::vector< std::future< Expected< void > > > > | serializeRecursive (const std::filesystem::path &path, Json::Value &root, int childId) const |
MRMESH_API Expected< void > | deserializeRecursive (const std::filesystem::path &path, const Json::Value &root, ProgressCallback progressCb={}, int *objCounter=nullptr) |
MRMESH_API void | swap (Object &other) |
MRMESH_API Box3f | getWorldTreeBox (ViewportId={}) const |
returns bounding box of this object and all children visible in given (or default) viewport in world coordinates | |
virtual bool | hasVisualRepresentation () const |
does the object have any visual representation (visible points, triangles, edges, etc.), no considering child objects | |
virtual bool | hasModel () const |
Object (ProtectedStruct, const Object &obj) | |
Public Member Functions inherited from MR::ObjectChildrenHolder | |
ObjectChildrenHolder ()=default | |
ObjectChildrenHolder (const ObjectChildrenHolder &) noexcept | |
ObjectChildrenHolder & | operator= (const ObjectChildrenHolder &) noexcept |
MRMESH_API | ObjectChildrenHolder (ObjectChildrenHolder &&) noexcept |
MRMESH_API ObjectChildrenHolder & | operator= (ObjectChildrenHolder &&) noexcept |
MRMESH_API | ~ObjectChildrenHolder () |
MRMESH_API std::shared_ptr< Object > | getSharedPtr () const |
MRMESH_API size_t | heapBytes () const |
Static Public Member Functions | |
static constexpr const char * | TypeName () noexcept |
Static Public Member Functions inherited from MR::Object | |
static constexpr const char * | TypeName () noexcept |
Protected Member Functions | |
VisualObject (const VisualObject &obj)=default | |
virtual MRMESH_API void | swapBase_ (Object &other) override |
swaps this object with other | |
virtual void | setupRenderObject_ () const |
MRMESH_API ViewportMask & | getVisualizePropertyMask_ (AnyVisualizeMaskEnum type) |
virtual MRMESH_API void | serializeFields_ (Json::Value &root) const override |
MRMESH_API void | deserializeFields_ (const Json::Value &root) override |
virtual Box3f | computeBoundingBox_ () const |
MRMESH_API void | boundingBoxToInfoLines_ (std::vector< std::string > &res) const |
adds information about bounding box in res | |
virtual MRMESH_API void | setAllVisualizeProperties_ (const AllVisualizeProperties &properties, std::size_t &pos) |
template<AnyVisualizeMaskEnumType T> | |
void | setAllVisualizePropertiesForEnum (const AllVisualizeProperties &properties, std::size_t &pos) |
template<AnyVisualizeMaskEnumType T> | |
void | getAllVisualizePropertiesForEnum (AllVisualizeProperties &properties) const |
Protected Member Functions inherited from MR::Object | |
Object (const Object &obj)=default | |
user should not be able to call copy implicitly, use clone() function instead | |
virtual MRMESH_API void | swapSignals_ (Object &other) |
virtual MRMESH_API Expected< std::future< Expected< void > > > | serializeModel_ (const std::filesystem::path &path) const |
virtual MRMESH_API Expected< void > | deserializeModel_ (const std::filesystem::path &path, ProgressCallback progressCb={}) |
Reads model from file. | |
virtual MRMESH_API void | propagateWorldXfChangedSignal_ () |
Additional Inherited Members | |
Public Types inherited from MR::Object | |
using | XfChangedSignal = Signal<void() > |
Public Attributes inherited from MR::Object | |
XfChangedSignal | worldXfChangedSignal |
Visual Object.
MRMESH_API MR::VisualObject::VisualObject | ( | ) |
|
default |
|
virtualdefault |
|
inline |
this ctor is public only for std::make_shared used inside clone()
|
protecteddefault |
|
protected |
adds information about bounding box in res
|
overridevirtual |
clones this object only, without its children, making new object the owner of all copied resources
Reimplemented from MR::Object.
Reimplemented in MR::AngleMeasurementObject, MR::CircleObject, MR::ConeObject, MR::CylinderObject, MR::DistanceMeasurementObject, MR::LineObject, MR::ObjectDistanceMap, MR::ObjectGcode, MR::ObjectImGuiLabel, MR::ObjectLabel, MR::ObjectLines, MR::ObjectLinesHolder, MR::ObjectMesh, MR::ObjectMeshHolder, MR::ObjectPoints, MR::ObjectPointsHolder, MR::ObjectVoxels, MR::PlaneObject, MR::PointObject, MR::RadiusMeasurementObject, and MR::SphereObject.
|
inlineprotectedvirtual |
Reimplemented in MR::ObjectLabel, MR::ObjectLinesHolder, MR::ObjectMeshHolder, and MR::ObjectPointsHolder.
|
virtual |
copies point colors from given source object
src | using given map |
thisToSrc |
Reimplemented in MR::ObjectMeshHolder.
|
overrideprotectedvirtual |
Reads parameters from json value
Reimplemented from MR::Object.
|
virtual |
get all visualize properties masks
Reimplemented in MR::AddVisualProperties< FeatureObject, DimensionsVisualizePropertyType::diameter >, MR::AddVisualProperties< FeatureObject, DimensionsVisualizePropertyType::diameter, DimensionsVisualizePropertyType::angle, DimensionsVisualizePropertyType::length >, MR::AddVisualProperties< FeatureObject, DimensionsVisualizePropertyType::diameter, DimensionsVisualizePropertyType::length >, MR::FeatureObject, MR::ObjectLabel, MR::ObjectLinesHolder, MR::ObjectMeshHolder, and MR::ObjectPointsHolder.
|
inlineprotected |
|
inline |
returns intensity of non-directional light
MRMESH_API const Color & MR::VisualObject::getBackColor | ( | ViewportId | viewportId = {} | ) | const |
returns backward color of object in given viewport
|
virtual |
returns backward color of object in all viewports
Reimplemented in MR::RenderFeatures::WrappedModelSubobject< IsPrimary, ObjectLines >, MR::RenderFeatures::WrappedModelSubobject< IsPrimary, ObjectMesh >, and MR::RenderFeatures::WrappedModelSubobject< IsPrimary, ObjectPoints >.
MRMESH_API Box3f MR::VisualObject::getBoundingBox | ( | ) | const |
returns cached bounding box of this object in local coordinates
|
inlineoverridevirtual |
return human readable name of subclass
Reimplemented from MR::Object.
Reimplemented in MR::AngleMeasurementObject, MR::CircleObject, MR::ConeObject, MR::CylinderObject, MR::DistanceMeasurementObject, MR::LineObject, MR::ObjectDistanceMap, MR::ObjectGcode, MR::ObjectLines, MR::ObjectMesh, MR::ObjectPoints, MR::ObjectVoxels, MR::PlaneObject, MR::PointObject, MR::RadiusMeasurementObject, and MR::SphereObject.
|
inline |
returns the current coloring mode of the object
|
inline |
returns current dirty flags for the object
MRMESH_API const Color & MR::VisualObject::getFrontColor | ( | bool | selected = true, |
ViewportId | viewportId = {} ) const |
returns color of object when it is selected/not-selected (depending on argument) in given viewport
|
virtual |
returns color of object when it is selected/not-selected (depending on argument) in all viewports
Reimplemented in MR::RenderFeatures::WrappedModelSubobject< IsPrimary, ObjectLines >, MR::RenderFeatures::WrappedModelSubobject< IsPrimary, ObjectMesh >, and MR::RenderFeatures::WrappedModelSubobject< IsPrimary, ObjectPoints >.
MRMESH_API const uint8_t & MR::VisualObject::getGlobalAlpha | ( | ViewportId | viewportId = {} | ) | const |
returns global transparency alpha of object in given viewport
|
virtual |
returns global transparency alpha of object in all viewports
Reimplemented in MR::RenderFeatures::detail::WrappedModelSubobjectPart< IsPrimary, ObjectLines >, MR::RenderFeatures::detail::WrappedModelSubobjectPart< IsPrimary, ObjectMesh >, MR::RenderFeatures::detail::WrappedModelSubobjectPart< IsPrimary, ObjectPoints >, MR::RenderFeatures::WrappedModelSubobject< IsPrimary, ObjectLines >, MR::RenderFeatures::WrappedModelSubobject< IsPrimary, ObjectMesh >, and MR::RenderFeatures::WrappedModelSubobject< IsPrimary, ObjectPoints >.
|
overridevirtual |
return several info lines that can better describe the object in the UI
Reimplemented from MR::Object.
Reimplemented in MR::AngleMeasurementObject, MR::DistanceMeasurementObject, MR::ObjectDistanceMap, MR::ObjectGcode, MR::ObjectLines, MR::ObjectMesh, MR::ObjectPoints, MR::ObjectVoxels, and MR::RadiusMeasurementObject.
|
inline |
MRMESH_API const Color & MR::VisualObject::getLabelsColor | ( | ViewportId | viewportId = {} | ) | const |
MRMESH_API const ViewportProperty< Color > & MR::VisualObject::getLabelsColorsForAllViewports | ( | ) | const |
|
inlineoverridevirtual |
returns true if the object must be redrawn (due to dirty flags) in one of specified viewports
Reimplemented from MR::Object.
Reimplemented in MR::ObjectMeshHolder.
|
inline |
returns the current shininess visual value
|
inline |
returns intensity of reflections
|
inline |
returns per-vertex colors of the object
MRMESH_API bool MR::VisualObject::getVisualizeProperty | ( | AnyVisualizeMaskEnum | type, |
ViewportMask | viewportMask ) const |
returns true if the property is set at least in one viewport specified by the mask
|
virtual |
returns mask of viewports where given property is set
Reimplemented in MR::AddVisualProperties< FeatureObject, DimensionsVisualizePropertyType::diameter >, MR::AddVisualProperties< FeatureObject, DimensionsVisualizePropertyType::diameter, DimensionsVisualizePropertyType::angle, DimensionsVisualizePropertyType::length >, MR::AddVisualProperties< FeatureObject, DimensionsVisualizePropertyType::diameter, DimensionsVisualizePropertyType::length >, MR::FeatureObject, MR::ObjectLabel, MR::ObjectLinesHolder, MR::ObjectMeshHolder, and MR::ObjectPointsHolder.
|
protected |
|
overridevirtual |
returns bounding box of this object in given viewport in world coordinates, to get world bounding box of the object with all child objects, please call Object::getWorldTreeBox method
Reimplemented from MR::Object.
Reimplemented in MR::ObjectLabel, MR::ObjectLinesHolder, MR::ObjectMeshHolder, and MR::ObjectPointsHolder.
|
nodiscardoverridevirtual |
returns the amount of memory this object occupies on heap
Reimplemented from MR::Object.
Reimplemented in MR::ObjectDistanceMap, MR::ObjectGcode, MR::ObjectLabel, MR::ObjectLinesHolder, MR::ObjectMeshHolder, MR::ObjectPointsHolder, and MR::ObjectVoxels.
|
inline |
whether the object can be picked (by mouse) in any of given viewports
|
default |
|
virtual |
draws this object for visualization Returns true if something was drawn.
|
virtual |
draws this object for picking
|
virtual |
draws this object for 2d UI
MRMESH_API void MR::VisualObject::resetDirty | ( | ) | const |
resets all dirty flags (except for cache flags that will be reset automatically on cache update)
|
overrideprotectedvirtual |
Write parameters to given Json::Value,
Reimplemented from MR::Object.
Reimplemented in MR::AngleMeasurementObject, MR::CircleObject, MR::ConeObject, MR::CylinderObject, MR::DistanceMeasurementObject, MR::FeatureObject, MR::LineObject, MR::ObjectDistanceMap, MR::ObjectGcode, MR::ObjectImGuiLabel, MR::ObjectLabel, MR::ObjectLines, MR::ObjectLinesHolder, MR::ObjectMesh, MR::ObjectMeshHolder, MR::ObjectPoints, MR::ObjectPointsHolder, MR::ObjectVoxels, MR::PlaneObject, MR::PointObject, MR::RadiusMeasurementObject, and MR::SphereObject.
|
inline |
set all visualize properties masks
|
protectedvirtual |
Reimplemented in MR::AddVisualProperties< FeatureObject, DimensionsVisualizePropertyType::diameter >, MR::AddVisualProperties< FeatureObject, DimensionsVisualizePropertyType::diameter, DimensionsVisualizePropertyType::angle, DimensionsVisualizePropertyType::length >, MR::AddVisualProperties< FeatureObject, DimensionsVisualizePropertyType::diameter, DimensionsVisualizePropertyType::length >, MR::FeatureObject, MR::ObjectLabel, MR::ObjectLinesHolder, MR::ObjectMeshHolder, and MR::ObjectPointsHolder.
|
inlineprotected |
|
inlinevirtual |
sets intensity of non-directional light
|
virtual |
sets backward color of object in given viewport
|
virtual |
sets backward color of object in all viewports
|
virtual |
sets coloring mode of the object with given argument
|
virtual |
sets some dirty flags for the object (to force its visual update)
mask | is a union of DirtyFlags flags |
invalidateCaches | whether to automatically invalidate model caches (pass false here if you manually update the caches) |
Reimplemented in MR::ObjectGcode, MR::ObjectLines, MR::ObjectLinesHolder, MR::ObjectMesh, MR::ObjectMeshHolder, MR::ObjectPoints, MR::ObjectPointsHolder, and MR::ObjectVoxels.
|
virtual |
sets color of object when it is selected/not-selected (depending on argument) in given viewport
Reimplemented in MR::ObjectGcode.
|
virtual |
sets color of object when it is selected/not-selected (depending on argument) in all viewports
|
virtual |
sets global transparency alpha of object in given viewport
|
virtual |
sets global transparency alpha of object in all viewports
|
inlinevirtual |
|
virtual |
|
virtual |
|
virtual |
sets the object as can/cannot be picked (by mouse) in all of given viewports
|
inlinevirtual |
sets shininess visual value of the object with given argument
|
inlinevirtual |
sets intensity of reflections
|
inlineprotectedvirtual |
each renderable child of VisualObject should implement this method and assign renderObj_ inside
Reimplemented in MR::AngleMeasurementObject, MR::CircleObject, MR::ConeObject, MR::CylinderObject, MR::DistanceMeasurementObject, MR::LineObject, MR::ObjectImGuiLabel, MR::ObjectLabel, MR::ObjectLinesHolder, MR::ObjectMeshHolder, MR::ObjectPointsHolder, MR::PlaneObject, MR::PointObject, MR::RadiusMeasurementObject, and MR::SphereObject.
|
inline |
set whether the scene-related properties should get their values from SceneColors and SceneSettings instances rather than from the input data on deserialization
|
inlinevirtual |
sets per-vertex colors of the object
MRMESH_API void MR::VisualObject::setVisualizeProperty | ( | bool | value, |
AnyVisualizeMaskEnum | type, | ||
ViewportMask | viewportMask ) |
set visual property in all viewports specified by the mask
|
virtual |
set visual property mask
|
overridevirtual |
clones this object only, without its children, making new object to share resources with this object
Reimplemented from MR::Object.
Reimplemented in MR::AngleMeasurementObject, MR::CircleObject, MR::ConeObject, MR::CylinderObject, MR::DistanceMeasurementObject, MR::LineObject, MR::ObjectDistanceMap, MR::ObjectGcode, MR::ObjectImGuiLabel, MR::ObjectLabel, MR::ObjectLines, MR::ObjectLinesHolder, MR::ObjectMesh, MR::ObjectMeshHolder, MR::ObjectPoints, MR::ObjectPointsHolder, MR::ObjectVoxels, MR::PlaneObject, MR::PointObject, MR::RadiusMeasurementObject, and MR::SphereObject.
|
inline |
|
inline |
shows/hides labels
|
inline |
returns whether object name is shown in any viewport
|
inline |
shows/hides object name in all viewports
|
nodiscardvirtual |
Returns true if this class supports the property type
. Otherwise passing it to the functions below is illegal.
Reimplemented in MR::AddVisualProperties< FeatureObject, DimensionsVisualizePropertyType::diameter >, MR::AddVisualProperties< FeatureObject, DimensionsVisualizePropertyType::diameter, DimensionsVisualizePropertyType::angle, DimensionsVisualizePropertyType::length >, MR::AddVisualProperties< FeatureObject, DimensionsVisualizePropertyType::diameter, DimensionsVisualizePropertyType::length >, MR::FeatureObject, MR::ObjectLinesHolder, MR::ObjectMeshHolder, and MR::ObjectPointsHolder.
|
overrideprotectedvirtual |
swaps this object with other
Reimplemented from MR::Object.
Reimplemented in MR::AngleMeasurementObject, MR::CircleObject, MR::ConeObject, MR::CylinderObject, MR::DistanceMeasurementObject, MR::LineObject, MR::ObjectDistanceMap, MR::ObjectGcode, MR::ObjectImGuiLabel, MR::ObjectLabel, MR::ObjectLines, MR::ObjectLinesHolder, MR::ObjectMesh, MR::ObjectMeshHolder, MR::ObjectPoints, MR::ObjectPointsHolder, MR::ObjectVoxels, MR::PlaneObject, MR::PointObject, MR::RadiusMeasurementObject, and MR::SphereObject.
MRMESH_API void MR::VisualObject::toggleVisualizeProperty | ( | AnyVisualizeMaskEnum | type, |
ViewportMask | viewportMask ) |
toggle visual property in all viewports specified by the mask
|
inlinestaticconstexprnoexcept |
|
inlineoverridevirtual |
Reimplemented from MR::Object.
Reimplemented in MR::AngleMeasurementObject, MR::CircleObject, MR::ConeObject, MR::CylinderObject, MR::DistanceMeasurementObject, MR::LineObject, MR::ObjectDistanceMap, MR::ObjectGcode, MR::ObjectImGuiLabel, MR::ObjectLabel, MR::ObjectLines, MR::ObjectLinesHolder, MR::ObjectMesh, MR::ObjectMeshHolder, MR::ObjectPoints, MR::ObjectPointsHolder, MR::ObjectVoxels, MR::PlaneObject, MR::PointObject, MR::RadiusMeasurementObject, and MR::SphereObject.
|
inlinevirtual |
swaps per-vertex colors of the object with given argument
|
inlinenodiscard |
whether the scene-related properties should get their values from SceneColors and SceneSettings instances rather than from the input data on deserialization
|
protected |
|
protected |
|
protected |
Visualization options Each option is a binary mask specifying on which viewport each option is set. When using a single viewport, standard boolean can still be used for simplicity.
|
protected |
Main coloring options.
|
protected |
|
protected |
|
mutableprotected |
|
protected |
|
protected |
invert mesh normals
|
protected |
|
protected |
|
protected |
enable picking by gl
|
mutableprotected |
|
protected |
|
protected |
specular exponent
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |