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

ByPoseFilterOperation

ByPoseFilterOperation

class ByPoseFilterOperation(val attrId: Int, var propId: Int = 0, val filterBuilder: FilterBuilder)
A class representing a filter operation for Pose attributes. It is used to build a filter expression by specifying comparison operations on Pose attribute values.
This class provides methods for creating filter nodes that represent various comparison operations on Pose attributes. It supports both:
  • Comparing entire Pose values (all position and orientation components together)
  • Component-wise comparisons (filtering on just one component of position or orientation)
The component-wise filtering is enabled through the byPositionX/Y/Z() and byOrientationW/X/Y/Z() methods, which configure the filter to operate on a specific component of the Pose.
Example:
// Find entities where poseVar equals Pose()
Query.where { has(TestComponent.id) }
    .filter { by(TestComponent.poseVar).isEqualTo(Pose()) }

// Find entities where poseVar's postition X is greater than 0.5f
Query.where { has(TestComponent.id) }
     .filter { by(TestComponent.poseVar).byPositionX().greaterThan(0.5f) }

// Find entities where poseVar's orientation W is between 0.0f and 1.0f
Query.where { has(TestComponent.id)}
     .filter { by(TestComponent.poseVar).byOrientationW().greaterThanOrEqualTo(0.0f) and
               by(TestComponent.poseVar).byOrientationW().lessThanOrEqualTo(1.0f) }

Constructors

NameSummary
ByPoseFilterOperation
constructor(attrId: Int, propId: Int = 0, filterBuilder: FilterBuilder)

Properties

NameSummary
attrId
val attrId: Int
filterBuilder
val filterBuilder: FilterBuilder
propId
var propId: Int

Functions

NameSummary
byOrientationW
fun byOrientationW(): ByPoseFilterOperation

Sets the filter to operate on the W component of the Pose’s orientation quaternion.
byOrientationX
fun byOrientationX(): ByPoseFilterOperation

Sets the filter to operate on the X component of the Pose’s orientation quaternion.
byOrientationY
fun byOrientationY(): ByPoseFilterOperation

Sets the filter to operate on the Y component of the Pose’s orientation quaternion.
byOrientationZ
fun byOrientationZ(): ByPoseFilterOperation

Sets the filter to operate on the Z component of the Pose’s orientation quaternion.
byPositionX
fun byPositionX(): ByPoseFilterOperation

Sets the filter to operate on the X component of the Pose’s position.
byPositionY
fun byPositionY(): ByPoseFilterOperation

Sets the filter to operate on the Y component of the Pose’s position.
byPositionZ
fun byPositionZ(): ByPoseFilterOperation

Sets the filter to operate on the Z component of the Pose’s position.
greaterThan
fun greaterThan(value: Float): ByPoseFilterNode

Creates a filter node representing a greater than condition with the given float value. This compares only the component specified by propId (position X/Y/Z or orientation W/X/Y/Z). By default, the filter operates on the position’s X component.
greaterThanOrEqualTo
fun greaterThanOrEqualTo(value: Float): ByPoseFilterNode

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 (position X/Y/Z or orientation W/X/Y/Z). By default, the filter operates on the position’s X component.
isEqualTo
fun isEqualTo(value: Pose): ByPoseFilterNode

Creates a filter node representing an equality condition with the given Pose value. This compares all position (x, y, z) and orientation (w, x, y, z) components of the pose.



fun isEqualTo(value: Float): ByPoseFilterNode

Creates a filter node representing an equality condition with the given float value. This compares only the component specified by propId (position X/Y/Z or orientation W/X/Y/Z). By default, the filter operates on the position’s X component.
lessThan
fun lessThan(value: Float): ByPoseFilterNode

Creates a filter node representing a less than condition with the given float value. This compares only the component specified by propId (position X/Y/Z or orientation W/X/Y/Z). By default, the filter operates on the position’s X component.
lessThanOrEqualTo
fun lessThanOrEqualTo(value: Float): ByPoseFilterNode

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 (position X/Y/Z or orientation W/X/Y/Z). By default, the filter operates on the position’s X component.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon