Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: GraphenePoint3D

[29:7] extends: object

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

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • GraphenePoint3D (Handle = null)

    Allocates a #graphene_point3d_t structure.

    • @p Handle is an optional native handle or wrapper whose handle to adopt; when the native constructor is called.
  • toNativeHandle (Source)

    Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from fn.call(...), another generated wrapper exposing handle(), or null. Returns null when the argument carries no pointer.

    • @p Source is the raw handle, raw buffer, wrapper, or null.
    • @r A raw pointer carrier or null when no pointer is present.
  • getLib ()

    Returns the opened native library for this generated wrapper.

    • @r The opened native library.
  • handle ()

    Returns the wrapped NativeHandle.

    • @r The wrapped NativeHandle.
  • isNull ()

    Returns true when the wrapped handle is null.

    • @r A bool.
  • describe ()

    Returns a small string for debugging generated wrappers.

    • @r A string.
  • cross (object b)

    Computes the cross product of the two given #graphene_point3d_t.

    • @p b is a #graphene_point3d_t.
    • @p res is return location for the cross product.
    • @r None.
  • distance (object b)

    Computes the distance between the two given #graphene_point3d_t.

    • @p b is a #graphene_point3d_t.
    • @p delta is return location for the distance components on the X, Y, and Z axis.
    • @r the distance between two points.
  • dot (object b)

    Computes the dot product of the two given #graphene_point3d_t.

    • @p b is a #graphene_point3d_t.
    • @r the value of the dot product.
  • equal (object b)

    Checks whether two given points are equal.

    • @p b is a #graphene_point3d_t.
    • @r true if the points are equal.
  • free ()

    Frees the resources allocated via graphene_point3d_alloc().

    • @r None.
  • init (double x, double y, double z)

    Initializes a #graphene_point3d_t with the given coordinates.

    • @p x is the X coordinate of the point.
    • @p y is the Y coordinate of the point.
    • @p z is the Z coordinate of the point.
    • @r the initialized #graphene_point3d_t.
  • init_from_point (object src)

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

    • @p src is a #graphene_point3d_t.
    • @r the initialized point.
  • init_from_vec3 (object v)

    Initializes a #graphene_point3d_t using the components of a #graphene_vec3_t.

    • @p v is a #graphene_vec3_t.
    • @r the initialized #graphene_point3d_t.
  • interpolate (object b, double factor)

    Linearly interpolates each component of @a and @b using the provided

    • @factor, and places the result in @res.
    • @p b is a #graphene_point3d_t.
    • @p factor is the interpolation factor.
    • @p res is the return location for the interpolated #graphene_point3d_t.
    • @r None.
  • length ()

    Computes the length of the vector represented by the coordinates of the given #graphene_point3d_t.

    • @r the length of the vector represented by the point.
  • near (object b, double epsilon)

    Checks whether the two points are near each other, within an @epsilon factor.

    • @p b is a #graphene_point3d_t.
    • @p epsilon is fuzzyness factor.
    • @r true if the points are near each other.
  • normalize ()

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

    • @p res is return location for the normalized #graphene_point3d_t.
    • @r None.
  • normalize_viewport (object viewport, double z_near, double z_far)

    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.

    • @p viewport is a #graphene_rect_t representing a viewport.
    • @p z_near is the coordinate of the near clipping plane, or 0 for the default near clipping plane.
    • @p z_far is the coordinate of the far clipping plane, or 1 for the default far clipping plane.
    • @p res is the return location for the normalized #graphene_point3d_t.
    • @r None.
  • scale (double factor)

    Scales the coordinates of the given #graphene_point3d_t by the given

    • @factor. ``
    • @p factor is the scaling factor.
    • @p res is return location for the scaled point.
    • @r None.
  • to_vec3 ()

    Stores the coordinates of a #graphene_point3d_t into a #graphene_vec3_t.

    • @p v is return location for a #graphene_vec3_t.
    • @r None.

class: GraphenePoint3DLayout

[12:14] static extends: object

Generated struct layout helper for GIR record Point3D.

Methods

  • layout ()

    Returns the Panama struct layout for Point3D.