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).