greasedLineMesh.d.ts 3.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. import type { Scene } from "../../scene";
  2. import type { Matrix } from "../../Maths/math.vector";
  3. import { Vector3 } from "../../Maths/math.vector";
  4. import { Mesh } from "../mesh";
  5. import type { Ray, TrianglePickingPredicate } from "../../Culling/ray";
  6. import { PickingInfo } from "../../Collisions/pickingInfo";
  7. import type { Nullable } from "../../types";
  8. import type { Node } from "../../node";
  9. import type { GreasedLineMeshOptions } from "./greasedLineBaseMesh";
  10. import { GreasedLineBaseMesh } from "./greasedLineBaseMesh";
  11. import type { VertexData } from "../mesh.vertexData";
  12. /**
  13. * GreasedLineMesh
  14. * Use the GreasedLineBuilder.CreateGreasedLine function to create an instance of this class.
  15. */
  16. export declare class GreasedLineMesh extends GreasedLineBaseMesh {
  17. readonly name: string;
  18. private _previousAndSide;
  19. private _nextAndCounters;
  20. private static _V_START;
  21. private static _V_END;
  22. private static _V_OFFSET_START;
  23. private static _V_OFFSET_END;
  24. /**
  25. * Treshold used to pick the mesh
  26. */
  27. intersectionThreshold: number;
  28. /**
  29. * GreasedLineMesh
  30. * @param name name of the mesh
  31. * @param scene the scene
  32. * @param _options mesh options
  33. */
  34. constructor(name: string, scene: Scene, _options: GreasedLineMeshOptions);
  35. /**
  36. * "GreasedLineMesh"
  37. * @returns "GreasedLineMesh"
  38. */
  39. getClassName(): string;
  40. protected _updateColorPointers(): void;
  41. protected _updateWidths(): void;
  42. protected _setPoints(points: number[][]): void;
  43. /**
  44. * Clones the GreasedLineMesh.
  45. * @param name new line name
  46. * @param newParent new parent node
  47. * @returns cloned line
  48. */
  49. clone(name?: string, newParent?: Nullable<Node>): GreasedLineMesh;
  50. /**
  51. * Serializes this GreasedLineMesh
  52. * @param serializationObject object to write serialization to
  53. */
  54. serialize(serializationObject: any): void;
  55. /**
  56. * Parses a serialized GreasedLineMesh
  57. * @param parsedMesh the serialized GreasedLineMesh
  58. * @param scene the scene to create the GreasedLineMesh in
  59. * @returns the created GreasedLineMesh
  60. */
  61. static Parse(parsedMesh: any, scene: Scene): Mesh;
  62. protected _initGreasedLine(): void;
  63. /**
  64. * Checks whether a ray is intersecting this GreasedLineMesh
  65. * @param ray ray to check the intersection of this mesh with
  66. * @param fastCheck not supported
  67. * @param trianglePredicate not supported
  68. * @param onlyBoundingInfo defines a boolean indicating if picking should only happen using bounding info (false by default)
  69. * @param worldToUse not supported
  70. * @param skipBoundingInfo a boolean indicating if we should skip the bounding info check
  71. * @returns the picking info
  72. */
  73. intersects(ray: Ray, fastCheck?: boolean, trianglePredicate?: TrianglePickingPredicate, onlyBoundingInfo?: boolean, worldToUse?: Matrix, skipBoundingInfo?: boolean): PickingInfo;
  74. /**
  75. * Gets all intersections of a ray and the line
  76. * @param ray Ray to check the intersection of this mesh with
  77. * @param _fastCheck not supported
  78. * @param _trianglePredicate not supported
  79. * @param onlyBoundingInfo defines a boolean indicating if picking should only happen using bounding info (false by default)
  80. * @param _worldToUse not supported
  81. * @param skipBoundingInfo a boolean indicating if we should skip the bounding info check
  82. * @param firstOnly If true, the first and only intersection is immediatelly returned if found
  83. * @returns intersection(s)
  84. */
  85. findAllIntersections(ray: Ray, _fastCheck?: boolean, _trianglePredicate?: TrianglePickingPredicate, onlyBoundingInfo?: boolean, _worldToUse?: Matrix, skipBoundingInfo?: boolean, firstOnly?: boolean): {
  86. distance: number;
  87. point: Vector3;
  88. }[] | undefined;
  89. private get _boundingSphere();
  90. private static _CompareV3;
  91. protected _createVertexBuffers(): VertexData;
  92. }