bool m_specified;
};
-inline unsigned int ContentFlags_assignable(unsigned int contentFlags)
+inline void ContentsFlagsValue_assignMasked(ContentsFlagsValue& flags, const ContentsFlagsValue& other)
{
- return contentFlags & ~CONTENTS_DETAIL;
-}
-
-inline ContentsFlagsValue ContentsFlagsValue_maskDetail(const ContentsFlagsValue& other)
-{
- return ContentsFlagsValue(other.m_surfaceFlags, ContentFlags_assignable(other.m_contentFlags), other.m_value, other.m_specified);
+ bool detail = bitfield_enabled(flags.m_contentFlags, CONTENTS_DETAIL);
+ flags = other;
+ if(detail)
+ {
+ flags.m_contentFlags = bitfield_enable(flags.m_contentFlags, CONTENTS_DETAIL);
+ }
+ else
+ {
+ flags.m_contentFlags = bitfield_disable(flags.m_contentFlags, CONTENTS_DETAIL);
+ }
}
void setFlags(const ContentsFlagsValue& flags)
{
ASSERT_MESSAGE(m_realised, "FaceShader::setFlags: flags not valid when unrealised");
- m_flags = ContentsFlagsValue_maskDetail(flags);
+ ContentsFlagsValue_assignMasked(m_flags, flags);
}
Shader* state() const
};
bool face_filtered(Face& face);
+void add_face_filter(FaceFilter& filter, int mask, bool invert = false);
void Brush_addTextureChangedCallback(const SignalHandler& callback);
void Brush_textureChanged();
template<typename Functor>
inline const Functor& Brush_ForEachFaceInstance(BrushInstance& brush, const Functor& functor)
{
- brush.forEachFaceInstance(FaceInstanceVisitAll<Functor>(functor)));
+ brush.forEachFaceInstance(FaceInstanceVisitAll<Functor>(functor));
return functor;
}
{
if(path.top().get().visible())
{
- BrushInstance* brush = Instance_getIBrush(instance);
+ BrushInstance* brush = Instance_getBrush(instance);
if(brush != 0)
{
m_functor(*brush);