13 #include <tbb/spin_rw_mutex.h>
30 , myThickness(thickness)
31 , myPermeability(permeability)
32 , myPriority(priority)
44 myDepth = orig.myDepth;
45 myPermeability = orig.myPermeability;
46 myPriority = orig.myPriority;
47 myThickness = orig.myThickness;
54 return myDepth < other.myDepth;
59 return (myDepth == other.myDepth
60 && myPriority == other.myPriority
61 && myThickness == other.myThickness
62 && myPermeability == other.myPermeability);
66 return !(*
this == other);
81 : myUnderwaterVisibility(0.)
82 , mySubsurfaceLayers()
83 , myAmbientWaterTemperature(0.)
95 myUnderwaterVisibility = orig.myUnderwaterVisibility;
96 mySubsurfaceLayers = orig.mySubsurfaceLayers;
97 myAmbientWaterTemperature = orig.myAmbientWaterTemperature;
98 myPriority = orig.myPriority;
147 bool myIsRemoteComponent =
false;
150 #define THERMOCLINE_GETTER(number, Accessor, Setter) \
151 const double thermoclineLayer##number####Setter() const override \
153 const unsigned indexToUse = number - 1; \
154 DtVrfSubsurfaceLayer dummy; \
155 thermoclineLayer(indexToUse, dummy); \
156 return dummy.Accessor(); \
159 #define THERMOCLINE_SETTER(number, Accessor, Setter) \
160 void setThermoclineLayer##number####Setter( const double& Accessor ) override \
162 const unsigned indexToUse = number - 1; \
163 DtVrfSubsurfaceLayer dummy; \
164 thermoclineLayer(indexToUse, dummy); \
165 if (dummy.Accessor() != Accessor) \
167 dummy.set##Setter(Accessor); \
169 setThermoclineLayerByIndex(dummy, indexToUse); \
173 #define THERMOCLINE_SETTER_GETTER(number, Accessor, Setter) \
174 THERMOCLINE_GETTER(number, Accessor, Setter); \
175 THERMOCLINE_SETTER(number, Accessor, Setter);
179 #define NEXTFRAME_ACCESSOR_MUTATOR_(MemberType, Accessor, MutatorAndMember) \
181 const MemberType Accessor() const override { return frameState().Accessor(); }; \
182 void set##MutatorAndMember(const MemberType& v) override { if (frameState().Accessor() != v) { markModified(); frameState().set##MutatorAndMember(v); } };
Definition: stateDataTypes.h:23
virtual void removeSubsurfaceLayer(const DtVrfSubsurfaceLayer &layerToRemove)
Definition: subsurfaceStateComponent.h:142
bool operator==(const DtVrfSubsurfaceLayer &other) const
Definition: subsurfaceStateComponent.h:57
DtVrfSubsurfaceLayer(const DtVrfSubsurfaceLayer &orig)
Definition: subsurfaceStateComponent.h:36
Definition: stateComponentImplementationTemplate.h:68
Definition: stateComponent.h:269
#define NEXTFRAME_ACCESSOR_BY_REF_MUTATOR(MemberType, Accessor, MutatorAndMember)
Definition: stateComponentImplementationTemplate.h:57
DtSubsurfaceStateComponentData()
Definition: subsurfaceStateComponent.h:80
Definition: stateComponent.h:103
virtual ~DtSubsurfaceStateComponentNextFrame() override
Definition: subsurfaceStateComponent.h:193
#define THERMOCLINE_GETTER(number, Accessor, Setter)
Definition: subsurfaceStateComponent.h:150
0) Define the State Component Data. This struct replaces the legion stuff
Definition: subsurfaceStateComponent.h:78
#define CURRENTFRAME_ACCESSOR_BY_REF(MemberType, Accessor, MutatorAndMember)
Definition: stateComponentImplementationTemplate.h:64
#define CURRENTFRAME_ACCESSOR(MemberType, Accessor, MutatorAndMember)
Definition: stateComponentImplementationTemplate.h:61
bool operator<(const DtVrfSubsurfaceLayer &other) const
Definition: subsurfaceStateComponent.h:52
Definition: stateComponentImplementationTemplate.h:87
The overall structure of the DtStateData mechanism is: The DtStateData contains a list of double buff...
Definition: stateData.h:398
#define DEFINE_STATE_COMPONENT_TYPE(CreatedComponent)
Definition: stateComponent.h:231
#define NEXTFRAME_ACCESSOR_MUTATOR(MemberType, Accessor, MutatorAndMember)
Definition: stateComponentImplementationTemplate.h:49
DtSubsurfaceStateComponentCurrentFrame(DtStateData *sd)
Definition: subsurfaceStateComponent.h:235
2) Define the next frame class. This will be used for write access.
Definition: subsurfaceStateComponent.h:185
1) Define the interface class that will be used to represent the next and current frames...
Definition: subsurfaceStateComponent.h:111
DtVrfSubsurfaceLayer()
Definition: subsurfaceStateComponent.h:20
#define UNDEFINED_RETURNVALUE_ACCESSOR_MUTATOR(Type, Member, Set)
Definition: doubleBufferedDataStorage.h:53
DtSubsurfaceStateComponentNextFrame(DtStateData *sd)
Definition: subsurfaceStateComponent.h:188
DtStateComponentCreator< DtSubsurfaceStateComponentImplementation > DtSubsurfaceStateComponentCreator
5) Define the creator. This will need to be registered with the REGISTER_STATE_COMPONENT macro in the...
Definition: subsurfaceStateComponent.h:277
bool operator!=(const DtVrfSubsurfaceLayer &other) const
Definition: subsurfaceStateComponent.h:64
virtual void addSubsurfaceLayer(const DtVrfSubsurfaceLayer &layerToAdd)
Definition: subsurfaceStateComponent.h:141
DtVrfSubsurfaceLayer(double depth, double thickness, double permeability, int priority)
Definition: subsurfaceStateComponent.h:28
#define UNDEFINED_RETURNREF_ACCESSOR_MUTATOR(Type, Member, Set)
Definition: doubleBufferedDataStorage.h:57
Definition: subsurfaceStateComponent.h:18
#define ACCESSOR_MUTATOR_MEMBER(MemberType, Accessor, MutatorAndMember)
Definition: stateComponentImplementationTemplate.h:25
DtSubsurfaceStateComponentData & operator=(const DtSubsurfaceStateComponentData &orig)
Definition: subsurfaceStateComponent.h:92
#define DT_DLL_vrfStateData
This file is used to determine how to build Disable inconsistent dll linkage warning Visual Studio 6...
Definition: vrfStateDataDefines.h:26
std::multiset< DtVrfSubsurfaceLayer > DtVrfSubsurfaceLayerSet
Definition: subsurfaceStateComponent.h:74
#define THERMOCLINE_SETTER_GETTER(number, Accessor, Setter)
Definition: subsurfaceStateComponent.h:173
3) Define the current frame class. This will be used for read access.
Definition: subsurfaceStateComponent.h:232
tbb::spin_rw_mutex myMutex
Definition: subsurfaceStateComponent.h:228
DtSubsurfaceStateComponentData(const DtSubsurfaceStateComponentData &orig)
Definition: subsurfaceStateComponent.h:87
Contains the DtStateComponent class declaration.
This is a simple base class that will be used to return a pointer to current or next frame state...
Definition: stateComponent.h:294
Definition: stateComponentImplementationTemplate.h:135
ACCESSOR_MUTATOR_MEMBER(double, depth, Depth)
DtVrfSubsurfaceLayer & operator=(const DtVrfSubsurfaceLayer &orig)
Definition: subsurfaceStateComponent.h:41
void setIsRemoteComponent(bool b)
Definition: subsurfaceStateComponent.h:144