subMesh.project.d.ts 1.0 KB

1234567891011121314151617181920
  1. import { Vector3 } from "../Maths/math.vector";
  2. import type { IndicesArray } from "../types";
  3. declare module "./subMesh" {
  4. interface SubMesh {
  5. /** @internal */
  6. _projectOnTrianglesToRef(vector: Vector3, positions: Vector3[], indices: IndicesArray, step: number, checkStopper: boolean, ref: Vector3): number;
  7. /** @internal */
  8. _projectOnUnIndexedTrianglesToRef(vector: Vector3, positions: Vector3[], indices: IndicesArray, ref: Vector3): number;
  9. /**
  10. * Projects a point on this submesh and stores the result in "ref"
  11. *
  12. * @param vector point to project
  13. * @param positions defines mesh's positions array
  14. * @param indices defines mesh's indices array
  15. * @param ref vector that will store the result
  16. * @returns distance from the point and the submesh, or -1 if the mesh rendering mode doesn't support projections
  17. */
  18. projectToRef(vector: Vector3, positions: Vector3[], indices: IndicesArray, ref: Vector3): number;
  19. }
  20. }