Picker class used to create picking.

Picker 类用于创建拾取。

方法

  • 参数

    • point: Vector2

      The mouse position in screen space.

    • viewPort: Viewport

      The viewport dimensions.

    • projectionMatrix: Matrix4x4

      The projection (perspective) matrix.

    • viewMatrix: Matrix4x4

      The view matrix.

    • world: Matrix4x4

      The world offset matrix.

    • out: Ray

      The output ray.

    返回 void

    Calculates a ray originating from the mouse position.

    根据鼠标位置计算射线。

  • 参数

    • ray: Ray

      The ray.

    • vertex1: Vector3

      The first vertex of the triangle.

    • vertex2: Vector3

      The second vertex of the triangle.

    • vertex3: Vector3

      The third vertex of the triangle.

    返回 number

    The distance from the ray to the triangle, or Number.NaN if there is no intersection.

    Calculates the intersection of a ray with a triangle and returns the intersection distance.

    计算射线与三角形的交点并返回交点距离。

  • 参数

    • ray: Ray

      The ray.

    • plane: Plane

      The plane.

    返回 Vector3

    The intersection point, or null if there is no intersection.

    Detects the intersection point between a ray and a plane.

    检测射线和平面的交点。