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.

Static functions

alloc
graphene.point.Point alloc()

Allocates a new #graphene_point_t structure.

zero
graphene.point.Point zero()

Returns a point fixed at (0, 0).

Inherited Members

From Boxed

cInstancePtr
void* cInstancePtr;

Pointer to the C boxed value

getType
GType getType()

Get the GType of this boxed type.

gType
GType gType [@property getter]

Boxed GType property.

self
Boxed self()

Convenience method to return this cast to a type. For use in D with statements.

copy_
void* copy_()

Make a copy of the wrapped C boxed data.

boxedCopy
void* boxedCopy(void* cBoxed)

Copy a C boxed value using g_boxed_copy.

boxedFree
void boxedFree(void* cBoxed)

Free a C boxed value using g_boxed_free.