Class MapViewPointsAbstract Internal

MapViewPoints is a class to extend for the "circles" and "squares" techniques to implement raycasting of THREE.Points as expected in MapView, that are in screen space.

Remarks

It copies the behaviour of the raycast method in [[THREE.Points]] and dispatches it to its children classes, Circles and Squares, who hold the intersection testing in the testPoint method. This class also has the ability to dismiss the testing via the enableRayTesting flag.

Its main motivation is to handle the point styles of XYZ projects.

See

https://github.com/mrdoob/three.js/blob/master/src/objects/Points.js

Hierarchy

Constructors

Properties

Methods

Constructors

  • Parameters

    • Optional geometry: BufferGeometry

      An instance of BufferGeometry.

    • Optional material: Material | Material[]

      An instance of Material (optional).

    Returns MapViewPoints

Properties

enableRayTesting: boolean = true

This allows to discard the ray testing.

Methods

  • This method is similar to the original method raycast in [[THREE.Points]] except that it then calls the tailored testPoint method in the children classes to test intersections depending on whether the points are circles or squares, which [[THREE.Points]] cannot do.

    Parameters

    • raycaster: PickingRaycaster

      The raycaster.

    • intersects: Intersection[]

      The array to fill with the results.

    Returns void

  • Implements the intersection testing in screen space between the drawn points and the ray.

    Parameters

    • point: Vector3

      The point to test.

    • screenPosition: Vector2

      The point position on screen.

    • pickCoordinates: Vector2

      The picking position on screen.

    • index: number

      The index of the point in the [[THREE.BufferGeometry]].

    • distance: number

      The distance between the point and the ray origin.

    • intersects: Intersection[]

      The results array.

    Returns void

    Remarks

    The drawing of the points being different between Circles and Squares, this method is implemented in these child classes.

Generated using TypeDoc