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

  • Computes the dot product of the two given #graphene_point3d_t.

    Parameters

    Returns number

  • 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

  • Initializes a #graphene_point3d_t using the coordinates of another #graphene_point3d_t.

    Parameters

    • src: Point3D

      a #graphene_point3d_t

    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
  • Computes the length of the vector represented by the coordinates of the given #graphene_point3d_t.

    Returns 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

  • Computes the normalization of the vector represented by the coordinates of the given #graphene_point3d_t.

    Returns Point3D

  • 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

    • zNear: number

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

    • zFar: number

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

    Returns Point3D

  • Scales the coordinates of the given #graphene_point3d_t by the given factor.

    Parameters

    • factor: number

      the scaling factor

    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