8 #ifndef META_OCEAN_SCENEDESCRIPTION_FIELD_0D_H
9 #define META_OCEAN_SCENEDESCRIPTION_FIELD_0D_H
19 namespace SceneDescription
23 template <
typename T>
class Field0D;
107 template <
typename T>
190 template <
typename T>
197 template <
typename T>
205 template <
typename T>
211 template <
typename T>
217 template <
typename T>
223 template <
typename T>
230 template <
typename T>
234 timestamp_ = timestamp;
237 template <
typename T>
243 template <
typename T>
246 if (fieldType != field.
type() || fieldDimension != field.
dimension())
251 value_ =
dynamic_cast<const Field0D<T>&
>(field).value_;
Field0D()=default
Creates a new single value field with an undefined value.
const T & value() const
Returns the value of this field.
Definition: Field0D.h:218
T value_
Field (single) value.
Definition: Field0D.h:187
static constexpr unsigned int fieldDimension
Dimension of this single field.
Definition: Field0D.h:116
static constexpr Type fieldType
Scalar type of this single field.
Definition: Field0D.h:113
Field0D(const T &value, const Timestamp timestamp)
Creates a new single value field by a given initialization value and an explicit timestamp.
Definition: Field0D.h:198
Type type() const override
Returns the type of this field.
Definition: Field0D.h:206
Field0D(const T &value)
Creates a new single value field by a given initialization value.
Definition: Field0D.h:191
unsigned int dimension() const override
Returns the dimension of this field.
Definition: Field0D.h:212
Field * copy() const override
Returns a new instance of this field.
Definition: Field0D.h:238
void setValue(const T &value, const Timestamp timestamp)
Sets the value of this field and defines an explicit modification timestamp.
Definition: Field0D.h:231
bool assign(const Field &field) override
Assigns a field to this field if both field have the identical field type.
Definition: Field0D.h:244
void setValue(const T &value)
Sets the value of this field and changes the modification timestamp to the current time.
Definition: Field0D.h:224
This class is the base class for all scene description fields.
Definition: Field.h:36
Timestamp timestamp() const
Returns the most recent field modification timestamp.
Definition: Field.h:197
Type
Definition of scalar field types.
Definition: Field.h:43
virtual Type type() const =0
Returns the type of this field.
virtual unsigned int dimension() const =0
Returns the dimension of this field.
static constexpr Field::Type type()
Returns the scalar field type for this mapper object.
Definition: FieldTyper.h:37
This class implements a timestamp.
Definition: Timestamp.h:36
Field0D< int > SingleInt
Definition of a single field with integer value.
Definition: Field0D.h:47
Field0D< Scalar > SingleFloat
Definition of a single field with float value.
Definition: Field0D.h:41
Field0D< Rotation > SingleRotation
Definition of a single field with rotation value.
Definition: Field0D.h:71
Field0D< Vector2 > SingleVector2
Definition of a single field with 2D vector value.
Definition: Field0D.h:89
Field0D< std::string > SingleString
Definition of a single field with string value.
Definition: Field0D.h:77
Field0D< Vector4 > SingleVector4
Definition of a single field with 4D vector value.
Definition: Field0D.h:101
Field0D< RGBAColor > SingleColor
Definition of a single field with color value.
Definition: Field0D.h:35
Field0D< bool > SingleBool
Definition of a single field with boolean value.
Definition: Field0D.h:23
Field0D< Vector3 > SingleVector3
Definition of a single field with 3D vector value.
Definition: Field0D.h:95
Field0D< NodeRef > SingleNode
Definition of a single field with node value.
Definition: Field0D.h:53
Field0D< SquareMatrix3 > SingleMatrix3
Definition of a single field with 3x3 matrix value.
Definition: Field0D.h:59
Field0D< Timestamp > SingleTime
Definition of a single field with time value.
Definition: Field0D.h:83
Field0D< SquareMatrix4 > SingleMatrix4
Definition of a single field with 4x4 matrix value.
Definition: Field0D.h:65
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15