8 #ifndef META_OCEAN_SCENEDESCRIPTION_FIELD_1D_H
9 #define META_OCEAN_SCENEDESCRIPTION_FIELD_1D_H
20 namespace SceneDescription
24 template <
typename T>
class Field1D;
108 template <
typename T>
216 template <
typename T>
223 template <
typename T>
231 template <
typename T>
238 template <
typename T>
246 template <
typename T>
252 template <
typename T>
258 template <
typename T>
264 template <
typename T>
270 template <
typename T>
277 template <
typename T>
281 timestamp_ = timestamp;
284 template <
typename T>
290 template <
typename T>
293 if (fieldType != field.
type() || fieldDimension != field.
dimension())
298 values_ =
dynamic_cast<const Field1D<T>&
>(field).values_;
This class implements all 1D fields (fields holding an array of single values).
Definition: Field1D.h:110
std::vector< T > Values
Definition of a vector holding the single values.
Definition: Field1D.h:122
void setValues(const Values &value)
Sets the values of this field and changes the timestamp to the current time.
Definition: Field1D.h:271
Values & values()
Returns the values of this field.
Definition: Field1D.h:265
static constexpr unsigned int fieldDimension
Dimension of this multi field.
Definition: Field1D.h:117
Field1D()=default
Creates a new multi value field with no value.
Values values_
Field values.
Definition: Field1D.h:213
Type type() const override
Returns the type of this field.
Definition: Field1D.h:247
unsigned int dimension() const override
Returns the dimension of this field.
Definition: Field1D.h:253
Field1D(const Values &values, const Timestamp timestamp)
Creates a new multi value field by given initilization values.
Definition: Field1D.h:239
Field1D(const Values &values)
Creates a new multi value field by given initilization values.
Definition: Field1D.h:232
Field1D(const T &value)
Creates a new multi value field by a given initialization value.
Definition: Field1D.h:217
static constexpr Type fieldType
Scalar type of this multi field.
Definition: Field1D.h:114
Field * copy() const override
Returns a new instance of this field.
Definition: Field1D.h:285
void setValues(const Values &value, const Timestamp timestamp)
Sets the values of this field and defines an explicit modification timestamp.
Definition: Field1D.h:278
bool assign(const Field &field) override
Assigns a field to this field if both field have the identical field type.
Definition: Field1D.h:291
const Values & values() const
Returns the values of this field.
Definition: Field1D.h:259
Field1D(const T &value, const Timestamp timestamp)
Creates a new multi value field by a given initialization value.
Definition: Field1D.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
Field1D< NodeRef > MultiNode
Definition of a multi field with node values.
Definition: Field1D.h:54
Field1D< Vector3 > MultiVector3
Definition of a multi field with 3D vector values.
Definition: Field1D.h:96
Field1D< int > MultiInt
Definition of a multi field with integer values.
Definition: Field1D.h:48
Field1D< bool > MultiBool
Definition of a multi field with boolean values.
Definition: Field1D.h:24
Field1D< Scalar > MultiFloat
Definition of a multi field with float values.
Definition: Field1D.h:42
Field1D< Vector2 > MultiVector2
Definition of a multi field with 2D vector values.
Definition: Field1D.h:90
Field1D< SquareMatrix3 > MultiMatrix3
Definition of a multi field with 3x3 matrix values.
Definition: Field1D.h:60
Field1D< Timestamp > MultiTime
Definition of a multi field with time values.
Definition: Field1D.h:84
Field1D< Vector4 > MultiVector4
Definition of a multi field with 4D vector values.
Definition: Field1D.h:102
Field1D< RGBAColor > MultiColor
Definition of a multi field with color values.
Definition: Field1D.h:36
Field1D< Rotation > MultiRotation
Definition of a multi field with rotation values.
Definition: Field1D.h:72
Field1D< SquareMatrix4 > MultiMatrix4
Definition of a multi field with 4x4 matrix values.
Definition: Field1D.h:66
Field1D< std::string > MultiString
Definition of a multi field with string values.
Definition: Field1D.h:78
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15