These are the pre-v12 classes, kept so existing code keeps building. New code should use the modern API — see Migration Guide: v11 to v12.
optris::FieldShapeConfig
Encapsulates the configuration of a field shape.
Public attributes
type
FieldShape type = FieldShape::Rectangle
Type of the field shape.
position
Vector2f position = {0.F, 0.F}
Center point for rectangular and elliptical fields or the origin of of the vertex coordinates for polygonal and spline based fields.
dimension
Vector2f dimension = {0.F, 0.F}
Dimension for rectangular and elliptical fields. Ignored for polygonal and spline based fields.
vertices
std::vector< Vector2f > vertices
Vertices for polygonal and spline based fields. Ignored for rectangular and elliptical fields. The vertices need to be defined relative to the point of origin specified by position.
normalized
bool normalized = false
Specifies whether the provided position, dimension and vertices are pixel coordinates or are normalized to the range [0, 1] relative to the current frame dimensions. Only one format for position, dimension and vertices can be used. There is no mixing and matching.
Public static functions
validate
static OTC_SDK_API void validate(FieldShapeConfig &config)
Validates the field shape configuration.
Parameters
| Name | Description |
|---|---|
config |
to validate. |
Exceptions
| Name | Description |
|---|---|
SDKException |
if the configuration is invalid. |