API reference
API reference
Select your platform
No SDKs available
No versions available

ByVector4FilterOperation Class

Modifiers: final
A class representing a filter operation for Vector4 attributes. It is used to build a filter expression by specifying comparison operations on Vector4 attribute values.
This class provides methods for creating filter nodes that represent various comparison operations on Vector4 attributes. It supports both:
  • Comparing entire Vector4 values (all X, Y, Z, and W components together)
  • Component-wise comparisons (filtering on just the X, Y, Z, or W component)
The component-wise filtering is enabled through the byX(), byY(), byZ(), and byW() methods, which configure the filter to operate on a specific component of the Vector4.
Example:
// Find entities where vector4Var equals Vector4(1.0f, 2.0f, 3.0f, 4.0f)
Query.where { has(TestComponent.id) }
    .filter { by(TestComponent.vector4VarData).isEqualTo(Vector4(1.0f, 2.0f, 3.0f, 4.0f)) }
// Find entities where vector4Var.w is greater than 0.5f
Query.where { has(TestComponent.id) }
     .filter { by(TestComponent.vector4VarData).byW().greaterThan(0.5f) }
// Find entities where vector4Var.z is between 0.0f and 1.0f
Query.where { has(TestComponent.id)}
     .filter { by(TestComponent.vector4VarData).byZ().greaterThanOrEqualTo(0.0f) and
               by(TestComponent.vector4VarData).byZ().lessThanOrEqualTo(1.0f) }

Signature

class ByVector4FilterOperation(val attrId: Int, var propId: Int = 0, val filterBuilder: FilterBuilder)

Constructors

ByVector4FilterOperation ( attrId , propId , filterBuilder ) : ByVector4FilterOperation
Signature
constructor(attrId: Int, propId: Int = 0, filterBuilder: FilterBuilder)
Parameters
attrId: Int
The attribute id of the filter operation.
propId: Int
The property id of the filter operation (0 for x, 1 for y, 2 for z, 3 for w).
filterBuilder: FilterBuilder
The filter builder object used to create the filter node.

Properties

attrId : Int
[Get]
Signature
val attrId: Int
filterBuilder : FilterBuilder
[Get]
Signature
val filterBuilder: FilterBuilder
propId : Int
[Get][Set]
Signature
var propId: Int

Functions

Sets the filter to operate on the W component of the Vector4.
Signature
fun byW(): ByVector4FilterOperation
Returns
This filter operation configured to filter on the W component.
Sets the filter to operate on the X component of the Vector4.
Signature
fun byX(): ByVector4FilterOperation
Returns
This filter operation configured to filter on the X component.
Sets the filter to operate on the Y component of the Vector4.
Signature
fun byY(): ByVector4FilterOperation
Returns
This filter operation configured to filter on the Y component.
Sets the filter to operate on the Z component of the Vector4.
Signature
fun byZ(): ByVector4FilterOperation
Returns
This filter operation configured to filter on the Z component.
greaterThan ( value ) : ByVector4FilterNode
Creates a filter node representing a greater than condition with the given float value. This compares only the component specified by propId (X, Y, Z, or W). By default, the filter operates on the X component.
Signature
fun greaterThan(value: Float): ByVector4FilterNode
Parameters
value: Float
The float value to compare against.
Returns
A filter node representing the greater than condition.
greaterThanOrEqualTo ( value ) : ByVector4FilterNode
Creates a filter node representing a greater than or equal to condition with the given float value. This compares only the component specified by propId (X, Y, Z, or W). By default, the filter operates on the X component.
Signature
fun greaterThanOrEqualTo(value: Float): ByVector4FilterNode
Parameters
value: Float
The float value to compare against.
Returns
A filter node representing the greater than or equal to condition.
isEqualTo ( value ) : ByVector4FilterNode
Creates a filter node representing an equality condition with the given Vector4 value. This compares all x, y, z, and w components of the vector.
Signature
fun isEqualTo(value: Vector4): ByVector4FilterNode
Parameters
value: Vector4
The Vector4 value to compare against.
Returns
A filter node representing the equality condition.
isEqualTo ( value ) : ByVector4FilterNode
Creates a filter node representing an equality condition with the given float value. This compares only the component specified by propId (X, Y, Z, or W). By default, the filter operates on the X component.
Signature
fun isEqualTo(value: Float): ByVector4FilterNode
Parameters
value: Float
The float value to compare against.
Returns
A filter node representing the equality condition.
lessThan ( value ) : ByVector4FilterNode
Creates a filter node representing a less than condition with the given float value. This compares only the component specified by propId (X, Y, Z, or W). By default, the filter operates on the X component.
Signature
fun lessThan(value: Float): ByVector4FilterNode
Parameters
value: Float
The float value to compare against.
Returns
A filter node representing the less than condition.
lessThanOrEqualTo ( value ) : ByVector4FilterNode
Creates a filter node representing a less than or equal to condition with the given float value. This compares only the component specified by propId (X, Y, Z, or W). By default, the filter operates on the X component.
Signature
fun lessThanOrEqualTo(value: Float): ByVector4FilterNode
Parameters
value: Float
The float value to compare against.
Returns
A filter node representing the less than or equal to condition.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon