LuciadCPillar 2024.0.02
|
This factory allows you to create style expressions
that can be used when styling data.
More...
#include <luciad/layers/styles/expressions/StyleExpressionFactory.h>
Public Types | |
template<typename T > | |
using | Numeric = std::enable_if_t< std::is_same_v< T, double >||std::is_same_v< T, Coordinate >, T > |
This represents all the types on which numeric operations can be applied. More... | |
template<typename T > | |
using | NumericAndColor = std::enable_if_t< std::is_same_v< T, double >||std::is_same_v< T, Coordinate >||std::is_same_v< T, Color >, T > |
This represents the operations that can be applied on numeric types and on Color. More... | |
template<typename T , typename U > | |
using | NumericAndColorFunctionResult = std::enable_if_t< std::is_same_v< U, double >||std::is_same_v< T, U >, NumericAndColor< T > > |
This represents all functions returning a 'numeric' or 'Color'. More... | |
template<typename T > | |
using | Supported = std::enable_if_t< std::is_same_v< T, double >||std::is_same_v< T, bool >||std::is_same_v< T, Coordinate >||std::is_same_v< T, Color >, T > |
This represents all the types that may be used within the expression factory. More... | |
Public Member Functions | |
StyleExpressionFactory ()=delete | |
~StyleExpressionFactory ()=delete | |
Static Public Member Functions | |
static StyleExpression< double > | abs (StyleExpression< double > value) |
Creates an expression that returns an expression with the absolute value. More... | |
template<typename T > | |
static StyleExpression< Numeric< T > > | acos (StyleExpression< T > operand) |
Creates an expression that takes the arccosine of another expression. More... | |
template<typename T , typename U = T> | |
static StyleExpression< NumericAndColorFunctionResult< T, U > > | add (StyleExpression< T > first, StyleExpression< U > second) |
Creates an expression that adds the values of the two provided expressions. More... | |
static StyleExpression< bool > | andOp (StyleExpression< bool > value1, StyleExpression< bool > value2) |
Creates an expression that is the boolean 'and' of its parts. More... | |
template<typename T > | |
static StyleExpression< Numeric< T > > | asin (StyleExpression< T > operand) |
Creates an expression that takes the arcsine of another expression. More... | |
template<typename T > | |
static StyleExpression< Numeric< T > > | atan (StyleExpression< T > operand) |
Creates an expression that takes the arcsine of another expression. More... | |
static StyleExpression< bool > | between (StyleExpression< double > lowerBound, StyleExpression< double > upperBound, StyleExpression< double > value) |
Creates an expression that evaluates whether the result of the operand is between a lower and upper bound (inclusive). More... | |
template<typename T > | |
static StyleExpression< Supported< T > > | cases (StyleExpression< T > defaultExpression, std::vector< StyleExpression< bool > > conditions, std::vector< StyleExpression< T > > expressions) |
Creates a case expression, which has a list of condition expressions and a list of corresponding result expressions, and evaluates to the first result expression whose corresponding condition is true. More... | |
template<typename T , typename U = T> | |
static StyleExpression< NumericAndColorFunctionResult< T, U > > | clamp (StyleExpression< T > operand, StyleExpression< U > lowerBound, StyleExpression< U > upperBound) |
Creates an expression that limits an operand to a range. More... | |
static StyleExpression< Color > | colorAttribute (std::string attributeName) |
Creates an attribute expression that represents a color. More... | |
template<typename T > | |
static StyleExpression< Supported< T > > | constant (T value) |
Creates an expression that represents a 'constant' value. More... | |
static StyleExpression< Coordinate > | coordinateAttribute (std::string attributeName) |
Creates an attribute expression that represents a coordinate. More... | |
template<typename T > | |
static StyleExpression< Numeric< T > > | cos (StyleExpression< T > operand) |
Creates an expression that takes the cosine of another expression. More... | |
static StyleExpression< Coordinate > | crossProduct (StyleExpression< Coordinate > first, StyleExpression< Coordinate > second) |
Creates an expression that calculates the cross product of two expressions representing Coordinate. More... | |
static StyleExpression< Color > | defaultColor () |
Creates an expression representing the default color that is applied to a mesh. More... | |
template<typename T > | |
static StyleExpression< double > | distance (StyleExpression< Numeric< T > > first, StyleExpression< T > second) |
Creates an expression that calculates the Euclidean distance between two expressions representing points. More... | |
template<typename T , typename U = T> | |
static StyleExpression< NumericAndColorFunctionResult< T, U > > | divide (StyleExpression< T > first, StyleExpression< U > second) |
Creates an expression that divides the value of the first expression by the value of the second expression. More... | |
template<typename T > | |
static StyleExpression< double > | dotProduct (StyleExpression< Numeric< T > > first, StyleExpression< T > second) |
Creates an expression that calculates the dot product of the given expressions. More... | |
static StyleExpression< double > | doubleAttribute (std::string attributeName) |
Creates an attribute expression that represents a double. More... | |
static StyleExpression< bool > | eq (StyleExpression< double > first, StyleExpression< double > second, StyleExpression< double > threshold) |
Creates an expression that evaluates whether the two given expression evaluate to close values, given some threshold. More... | |
template<typename T > | |
static StyleExpression< bool > | eq (StyleExpression< Supported< T > > first, StyleExpression< T > second) |
Creates an expression that evaluates whether the two given expression evaluate to the same value. More... | |
template<typename T , typename U = T> | |
static StyleExpression< NumericAndColorFunctionResult< T, U > > | fraction (StyleExpression< T > operand, StyleExpression< U > lowerBound, StyleExpression< U > upperBound) |
Creates an expression that calculates the fraction of the given operand in the range [lowerBound, upperBound] evaluates to (operand - lowerBound) / (upperBound - lowerBound) . More... | |
static StyleExpression< bool > | frontFacing () |
Creates an expression that determines whether a part of a mesh is facing to or away from the camera. More... | |
static StyleExpression< bool > | gt (StyleExpression< double > first, StyleExpression< double > second) |
Creates an expression that evaluates whether the result of the first expression is strictly greater than the result of the second expression. More... | |
static StyleExpression< bool > | gte (StyleExpression< double > first, StyleExpression< double > second) |
Creates an expression that evaluates whether the result of the first expression is greater than or equal to the result of the second expression. More... | |
template<typename T > | |
static StyleExpression< Supported< T > > | ifThenElse (StyleExpression< bool > condition, StyleExpression< T > thenExpression, StyleExpression< T > elseExpression) |
Creates an expression that implements if-then-else logic. More... | |
static StyleExpression< double > | length (StyleExpression< Coordinate > operand) |
Creates an expression that calculates the length of a Coordinate. More... | |
template<typename T > | |
static StyleExpression< Numeric< T > > | log (StyleExpression< T > operand) |
Creates an expression that takes the natural logarithm of another expression. More... | |
static StyleExpression< bool > | lt (StyleExpression< double > first, StyleExpression< double > second) |
Creates an expression that evaluates whether the result of the first expression is strictly less than the result of the second expression. More... | |
static StyleExpression< bool > | lte (StyleExpression< double > first, StyleExpression< double > second) |
Creates an expression that evaluates whether the result of the first expression is less than or equal to the result of the second expression. More... | |
template<typename T > | |
static StyleExpression< NumericAndColor< T > > | map (StyleExpression< double > indexExpression, std::vector< StyleExpression< T > > values, StyleExpression< T > defaultExpression) |
Creates an expression that maps an index onto an expression. More... | |
template<typename T , typename U = T> | |
static StyleExpression< NumericAndColorFunctionResult< T, U > > | max (StyleExpression< T > first, StyleExpression< U > second) |
Creates an expression that returns the maximum of the given expressions. More... | |
template<typename T , typename U = T> | |
static StyleExpression< NumericAndColorFunctionResult< T, U > > | min (StyleExpression< T > first, StyleExpression< U > second) |
Creates an expression that returns the minimum of the given expressions. More... | |
template<typename T > | |
static StyleExpression< NumericAndColor< T > > | mix (StyleExpression< T > first, StyleExpression< T > second, StyleExpression< double > fraction) |
Creates an expression that calculates an interpolated or extrapolated result between the result of first and second based on the result of fraction. More... | |
template<typename T > | |
static StyleExpression< NumericAndColor< T > > | mixMap (StyleExpression< double > fraction, std::vector< StyleExpression< T > > values) |
Creates an expression that creates an interpolated value according to a provided fraction. More... | |
template<typename T , typename U = T> | |
static StyleExpression< NumericAndColorFunctionResult< T, U > > | multiply (StyleExpression< T > first, StyleExpression< U > second) |
Creates an expression that multiplies the values of the two provided expressions. More... | |
template<typename T > | |
static StyleExpression< bool > | neq (StyleExpression< Supported< T > > first, StyleExpression< T > second) |
Creates an expression that evaluates whether the two given expression do not evaluate to the same value. More... | |
static StyleExpression< Coordinate > | normalize (StyleExpression< Coordinate > operand) |
Creates an expression that normalizes a Coordinate. More... | |
static StyleExpression< bool > | notOp (StyleExpression< bool > value) |
Creates an expression that is the boolean 'not' of the given expression. More... | |
static StyleExpression< bool > | orOp (StyleExpression< bool > value1, StyleExpression< bool > value2) |
Creates an expression that is the boolean 'or' of its parts. More... | |
template<typename T > | |
static StyleExpression< Supported< T > > | parameter (std::shared_ptr< Observable< T > > observable) |
Creates a parameter expression that is a style expression that can be changed at runtime. More... | |
static StyleExpression< Coordinate > | positionAttribute () |
Creates an expression that represents the position of the data that is styled. More... | |
template<typename T > | |
static StyleExpression< Numeric< T > > | pow (StyleExpression< T > first, StyleExpression< T > second) |
Creates an expression that returns the result of the first expression raised to the power of the result of the second expression. More... | |
template<typename T > | |
static StyleExpression< Numeric< T > > | sin (StyleExpression< T > operand) |
Creates an expression that takes the sine of another expression. More... | |
template<typename T , typename U = T> | |
static StyleExpression< NumericAndColorFunctionResult< T, U > > | subtract (StyleExpression< T > first, StyleExpression< U > second) |
Creates an expression that subtracts the value of the second expression from the value of the first expression. More... | |
template<typename T > | |
static StyleExpression< Numeric< T > > | tan (StyleExpression< T > operand) |
Creates an expression that takes the tangent of another expression. More... | |
This factory allows you to create style expressions
that can be used when styling data.
and
, or
, not
, eq
, neq
, lt
, lte
, gt
, gte
min
, max
, clamp
, mix
, add
, subtract
, multiply
, divide
, between
, fraction
ifThenElse
, map
, mixMap
, cases
constant
, attribute (double)
, attribute (color)
, attribute (coordinate)
, attribute (position)
, parameter
sin
, cos
, tan
, asin
, acos
, atan
cross product
, dot product
, divide
, multiply
, add
, substract
distance
, length
Example:
if (value1 < value2) { return "Color(255, 55, 55, 127)"; else { return "Color(55, 255, 55, 127)"; }
can be converted to an expression:
using luciad::StyleExpressionFactory::Numeric = std::enable_if_t<std::is_same_v<T, double> || std::is_same_v<T, Coordinate>, T> |
This represents all the types on which numeric operations can be applied.
using luciad::StyleExpressionFactory::NumericAndColor = std::enable_if_t<std::is_same_v<T, double> || std::is_same_v<T, Coordinate> || std::is_same_v<T, Color>, T> |
using luciad::StyleExpressionFactory::NumericAndColorFunctionResult = std::enable_if_t<std::is_same_v<U, double> || std::is_same_v<T, U>, NumericAndColor<T> > |
This represents all functions returning a 'numeric' or 'Color'.
The function accepts NumericAndColor
for its arguments or a combination of a NumericAndColor
and a double
.
Note that for Color the numeric operation is applied on each of the color components interpreted using its normalized values ([0, 1]
).
using luciad::StyleExpressionFactory::Supported = std::enable_if_t<std::is_same_v<T, double> || std::is_same_v<T, bool> || std::is_same_v<T, Coordinate> || std::is_same_v<T, Color>, T> |
This represents all the types that may be used within the expression factory.
|
delete |
|
delete |
|
static |
Creates an expression that returns an expression with the absolute value.
value | the input for the abs function |
|
static |
Creates an expression that takes the arccosine of another expression.
operand | the expression of which to take the arccosine. For Coordinate, the function is applied to the individual element values. |
T | the type of the operand. Can be double , Coordinate. |
|
static |
Creates an expression that adds the values of the two provided expressions.
If both expressions are of the same type, the values are added as expected. If the first expression is of type Coordinate or Color
, and second expression is of type double, then the value of second expression is added to every sub element of the first expression (note that for Color
, each component is treated as a normalized value ([0, 1]
)).
first | the first expression to be added |
second | the second expression to be added |
T | the type of the value of the first expression. Can be double , Coordinate or Color . |
U | the type of the value of the second expression. Can be the same as T, or double . |
|
static |
Creates an expression that is the boolean 'and' of its parts.
value1 | the first expression to which the 'and' operator is applied |
value2 | the second expression to which the 'and' operator is applied |
|
static |
Creates an expression that takes the arcsine of another expression.
operand | the expression of which to take the arcsine. For Coordinate, the function is applied to the individual element values. |
T | the type of the operand. Can be double , Coordinate. |
|
static |
Creates an expression that takes the arcsine of another expression.
operand | the expression of which to take the arctangent. For Coordinate, the function is applied to the individual element values. |
T | the type of the operand. Can be double , Coordinate. |
|
static |
Creates an expression that evaluates whether the result of the operand is between a lower and upper bound (inclusive).
In other words, this expression checks whether operand is in the range [lowerBound, upperBound]
.
lowerBound | a double expression representing the lowerBound |
upperBound | a double expression representing the upperBound |
value | the double expression to test |
[lowerBound, upperBound]
.
|
static |
Creates a case expression, which has a list of condition expressions and a list of corresponding result expressions, and evaluates to the first result expression whose corresponding condition is true.
If none of the condition expressions are true, then the case expression evaluates to its default expression.
defaultExpression | the default expression |
conditions | a list of conditions |
expressions | a list of corresponding expressions, must be the same size as conditions |
T | the type of the value of the expressions. Can be bool , double , Coordinate or Color . |
|
static |
Creates an expression that limits an operand to a range.
The type of the bounds has to be the same. For Coordinate or Color
, the clamping is applied to each component independently, either using the corresponding component in the bound (if of the same type as operand) or the bound value if double (note that for Color
, each component is treated as a normalized value ([0, 1]
)).
operand | the operand to evaluate. Should result in a double, point or color. |
lowerBound | a double expression representing the lowerBound |
upperBound | a double expression representing the upperBound |
T | the type of the operand: double , Coordinate or Color . |
U | the type of lowerBound and upperBound. Must be equal to T, or double . |
[lowerBound, upperBound]
. If operand is a Color or Coordinate and bounds are doubles, the operation is applies to the individual element values.
|
static |
Creates an attribute expression that represents a color.
Expressions are evaluated for certain objects. Those object may have attributes ascribed to them. This expression allows access to those attributes by name. Which attributes are available depends on the evaluator of the expression, and on the data itself.
For example, for OGC 3D tiles
point cloud data, there is no fixed set of available attributes, but data files can define certain attributes, like 'color' or 'intensity' for each of the points in the point cloud. When these attributes are known up-front, you can use them as part of the style expression, for example to give each point its actual color, or to create a color based on the intensity value.
You can discover which attributes you can use in the documentation of the model decoder of the format that is used. For example:
When you display 3D tiles data
, the layer only loads a subset of the available attributes in memory by default. To make sure that all required attributes are loaded, you must specify
which attributes are used in the style expressions.
attributeName | the name of the attribute. |
|
static |
Creates an expression that represents a 'constant' value.
value | a value for the constant. |
T | the type of the constant: double , bool , Coordinate or Color . |
|
static |
Creates an attribute expression that represents a coordinate.
Expressions are evaluated for certain objects. Those object may have attributes ascribed to them. This expression allows access to those attributes by name. Which attributes are available depends on the evaluator of the expression, and on the data itself.
For example, for OGC 3D tiles
point cloud data, there is no fixed set of available attributes, but data files can define certain attributes, like 'color' or 'intensity' for each of the points in the point cloud. When these attributes are known up-front, you can use them as part of the style expression, for example to give each point its actual color, or to create a color based on the intensity value.
You can discover which attributes you can use in the documentation of the model decoder of the format that is used. For example:
When you display 3D tiles data
, the layer only loads a subset of the available attributes in memory by default. To make sure that all required attributes are loaded, you must specify
which attributes are used in the style expressions.
attributeName | the name of the attribute. |
|
static |
Creates an expression that takes the cosine of another expression.
operand | the expression of which to take the cosine. For Coordinate, the function is applied to the individual element values. Values assumed to be in radians. |
T | the type of the operand. Can be double or Coordinate. |
|
static |
Creates an expression that calculates the cross product of two expressions representing Coordinate.
first | The first expression to evaluate. |
second | The second expression to evaluate. |
|
static |
Creates an expression representing the default color that is applied to a mesh.
The result depends on what is available in the data. It can be the color of a texture, a color attribute, a constant color default, etc.
This type of expression is only supported for mesh styling
expressions used by TileSet3DLayer.
|
static |
Creates an expression that calculates the Euclidean distance between two expressions representing points.
The distance is defined as follows for the following supported types:
abs(second - first)
.sqrt(x*x + y*y + z*z)
.first | the first expression |
second | the second expression |
T | the type of expressions: double , Coordinate. |
|
static |
Creates an expression that divides the value of the first expression by the value of the second expression.
If both expressions are of the same type, the values are divided component by component. If the first expression is of type Coordinate or Color
, and second expression is of type double, then every sub element of the first expression is divided by the value of second expression (note that for Color
, each component is treated as a normalized value ([0, 1]
)).
first | the dividend expression |
second | the divisor expression |
T | the type of the value of the first expression. Can be double , Coordinate or Color . |
U | the type of the value of the second expression. Can be the same as T, or double . |
|
static |
Creates an expression that calculates the dot product of the given expressions.
The type of the result of the two given expressions should be the same. You can take the dot product of doubles or Coordinate. Coordinates interpreted as vectors for this operation.
first | The first expression to evaluate. Should result in a double, Coordinate. |
second | The second expression to evaluate. Should result in the same type as first. |
T | the type of the first and second expressions: double, Coordinate. |
|
static |
Creates an attribute expression that represents a double.
Expressions are evaluated for certain objects. Those object may have attributes ascribed to them. This expression allows access to those attributes by name. Which attributes are available depends on the evaluator of the expression, and on the data itself.
For example, for OGC 3D tiles
point cloud data, there is no fixed set of available attributes, but data files can define certain attributes, like 'color' or 'intensity' for each of the points in the point cloud. When these attributes are known up-front, you can use them as part of the style expression, for example to give each point its actual color, or to create a color based on the intensity value.
You can discover which attributes you can use in the documentation of the model decoder of the format that is used. For example:
When you display 3D tiles data
, the layer only loads a subset of the available attributes in memory by default. To make sure that all required attributes are loaded, you must specify
which attributes are used in the style expressions.
attributeName | the name of the attribute. |
|
static |
Creates an expression that evaluates whether the two given expression evaluate to close values, given some threshold.
The size of the threshold depends on the values you want to compare:
first | The first expression to evaluate |
second | The second expression to evaluate |
threshold | The Expression describing the maximum threshold before considering both values too far from each other. |
|
static |
Creates an expression that evaluates whether the two given expression evaluate to the same value.
Note: in most cases, it is advised to use a threshold when comparing values. This can be done using the eq method that also takes a threshold expression as parameter.
first | the first expression to be compared |
second | the second expression to be compared |
T | the type of the value of both expressions. Can be bool , double , Coordinate or Color . |
|
inlinestatic |
Creates an expression that calculates the fraction of the given operand in the range [lowerBound, upperBound]
evaluates to (operand - lowerBound) / (upperBound - lowerBound)
.
For values of operand outside the range [lowerBound, upperBound]
, the results will lie outside the range [0, 1]
. If the operand is of type Coordinate or Color
and the bounds are of type double, the result will be of the same type as the operand with fraction being applied on each component (note that for Color
, each component is treated as a normalized value ([0, 1]
)).
operand | the operand to evaluate |
lowerBound | the lowerBound to evaluate. |
upperBound | the upperBoundBound to evaluate. |
T | the type of the operand: double , Coordinate or Color . |
U | the type of lowerBound and upperBound. Must be equal to T, or double . |
|
static |
Creates an expression that determines whether a part of a mesh is facing to or away from the camera.
You can for example use it in a color expression to distinguish front-facing from back-facing pixels, and render those differently. This type of expression is only supported for mesh styling expressions
used by TileSet3DLayer
.
The facing is determined based on triangle winding.
If you simply wish to hide back-faced triangles, use MeshStyle::Builder::facetCulling
with FacetCullingType::BackfaceCulling
as parameter.
|
static |
Creates an expression that evaluates whether the result of the first expression is strictly greater than the result of the second expression.
first | the first double expression to be compared |
second | the second double expression to be compared |
|
static |
Creates an expression that evaluates whether the result of the first expression is greater than or equal to the result of the second expression.
first | the first double expression to be compared |
second | the second double expression to be compared |
|
static |
Creates an expression that implements if-then-else logic.
condition | the expression that decides which of the other expressions to take |
thenExpression | the expression whose result will be returned if condition is true |
elseExpression | the expression whose result will be returned if condition is false |
T | the type of the value of thenExpression and elseExpression. Can be bool , double , Coordinate or Color . |
|
static |
Creates an expression that calculates the length of a Coordinate.
operand | The expression to evaluate. |
|
static |
Creates an expression that takes the natural logarithm of another expression.
operand | The expression of which to take the natural logarithm. Should result in a double, Coordinate. |
T | the type of the operand expression: double , Coordinate. |
|
static |
Creates an expression that evaluates whether the result of the first expression is strictly less than the result of the second expression.
first | the first double expression to be compared |
second | the second double expression to be compared |
|
static |
Creates an expression that evaluates whether the result of the first expression is less than or equal to the result of the second expression.
first | the first double expression to be compared |
second | the second double expression to be compared |
|
static |
Creates an expression that maps an index onto an expression.
The expression first determines an index, then evaluates the expression corresponding to the index. The indexExpression must evaluate to an integer value in the range [0, size(values) - 1]
to be valid.
indexExpression | The expression that calculates the index to use. |
values | an array of value expressions |
defaultExpression | The expression used as default when the computed index is either not an integer or out of range. |
T | the type of expressions in values: double , Coordinate or Color . |
|
static |
Creates an expression that returns the maximum of the given expressions.
first | The first expression to evaluate. Should result in a double, point or color. |
second | The second expression to evaluate. Should result in the same type as first or a double. |
T | the type of the first expression: double , Coordinate or Color . |
U | the type of the second expression. Must be equal to T, or double . |
Color
, each component is treated as a normalized value ([0, 1]
)).
|
static |
Creates an expression that returns the minimum of the given expressions.
first | The first expression to evaluate. Should result in a double, point or color. |
second | The second expression to evaluate. Should result in the same type as first or a double. |
T | the type of the first expression: double , Coordinate or Color . |
U | the type of the second expression. Must be equal to T, or double . |
Color
, each component is treated as a normalized value ([0, 1]
)).
|
static |
Creates an expression that calculates an interpolated or extrapolated result between the result of first and second based on the result of fraction.
first | the first expression that is mixed |
second | the second expression that is mixed |
fraction | the mixing fraction. In range [0, 1] for interpolation. May also be a value outside that interval for extrapolation. |
T | the type of the value to mix. Can be double , Coordinate or Color . |
|
static |
Creates an expression that creates an interpolated value according to a provided fraction.
This expression is not limited to doubles, but can also be used to interpolate points or colors.
fraction | a fraction, in range [0,1] |
values | an array of value expressions |
T | the type of values. Can be double , Coordinate or Color . |
|
static |
Creates an expression that multiplies the values of the two provided expressions.
If both expressions are of the same type, the values are multiplied component by component. If the first expression is of type Coordinate or Color
, and second expression is of type double, then the value of second expression is multiplied with every sub element of the first expression (note that for Color
, each component is treated as a normalized value ([0, 1]
)).
first | the first expression to be multiplied |
second | the second expression to be multiplied |
T | the type of the value of the first expression. Can be double , Coordinate or Color . |
U | the type of the value of the second expression. Can be the same as T, or double . |
|
static |
Creates an expression that evaluates whether the two given expression do not evaluate to the same value.
first | the first expression to be compared |
second | the second expression to be compared |
T | the type of the value of both expressions. Can be bool , double , Coordinate or Color . |
|
static |
Creates an expression that normalizes a Coordinate.
operand | The expression to evaluate. |
|
static |
Creates an expression that is the boolean 'not' of the given expression.
value | a boolean expression |
|
static |
Creates an expression that is the boolean 'or' of its parts.
value1 | the first expression to which the 'or' operator is applied |
value2 | the second expression to which the 'or' operator is applied |
|
static |
Creates a parameter expression that is a style expression that can be changed at runtime.
When it is changed, the styling will be updated to reflect the new value without having to re-create the expressions in which it is used. This makes it possible to make changes to the styling with almost-zero overhead.
observable | an object that represents a mutable value. Users can hold on to this Observable in order to change the parameter value. |
T | the type of the constant: double , bool , Coordinate or Color . |
|
static |
Creates an expression that represents the position of the data that is styled.
For example, for point clouds it represents for the position of an individual point in that point cloud. This for example makes it possible to adapt the transparency of points of a point cloud depending on their distance from an other location.
|
static |
Creates an expression that returns the result of the first expression raised to the power of the result of the second expression.
The type of the operands should be the same. The (elements of the) first argument must not be less than 0 and if it is 0, the (corresponding elements of the) second argument must be greater than 0.
first | The first expression to evaluate. Should result in a double, Coordinate or Color. |
second | The second expression to evaluate. Should result in the same type as first. |
T | the type of the expressions: double , Coordinate. |
|
static |
Creates an expression that takes the sine of another expression.
operand | the expression of which to take the sine. For Coordinate, the function is applied to the individual element values. Values assumed to be in radians. |
T | the type of the operand. Can be double , Coordinate. |
|
static |
Creates an expression that subtracts the value of the second expression from the value of the first expression.
If both expressions are of the same type, the values are subtracted as expected. If the first expression is of type Coordinate or Color
, and second expression is of type double, then the value of second expression is subtracted from every sub element of the first expression (note that for Color
, each component is treated as a normalized value ([0, 1]
)).
first | the expression to be subtracted from |
second | the expression to be subtracted |
T | the type of the value of the first expression. Can be double , Coordinate or Color . |
U | the type of the value of the second expression. Can be the same as T, or double . |
|
static |
Creates an expression that takes the tangent of another expression.
operand | the expression of which to take the tangent. For Coordinate, the function is applied to the individual element values. Values assumed to be in radians. |
T | the type of the operand. Can be double , Coordinate. |