Point

A point with two coordinates.

Members

Functions

distance
float distance(graphene.point.Point b, float dX, float dY)

Computes the distance between a and b.

equal
bool equal(graphene.point.Point b)

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

initFromPoint
graphene.point.Point initFromPoint(graphene.point.Point src)

Initializes p with the same coordinates of src.

initFromVec2
graphene.point.Point initFromVec2(graphene.vec2.Vec2 src)

Initializes p with the coordinates inside the given #graphene_vec2_t.

init_
graphene.point.Point init_(float x, float y)

Initializes p to the given x and y coordinates.

interpolate
void interpolate(graphene.point.Point b, double factor, graphene.point.Point res)

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

near
bool near(graphene.point.Point b, float epsilon)

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

toVec2
void toVec2(graphene.vec2.Vec2 v)

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

Properties

_gType
GType _gType [@property getter]

Static functions

_getGType
GType _getGType()
zero
graphene.point.Point zero()

Returns a point fixed at (0, 0).

Variables

x
float x;

the X coordinate of the point

y
float y;

the Y coordinate of the point