CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
TrVisLayerDef.h
Go to the documentation of this file.
1
2// Copyright (C) 2002-2022, Open Design Alliance (the "Alliance").
3// All rights reserved.
4//
5// This software and its documentation and related materials are owned by
6// the Alliance. The software may only be incorporated into application
7// programs owned by members of the Alliance, subject to a signed
8// Membership Agreement and Supplemental Software License Agreement with the
9// Alliance. The structure and organization of this software are the valuable
10// trade secrets of the Alliance and its suppliers. The software is also
11// protected by copyright law and international treaty provisions. Application
12// programs incorporating this software must include the following statement
13// with their copyright notices:
14//
15// This application incorporates Open Design Alliance software pursuant to a license
16// agreement with Open Design Alliance.
17// Open Design Alliance Copyright (C) 2002-2022 by Open Design Alliance.
18// All rights reserved.
19//
20// By use of this software, its documentation or related materials, you
21// acknowledge and accept the above terms.
23// GLES2 device layer definition
24
25#ifndef ODTRVISLAYERDEF
26#define ODTRVISLAYERDEF
27
28#include "TD_PackPush.h"
29
30#include "TrVisDefs.h"
31#include "OdArray.h"
32
37{
38 // Flags
40 {
41 kLyVisible = (1 << 0), // Layer is visible
42 kLyFaded = (1 << 1) // Layer is faded
43 };
44 // Layer flags
46
47 void resetLayerFlags(OdUInt16 flags = 0) { m_flags = flags; }
48
49 bool isLayerVisible() const { return GETBIT(m_flags, kLyVisible); }
50 void setLayerVisible(bool bSet) { SETBIT(m_flags, kLyVisible, bSet); }
51
52 bool isLayerFaded() const { return GETBIT(m_flags, kLyFaded); }
53 void setLayerFaded(bool bSet) { SETBIT(m_flags, kLyFaded, bSet); }
54
55 bool operator ==(const OdTrVisLayerProps &l2) const { return m_flags == l2.m_flags; }
56 bool operator !=(const OdTrVisLayerProps &l2) const { return m_flags != l2.m_flags; }
57};
58
63{
64 // Layer properties
66
68 {
70 }
71
72 OdUInt16 diff(const OdTrVisLayerDef &l2) const
73 {
74 return (m_props.m_flags ^ l2.m_props.m_flags);
75 }
77 {
78 SETBIT(m_props.m_flags, nFlag, bSet);
79 }
82};
83
84#include "TD_PackPop.h"
85
86#endif // ODTRVISLAYERDEF
unsigned short OdUInt16
#define SETBIT(flags, bit, value)
Definition: OdaDefs.h:516
#define GETBIT(flags, bit)
Definition: OdaDefs.h:517
void propSetFaded(bool bSet)
Definition: TrVisLayerDef.h:81
OdUInt16 diff(const OdTrVisLayerDef &l2) const
Definition: TrVisLayerDef.h:72
OdTrVisLayerProps m_props
Definition: TrVisLayerDef.h:65
void propagateLayerFlag(OdTrVisLayerProps::LayerPropsFlags nFlag, bool bSet)
Definition: TrVisLayerDef.h:76
void propSetVisible(bool bSet)
Definition: TrVisLayerDef.h:80
void resetLayerFlags(OdUInt16 flags=0)
Definition: TrVisLayerDef.h:47
void setLayerVisible(bool bSet)
Definition: TrVisLayerDef.h:50
bool isLayerFaded() const
Definition: TrVisLayerDef.h:52
bool isLayerVisible() const
Definition: TrVisLayerDef.h:49
bool operator==(const OdTrVisLayerProps &l2) const
Definition: TrVisLayerDef.h:55
void setLayerFaded(bool bSet)
Definition: TrVisLayerDef.h:53
bool operator!=(const OdTrVisLayerProps &l2) const
Definition: TrVisLayerDef.h:56