axesViewer.d.ts 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. import { Vector3 } from "../Maths/math.vector";
  2. import type { Nullable } from "../types";
  3. import type { Scene } from "../scene";
  4. import type { TransformNode } from "../Meshes/transformNode";
  5. /**
  6. * The Axes viewer will show 3 axes in a specific point in space
  7. * @see https://doc.babylonjs.com/toolsAndResources/utilities/World_Axes
  8. */
  9. export declare class AxesViewer {
  10. private _xAxis;
  11. private _yAxis;
  12. private _zAxis;
  13. private _scaleLinesFactor;
  14. private _instanced;
  15. /**
  16. * Gets the hosting scene
  17. */
  18. scene: Nullable<Scene>;
  19. private _scaleLines;
  20. /**
  21. * Gets or sets a number used to scale line length
  22. */
  23. get scaleLines(): number;
  24. set scaleLines(value: number);
  25. /** Gets the node hierarchy used to render x-axis */
  26. get xAxis(): TransformNode;
  27. /** Gets the node hierarchy used to render y-axis */
  28. get yAxis(): TransformNode;
  29. /** Gets the node hierarchy used to render z-axis */
  30. get zAxis(): TransformNode;
  31. /**
  32. * Creates a new AxesViewer
  33. * @param scene defines the hosting scene
  34. * @param scaleLines defines a number used to scale line length (1 by default)
  35. * @param renderingGroupId defines a number used to set the renderingGroupId of the meshes (2 by default)
  36. * @param xAxis defines the node hierarchy used to render the x-axis
  37. * @param yAxis defines the node hierarchy used to render the y-axis
  38. * @param zAxis defines the node hierarchy used to render the z-axis
  39. * @param lineThickness The line thickness to use when creating the arrow. defaults to 1.
  40. */
  41. constructor(scene?: Scene, scaleLines?: number, renderingGroupId?: Nullable<number>, xAxis?: TransformNode, yAxis?: TransformNode, zAxis?: TransformNode, lineThickness?: number);
  42. /**
  43. * Force the viewer to update
  44. * @param position defines the position of the viewer
  45. * @param xaxis defines the x axis of the viewer
  46. * @param yaxis defines the y axis of the viewer
  47. * @param zaxis defines the z axis of the viewer
  48. */
  49. update(position: Vector3, xaxis: Vector3, yaxis: Vector3, zaxis: Vector3): void;
  50. /**
  51. * Creates an instance of this axes viewer.
  52. * @returns a new axes viewer with instanced meshes
  53. */
  54. createInstance(): AxesViewer;
  55. /** Releases resources */
  56. dispose(): void;
  57. private static _SetRenderingGroupId;
  58. }