SpatialQueryCommon.kl

Interfaces

ClosestResult (interface)

This interface enables to abstract the content of a queried object for getClosest queries, enabling for specialization of its content (eg: polygons, geometries).

注釈

the ClosestResult object must properly support the ‘clone’ operation

ClosestResult ClosestResult ClosestResult LinesClosestResult LinesClosestResult LinesClosestResult->ClosestResult MeshClosestResult MeshClosestResult MeshClosestResult->ClosestResult PointsClosestResult PointsClosestResult PointsClosestResult->ClosestResult _GeometryInstancesClosestResult _GeometryInstancesClosestResult _GeometryInstancesClosestResult->ClosestResult

Functions

Boolean compareAndUpdate ! ( in Size objectIndex, out Scalar maxScaledSquaredDistance )
  copyResultFrom ! ( in Ref<ClosestResult> other )
  reset ! ( in Vec3 position, in Vec3 scaling, in Boolean hasScaling )

Functions in detail

Boolean ClosestResult.compareAndUpdate! ( in Size objectIndex, out Scalar maxScaledSquaredDistance )

If the getClosest resulting squared scaled distance is <= maxScaledSquaredDistance, returns ‘true’ and the object should preserve location information for that best candidate.


ClosestResult.copyResultFrom! ( in Ref<ClosestResult> other )

Sets the resulting getClosest location from the other ClosestResult (same type)


ClosestResult.reset! ( in Vec3 position, in Vec3 scaling, in Boolean hasScaling )

Resets the content of the query (new getClosest beginning). If ‘hasScaling’, then ‘scaling’ will contain a non-uniform scaling vector. Else, ‘scaling’ will be :ref:`Vec3 <vec3>`(1,1,1).

RaycastResult (interface)

This interface enables to abstract the content of a queried object for raycast queries, enabling for specialization of its content (eg: polygons, geometries).

注釈

The RaycastResult object must properly support the ‘clone’ operation

RaycastResult RaycastResult RaycastResult LinesRaycastResult LinesRaycastResult LinesRaycastResult->RaycastResult MeshRaycastResult MeshRaycastResult MeshRaycastResult->RaycastResult PointsRaycastResult PointsRaycastResult PointsRaycastResult->RaycastResult _GeometryInstancesRaycastResult _GeometryInstancesRaycastResult _GeometryInstancesRaycastResult->RaycastResult

Functions

Boolean compareAndUpdate ! ( in Size objectIndex, out Scalar maxDistance )
  copyResultFrom ! ( in Ref<RaycastResult> other )
  reset ! ( in Vec3 start, in Vec3 unitDir, in Boolean doubleSided, in Scalar coneThreshold )

Functions in detail

Boolean RaycastResult.compareAndUpdate! ( in Size objectIndex, out Scalar maxDistance )

If the raycast resulting distance is <= maxDistance, returns ‘true’ and the object should preserve location information for that best candidate.


RaycastResult.copyResultFrom! ( in Ref<RaycastResult> other )

Sets the resulting raycast location from the other RaycastResult (same type)


RaycastResult.reset! ( in Vec3 start, in Vec3 unitDir, in Boolean doubleSided, in Scalar coneThreshold )

Resets the content of the query (new raycast beginning)