math.vertexFormat.d.ts 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. import { Vector3, Vector2 } from "./math.vector";
  2. /**
  3. * Contains position and normal vectors for a vertex
  4. */
  5. export declare class PositionNormalVertex {
  6. /** the position of the vertex (defaut: 0,0,0) */
  7. position: Vector3;
  8. /** the normal of the vertex (defaut: 0,1,0) */
  9. normal: Vector3;
  10. /**
  11. * Creates a PositionNormalVertex
  12. * @param position the position of the vertex (defaut: 0,0,0)
  13. * @param normal the normal of the vertex (defaut: 0,1,0)
  14. */
  15. constructor(
  16. /** the position of the vertex (defaut: 0,0,0) */
  17. position?: Vector3,
  18. /** the normal of the vertex (defaut: 0,1,0) */
  19. normal?: Vector3);
  20. /**
  21. * Clones the PositionNormalVertex
  22. * @returns the cloned PositionNormalVertex
  23. */
  24. clone(): PositionNormalVertex;
  25. }
  26. /**
  27. * Contains position, normal and uv vectors for a vertex
  28. */
  29. export declare class PositionNormalTextureVertex {
  30. /** the position of the vertex (defaut: 0,0,0) */
  31. position: Vector3;
  32. /** the normal of the vertex (defaut: 0,1,0) */
  33. normal: Vector3;
  34. /** the uv of the vertex (default: 0,0) */
  35. uv: Vector2;
  36. /**
  37. * Creates a PositionNormalTextureVertex
  38. * @param position the position of the vertex (defaut: 0,0,0)
  39. * @param normal the normal of the vertex (defaut: 0,1,0)
  40. * @param uv the uv of the vertex (default: 0,0)
  41. */
  42. constructor(
  43. /** the position of the vertex (defaut: 0,0,0) */
  44. position?: Vector3,
  45. /** the normal of the vertex (defaut: 0,1,0) */
  46. normal?: Vector3,
  47. /** the uv of the vertex (default: 0,0) */
  48. uv?: Vector2);
  49. /**
  50. * Clones the PositionNormalTextureVertex
  51. * @returns the cloned PositionNormalTextureVertex
  52. */
  53. clone(): PositionNormalTextureVertex;
  54. }