22 template <
bool IsPrimary,
typename BaseObjectType>
25 template <
bool IsPrimary>
31 const_cast<WrappedModelSubobjectPart &
>( *this ).setPointSize( IsPrimary ? target_->getPointSize() : target_->getSubfeaturePointSize() );
38 const_cast<WrappedModelSubobjectPart &
>( *this ).setGlobalAlpha( (std::uint8_t)std::clamp(
int( target_->getGlobalAlpha() * target_->getSubfeatureAlphaPoints() ), 0, 255 ) );
43 template <
bool IsPrimary>
49 const_cast<WrappedModelSubobjectPart &
>( *this ).setLineWidth( IsPrimary ? target_->getLineWidth() : target_->getSubfeatureLineWidth() );
56 const_cast<WrappedModelSubobjectPart &
>( *this ).setGlobalAlpha( (std::uint8_t)std::clamp(
int( target_->getGlobalAlpha() * target_->getSubfeatureAlphaLines() ), 0, 255 ) );
61 template <
bool IsPrimary>
68 const_cast<WrappedModelSubobjectPart &
>( *this ).setGlobalAlpha( (std::uint8_t)std::clamp(
int( target_->getGlobalAlpha() * target_->getSubfeatureAlphaMesh() ), 0, 255 ) );
77template <
bool IsPrimary,
typename BaseObjectType>
88 return target_->getFrontColorsForAllViewports( selected );
93 return target_->getBackColorsForAllViewports();
104template <
typename BaseObjectType>
115 if (
auto p = this->parent() )
118 const_cast<WrappedModelSubobject &
>( *this ).setVisibilityMask( f->getVisualizePropertyMask( FeatureVisualizePropertyType::Subfeatures ) );
121 return this->visibilityMask_;
134template <
bool IsPrimary,
typename ObjectType,
typename RenderObjectType>
144 if constexpr ( !IsPrimary )
146 if ( !this->
subobject.target_->getVisualizeProperty( FeatureVisualizePropertyType::Subfeatures, viewportId ) )
156 return Base::render( params );
163 return Base::renderPicker( params, geomId );
169template <
bool IsPrimary>
180template <
bool IsPrimary>
191template <
bool IsPrimary>
238 RenderDefaultUiObject,
240 RenderFeatureMeshComponent<true>,
242 RenderFeatureLinesComponent<false>, RenderFeaturePointsComponent<false>,
244 RenderPlaneNormalComponent,
245 RenderResetDirtyComponent
An interface class which allows feature objects to share setters and getters on their main properties...
Definition MRFeatureObject.h:93
virtual MRMESH_API const ViewportProperty< Color > & getDecorationsColorForAllViewports(bool selected) const
virtual float getLineWidth() const
Definition MRObjectLinesHolder.h:43
Definition MRObjectLines.h:11
Definition MRObjectMesh.h:11
virtual float getPointSize() const
returns size of points on screen in pixels
Definition MRObjectPointsHolder.h:75
Definition MRObjectPoints.h:11
Definition MRRenderDimensions.h:69
Definition MRRenderDimensions.h:97
Definition MRRenderDimensions.h:40
Definition MRRenderFeatureObjects.h:228
MRVIEWER_API void renderUi(const UiRenderParams ¶ms) override
MRVIEWER_API RenderCircleFeatureObject(const VisualObject &object)
Definition MRRenderFeatureObjects.h:274
MRVIEWER_API void renderUi(const UiRenderParams ¶ms) override
MRVIEWER_API RenderConeFeatureObject(const VisualObject &object)
Definition MRRenderFeatureObjects.h:264
MRVIEWER_API void renderUi(const UiRenderParams ¶ms) override
MRVIEWER_API RenderCylinderFeatureObject(const VisualObject &object)
Definition MRRenderFeatureObjects.h:136
void renderPicker(const ModelBaseRenderParams ¶ms, unsigned geomId) override
Definition MRRenderFeatureObjects.h:159
bool render(const ModelRenderParams ¶ms) override
Definition MRRenderFeatureObjects.h:152
bool shouldRender(ViewportId viewportId) const
Definition MRRenderFeatureObjects.h:141
Definition MRRenderFeatureObjects.h:182
auto & getLines()
Definition MRRenderFeatureObjects.h:186
Definition MRRenderFeatureObjects.h:193
auto & getMesh()
Definition MRRenderFeatureObjects.h:197
Definition MRRenderFeatureObjects.h:171
auto & getPoints()
Definition MRRenderFeatureObjects.h:175
Definition MRRenderFeatureObjects.h:220
MRVIEWER_API RenderLineFeatureObject(const VisualObject &object)
MRVIEWER_API std::string getObjectNameString(const VisualObject &object, ViewportId viewportId) const override
Definition MRRenderFeatureObjects.h:247
MRVIEWER_API std::string getObjectNameString(const VisualObject &object, ViewportId viewportId) const override
MRVIEWER_API RenderPlaneFeatureObject(const VisualObject &object)
Definition MRRenderFeatureObjects.h:203
MRVIEWER_API RenderPlaneNormalComponent(const VisualObject &object)
MRVIEWER_API bool render(const ModelRenderParams ¶ms) override
MRVIEWER_API void renderPicker(const ModelBaseRenderParams ¶ms, unsigned geomId) override
Definition MRRenderFeatureObjects.h:212
MRVIEWER_API RenderPointFeatureObject(const VisualObject &object)
MRVIEWER_API std::string getObjectNameString(const VisualObject &object, ViewportId viewportId) const override
Definition MRRenderFeatureObjects.h:255
MRVIEWER_API void renderUi(const UiRenderParams ¶ms) override
MRVIEWER_API RenderSphereFeatureObject(const VisualObject &object)
bool isSelected() const override
Definition MRRenderFeatureObjects.h:108
const ViewportProperty< Color > & getFrontColorsForAllViewports(bool selected=true) const override
Definition MRRenderFeatureObjects.h:124
ViewportMask visibilityMask() const override
Definition MRRenderFeatureObjects.h:113
Definition MRRenderFeatureObjects.h:79
const ViewportProperty< uint8_t > & getGlobalAlphaForAllViewports() const override
Definition MRRenderFeatureObjects.h:96
const ViewportProperty< Color > & getBackColorsForAllViewports() const override
Definition MRRenderFeatureObjects.h:91
const ViewportProperty< Color > & getFrontColorsForAllViewports(bool selected=true) const override
Definition MRRenderFeatureObjects.h:86
bool isSelected() const override
Definition MRRenderFeatureObjects.h:81
const ViewportProperty< uint8_t > & getGlobalAlphaForAllViewports() const override
returns global transparency alpha of object in all viewports
Definition MRRenderFeatureObjects.h:53
float getLineWidth() const override
Definition MRRenderFeatureObjects.h:47
const ViewportProperty< uint8_t > & getGlobalAlphaForAllViewports() const override
returns global transparency alpha of object in all viewports
Definition MRRenderFeatureObjects.h:65
const ViewportProperty< uint8_t > & getGlobalAlphaForAllViewports() const override
returns global transparency alpha of object in all viewports
Definition MRRenderFeatureObjects.h:35
float getPointSize() const override
returns size of points on screen in pixels
Definition MRRenderFeatureObjects.h:29
Definition MRRenderFeatureObjects.h:23
Definition MRIRenderObject.h:170
Definition MRRenderWrapObject.h:28
const ObjectType * target_
Definition MRRenderWrapObject.h:32
Definition MRRenderWrapObject.h:39
Definition MRViewportId.h:16
stores mask of viewport unique identifiers
Definition MRViewportId.h:38
Definition MRViewportProperty.h:17
Visual Object.
Definition MRVisualObject.h:131
virtual MRMESH_API const ViewportProperty< uint8_t > & getGlobalAlphaForAllViewports() const
returns global transparency alpha of object in all viewports
Definition MRRenderFeatureObjects.h:17
ViewportId viewportId
Definition MRIRenderObject.h:36
Definition MRIRenderObject.h:43
Mesh rendering parameters for primary rendering (as opposed to the picker).
Definition MRIRenderObject.h:51
ObjectType subobject
Definition MRRenderWrapObject.h:15
Definition MRIRenderObject.h:107