Fudge Core
    Preparing search index...

    Class GizmosAbstract

    The gizmos drawing interface. Components can use this to draw visual aids inside Component.drawGizmos and Component.drawGizmosSelected.

    Index

    Constructors

    Methods

    • Draws an arrow at the given world position, facing in the given forward-direction with the given length and width. Size refers to the size of the arrow head: the height of the pyramid; the size of the cube; the diameter of the sphere.

      Parameters

      • _position: Vector3
      • _color: Color
      • _forward: Vector3

        A unit vector indicating the desired forward-direction.

      • _up: Vector3

        A unit vector indicating the up-direction.

      • _length: number
      • _width: number
      • _size: number
      • _head: typeof MeshCube | typeof MeshPyramid | typeof MeshSphere = MeshPyramid
      • _alphaOccluded: number = Gizmos.alphaOccluded

      Returns void

    • Draws lines between each pair of the given vertices. Vertices are paired sequentially, so for example, lines will be drawn between vertices 0 and 1, 2 and 3, 4 and 5, etc.

      Parameters

      Returns void

    • Draws a circle with a diameter of 1. The circle lies in the x-y plane, with its center at the origin.

      Parameters

      • _mtxWorld: Matrix4x4
      • _color: Color
      • _alphaOccluded: number = Gizmos.alphaOccluded

      Returns void

    • Draws a cone with a height and diameter of 1. The cone is oriented along the z-axis with the tip at the origin.

      Parameters

      • _mtxWorld: Matrix4x4
      • _color: Color
      • _alphaOccluded: number = Gizmos.alphaOccluded

      Returns void

    • Draws a wireframe cube. The cube has a side-length of 1 and is centered around the origin.

      Parameters

      • _mtxWorld: Matrix4x4
      • _color: Color
      • _alphaOccluded: number = Gizmos.alphaOccluded

      Returns void

    • Draws a camera frustum for the given parameters. The frustum is oriented along the z-axis, with the tip of the truncated pyramid at the origin.

      Parameters

      • _aspect: number
      • _fov: number
      • _near: number
      • _far: number
      • _direction: FIELD_OF_VIEW
      • _mtxWorld: Matrix4x4
      • _color: Color
      • _alphaOccluded: number = Gizmos.alphaOccluded

      Returns void

    • Draws a wireframe sphere. The sphere has a diameter of 1 and is centered around the origin.

      Parameters

      • _mtxWorld: Matrix4x4
      • _color: Color
      • _alphaOccluded: number = Gizmos.alphaOccluded

      Returns void