Point

class Point(pointer: <Error class: unknown class><<Error class: unknown class>>)

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(pointer: <Error class: unknown class><<Error class: unknown class>>)

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: Float

the X coordinate of the point

Link copied to clipboard
var y: Float

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: Float, y: Float): 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: Double, res: Point)

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

Link copied to clipboard
fun near(b: Point, epsilon: Float): Boolean

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

Link copied to clipboard
fun toVec2(v: Vec2)

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