math.frustum.d.ts 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. import type { Matrix, Vector3 } from "./math.vector";
  2. import type { DeepImmutable } from "../types";
  3. import { Plane } from "./math.plane";
  4. /**
  5. * Represents a camera frustum
  6. */
  7. export declare class Frustum {
  8. /**
  9. * Gets the planes representing the frustum
  10. * @param transform matrix to be applied to the returned planes
  11. * @returns a new array of 6 Frustum planes computed by the given transformation matrix.
  12. */
  13. static GetPlanes(transform: DeepImmutable<Matrix>): Plane[];
  14. /**
  15. * Gets the near frustum plane transformed by the transform matrix
  16. * @param transform transformation matrix to be applied to the resulting frustum plane
  17. * @param frustumPlane the resulting frustum plane
  18. */
  19. static GetNearPlaneToRef(transform: DeepImmutable<Matrix>, frustumPlane: Plane): void;
  20. /**
  21. * Gets the far frustum plane transformed by the transform matrix
  22. * @param transform transformation matrix to be applied to the resulting frustum plane
  23. * @param frustumPlane the resulting frustum plane
  24. */
  25. static GetFarPlaneToRef(transform: DeepImmutable<Matrix>, frustumPlane: Plane): void;
  26. /**
  27. * Gets the left frustum plane transformed by the transform matrix
  28. * @param transform transformation matrix to be applied to the resulting frustum plane
  29. * @param frustumPlane the resulting frustum plane
  30. */
  31. static GetLeftPlaneToRef(transform: DeepImmutable<Matrix>, frustumPlane: Plane): void;
  32. /**
  33. * Gets the right frustum plane transformed by the transform matrix
  34. * @param transform transformation matrix to be applied to the resulting frustum plane
  35. * @param frustumPlane the resulting frustum plane
  36. */
  37. static GetRightPlaneToRef(transform: DeepImmutable<Matrix>, frustumPlane: Plane): void;
  38. /**
  39. * Gets the top frustum plane transformed by the transform matrix
  40. * @param transform transformation matrix to be applied to the resulting frustum plane
  41. * @param frustumPlane the resulting frustum plane
  42. */
  43. static GetTopPlaneToRef(transform: DeepImmutable<Matrix>, frustumPlane: Plane): void;
  44. /**
  45. * Gets the bottom frustum plane transformed by the transform matrix
  46. * @param transform transformation matrix to be applied to the resulting frustum plane
  47. * @param frustumPlane the resulting frustum plane
  48. */
  49. static GetBottomPlaneToRef(transform: DeepImmutable<Matrix>, frustumPlane: Plane): void;
  50. /**
  51. * Sets the given array "frustumPlanes" with the 6 Frustum planes computed by the given transformation matrix.
  52. * @param transform transformation matrix to be applied to the resulting frustum planes
  53. * @param frustumPlanes the resulting frustum planes
  54. */
  55. static GetPlanesToRef(transform: DeepImmutable<Matrix>, frustumPlanes: Plane[]): void;
  56. /**
  57. * Tests if a point is located between the frustum planes.
  58. * @param point defines the point to test
  59. * @param frustumPlanes defines the frustum planes to test
  60. * @returns true if the point is located between the frustum planes
  61. */
  62. static IsPointInFrustum(point: Vector3, frustumPlanes: Array<DeepImmutable<Plane>>): boolean;
  63. }