Point

class Point(val graphenePointPointer: <Error class: unknown class><<Error class: unknown class>>, cleaner: <Error class: unknown class>? = null)

A point with two coordinates.

Skipped during bindings generation

  • parameter d_x: d_x: Out parameter is not supported

Since

1.0

Constructors

Link copied to clipboard
constructor()

Allocate a new Point.

constructor(scope: <Error class: unknown class>)

Allocate a new Point using the provided AutofreeScope.

constructor(x: <Error class: unknown class>, y: <Error class: unknown class>)

Allocate a new Point.

constructor(x: <Error class: unknown class>, y: <Error class: unknown class>, scope: <Error class: unknown class>)

Allocate a new Point using the provided AutofreeScope.

constructor(graphenePointPointer: <Error class: unknown class><<Error class: unknown class>>, cleaner: <Error class: unknown class>? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val graphenePointPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
var x: <Error class: unknown class>

the X coordinate of the point

Link copied to clipboard
var y: <Error class: unknown class>

the Y coordinate of the point

Functions

Link copied to clipboard

Checks if the two points @a and @b point to the same coordinates.

Link copied to clipboard
fun free()

Frees the resources allocated by graphene_point_alloc().

Link copied to clipboard
fun init(x: <Error class: unknown class>, y: <Error class: unknown class>): Point

Initializes @p to the given @x and @y coordinates.

Link copied to clipboard

Initializes @p with the same coordinates of @src.

Link copied to clipboard

Initializes @p with the coordinates inside the given #graphene_vec2_t.

Link copied to clipboard
fun interpolate(b: Point, factor: <Error class: unknown class>, res: Point)

Linearly interpolates the coordinates of @a and @b using the given @factor.

Link copied to clipboard
fun near(b: Point, epsilon: <Error class: unknown class>): Boolean

Checks whether the two points @a and @b are within the threshold of @epsilon.

Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
fun toVec2(v: Vec2)

Stores the coordinates of the given #graphene_point_t into a #graphene_vec2_t.