34#include <NDEVR/DesignObject.h>
35#include <NDEVR/BaseValues.h>
36#include <NDEVR/TimeSpan.h>
87 template<
class t_value_type>
90 object->m_base->effect_properties[eint01(property)]->set(object->
m_design_index, value);
97 template<NDPE t_property,
class t_value_type>
100 object->m_base->effect_properties[eint01(t_property)]->set(object->
m_design_index, value);
108 template<
class t_value_type>
111 return object->m_base->effect_properties[eint01(property)]->get<t_value_type>(
object->m_design_index);
118 template<NDPE t_property,
class t_value_type>
121 return object->m_base->effect_properties[eint01(t_property)]->get<t_value_type>(
object->m_design_index);
129 template<NDPE t_property>
143 return object->m_base->effect_properties[eint01(property)]->isSame(object->
m_design_index, value);
254#if NDEVR_STATION_MODEL
259 void setupAsStation(
const Model& station);
276 void setupAsCalibration(
const Model& calibration);
283 void setupAsScan(
const Model& scan);
321 template<
class t_type>
333 template<
class t_type>
432#if NDEVR_STATION_MODEL
497 static const bool Enum =
false;
Stores an angle in an optimized internal format with support for efficient trigonometric operations.
The equivelent of std::vector but with a bit more control.
Base information class for all design objects in the NDEVR property database.
uint04 m_design_index
Index of the parent design that owns this object.
Provides the underlying data storage for the NDEVR Scene Model hierarchy.
A core class where all Design Objects including models, materials, and geometries are stored.
DesignObject()=default
Creates an "invalid" design object.
uint04 index() const
Returns the primary row index of this object within the DesignObjectBase property table.
void set(t_property_type property, const t_type &value)
Sets a property value in the database.
A core class that provides a dynamic effect to an object in a model hierarchy.
void clearTargets()
Removes all targets from this effect.
void setTargetProperty(uint04 property_name, t_type value)
Sets a single target property value on this effect.
Effect(uint04 index, DesignObjectBase *property_table)
Constructs an Effect referencing an existing entry in the property table.
void activate()
Activates this effect so it applies during updates.
Effect()
Default constructor.
uint04 targetCount() const
Returns the number of targets this effect operates on.
bool operator==(const Effect &mat) const
Checks equality by comparing effect indices.
void addTarget(uint04 index, const DesignObject &target)
Inserts a target at a specific index.
void setupAsTransformAnimation(const Model &target, const Matrix< fltp08 > &transform, const TimeSpan &span=TimeSpan(1.0), bool hide_at_end=false)
Configures this effect as a transform animation over a time span.
void deactivate()
Deactivates this effect so it no longer applies during updates.
Buffer< DesignObject > getTargets() const
Retrieves all targets of this effect.
EffectType effectType() const
Returns the type of this effect.
Effect(DesignObjectBase *property_table)
Constructs a new Effect and appends it to the given property table.
void setupAsBoundingBox(const Model &bounds)
Configures this effect to draw a bounding box around the given model.
void setupAsLocationOperations(const Model &reference)
Configures this effect to perform location-based operations.
void setEffectType(EffectType type)
Sets the type of this effect.
void setupAsModelTile(const Model &model_tile)
Configures this effect to tile a model to fit an object.
void deleteEffect()
Deletes this effect from the design database.
void update(Time current_time, DesignObjectLookup *lock_ptr)
Updates this effect based on the current time, applying changes to all targets.
bool getBoundsRotation() const
Gets whether the bounding box is allowed to rotate with its target.
void setupAsBlinking(fltp04 frequency)
Configures this effect as a blinking effect.
EffectType
Enumerates the available effect types.
@ e_motion
Applies continuous motion (velocity and acceleration).
@ e_material_uv_color
Modifies material UV color on the target.
@ e_light
Light source effect with configurable intensity.
@ e_scan
Scan-related effect (e.g., point cloud processing).
@ e_3D_fade_out
Gradually fades a 3D object out.
@ e_azimuth_operations
Performs azimuth-based operations on the target.
@ e_material_property
Modifies a material-level property on the target.
@ e_placeholder
Placeholder effect.
@ e_tile_model_to_object
Tiles a model to fit an object.
@ e_draw_bounding_box
Draws a bounding box around target objects.
@ e_model_property
Modifies a model-level property on the target.
@ e_design_property
Modifies a design-level property on the target.
@ e_geometry_property
Modifies a geometry-level property on the target.
@ e_station
Station-based effect for survey/positioning.
@ e_3D_fade_in
Gradually fades a 3D object in.
@ e_location_operations
Performs location-based operations on the target.
@ e_set_transform
Applies a transformation matrix to the target.
void addTarget(const DesignObject &target)
Appends a target to the end of the target list.
void removeTarget(uint04 index)
Removes a target at the given index.
void setTargetProperty(uint04 property_name, t_type value_a, t_type value_b)
Sets a target property with two values (e.g., for interpolation between value_a and value_b).
void setupAsBoundingBox(const Model &bounds, const ModelBuffer &targets)
Configures this effect to draw a bounding box with multiple targets.
void setTarget(uint04 index, const DesignObject &target)
Sets a specific target at the given index.
void setupAsMotion(const Vector< 3, fltp08 > &speed, const Vector< 3, fltp08 > &acceleration, const Vector< 3, Angle< fltp08 > > &rotation_speed, const Vector< 3, Angle< fltp08 > > &rotation_acc)
Configures this effect as a motion effect with velocity and acceleration.
bool operator!=(const Effect &effect) const
Checks inequality by comparing effect indices.
DesignObject getTarget(uint04 target) const
Retrieves a specific target design object by index.
Effect(const DesignObject &object)
Constructs an Effect from an existing DesignObject.
void copyFrom(const Effect &effect)
Copies all effect properties from another Effect into this one.
void setTargets(const Buffer< DesignObject > &targets)
Replaces the entire target list with the given buffer of design objects.
void setupAsBoundingBox(const Model &bounds, const Model &target)
Configures this effect to draw a bounding box with a specific target model.
void setBoundsRotation(bool bounds_can_rotate)
Sets whether the bounding box is allowed to rotate with its target.
void setupAsLight(fltp04 intensity=1.0)
Configures this effect as a light source.
void cleanup()
Cleans up resources and state associated with this effect.
Templated logic for doing matrix multiplication.
static decltype(auto) Get(const DesignInfo *object)
Gets an effect property value using compile-time property index, with the type deduced from PropertyS...
static void Set(DesignInfo *object, NDPE property, const t_value_type &value)
Sets an effect property value on the given object using a runtime property index.
static void Set(DesignInfo *object, const t_value_type &value)
Sets an effect property value on the given object using a compile-time property index.
static decltype(auto) Get(const DesignInfo *object, NDPE property)
Gets an effect property value from the given object using a runtime property index.
static bool IsSame(const DesignInfo *object, NDPE property, const StringView &value)
Checks whether an effect property matches a given string value.
static decltype(auto) Get(const DesignInfo *object)
Gets an effect property value using compile-time property index and explicit value type.
Typed interface for getting and setting design object properties by enum.
The core String View class for the NDEVR API.
Stores a time span, or difference between two times, with an optional start time.
Represents a timestamp with utilities for manipulation and conversion.
A fixed-size array with N dimensions used as the basis for geometric and mathematical types.
The primary namespace for the NDEVR SDK.
float fltp04
Defines an alias representing a 4 byte floating-point number Bit layout is as follows: -Sign: 1 bit a...
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
double fltp08
Defines an alias representing an 8 byte floating-point number.
uint8_t uint01
-Defines an alias representing a 1 byte, unsigned integer -Can represent exact integer values 0 throu...
NDPE
NDPE - NDEVR Design Property Effect: Values stored in the effect database.
@ target_value_b
The second target property value (string-encoded), used for interpolation.
@ extra_size
An additional size parameter for the effect.
@ end_time
The time at which the effect ends.
@ is_active
Whether the effect is currently active.
@ target_value_a
The first target property value (string-encoded).
@ target_property
The property index on the target to modify.
@ effect_type
The type of effect (maps to Effect::EffectType).
@ extra_transform
An additional transformation matrix applied by the effect.
@ start_time
The time at which the effect begins.
@ destroy_when_finished
Whether to destroy the effect when it completes.
@ frequency
The frequency of the effect cycle (e.g., blink rate in Hz).
PrimitiveAlignedBuffer< Model, 16 > ModelBuffer
Aligned buffer of Model objects with 16-byte alignment.
static const uint01 Dimensions
Number of dimensional components (0 for scalar-like types).
static const bool String
Whether the type is a string.
static const bool Enum
Whether the type is an enum.
static const bool Boolean
Whether the type is a boolean.
static const bool Primitive
Whether the type is considered primitive.
static const bool Unsigned
Whether the type is unsigned.
static const bool Buffer
Whether the type is a Buffer.
static const bool Vector
Whether the type is a Vector.
static const bool Float
Whether the type is a floating-point number.
static const bool Integer
Whether the type is an integer.
static const bool Number
Whether the type is numeric.
static constexpr ObjectInfo< Effect, false, false > VectorSub()
Returns the ObjectInfo for the sub-element type when treated as a vector.
static const bool Color
Whether the type is a color.
static const bool Pointer
Whether the type is a pointer.
Information about the object.
Maps a compile-time property enum value to its corresponding C++ storage type.