Gjsify LogoGjsify Logo

A point with three components: X, Y, and Z.

record

Hierarchy

  • Point3D

Index

Constructors

Properties

x: number

the X coordinate

field
y: number

the Y coordinate

field
z: number

the Z coordinate

field
name: string

Methods

  • free(): void
  • init(x: number, y: number, z: number): Point3D
  • Initializes a #graphene_point3d_t with the given coordinates.

    Parameters

    • x: number

      the X coordinate of the point

    • y: number

      the Y coordinate of the point

    • z: number

      the Z coordinate of the point

    Returns Point3D

  • Linearly interpolates each component of a and b using the provided factor, and places the result in res.

    Parameters

    • b: Point3D

      a #graphene_point3d_t

    • factor: number

      the interpolation factor

    Returns Point3D

  • length(): number
  • near(b: Point3D, epsilon: number): boolean
  • Checks whether the two points are near each other, within an epsilon factor.

    Parameters

    • b: Point3D

      a #graphene_point3d_t

    • epsilon: number

      fuzzyness factor

    Returns boolean

  • Normalizes the coordinates of a #graphene_point3d_t using the given viewport and clipping planes.

    The coordinates of the resulting #graphene_point3d_t will be in the [ -1, 1 ] range.

    Parameters

    • viewport: Graphene.Rect

      a #graphene_rect_t representing a viewport

    • z_near: number

      the coordinate of the near clipping plane, or 0 for the default near clipping plane

    • z_far: number

      the coordinate of the far clipping plane, or 1 for the default far clipping plane

    Returns Point3D

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method