| 95 | // The base template handles `IsPrimary == true`. We have a specialization below for `false`. |
| 96 | template <bool IsPrimary, typename BaseObjectType> |
| 97 | class WrappedModelSubobject : public detail::WrappedModelSubobjectBase<IsPrimary, BaseObjectType> |
| 98 | { |
| 99 | public: |
| 100 | using detail::WrappedModelSubobjectBase<IsPrimary, BaseObjectType>::target_; |
| 101 | |
| 102 | const ViewportProperty<Color>& getFrontColorsForAllViewports( bool selected = true ) const override |
| 103 | { |
| 104 | return target_->getFrontColorsForAllViewports( selected ); |
| 105 | } |
| 106 | |
| 107 | const ViewportProperty<Color>& getBackColorsForAllViewports() const override |
| 108 | { |
| 109 | return target_->getBackColorsForAllViewports(); |
| 110 | } |
| 111 | |
| 112 | const ViewportProperty<uint8_t>& getGlobalAlphaForAllViewports() const override |
| 113 | { |
| 114 | if ( IsPrimary ) |
| 115 | const_cast<WrappedModelSubobject &>( *this ).setGlobalAlpha( (std::uint8_t)std::clamp( int( target_->getGlobalAlpha() * target_->getMainFeatureAlpha() ), 0, 255 ) ); |
| 116 | return detail::WrappedModelSubobjectPart<IsPrimary, BaseObjectType>::getGlobalAlphaForAllViewports(); |
| 117 | } |
| 118 | }; |
| 119 | |
| 120 | template <typename BaseObjectType> |
| 121 | class WrappedModelSubobject<false, BaseObjectType> : public detail::WrappedModelSubobjectBase<false, BaseObjectType> |
nothing calls this directly
no test coverage detected