Point3D

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

Members

Functions

cross
void cross(graphene.point3_d.Point3D b, graphene.point3_d.Point3D res)

Computes the cross product of the two given #graphene_point3d_t.

distance
float distance(graphene.point3_d.Point3D b, graphene.vec3.Vec3 delta)

Computes the distance between the two given #graphene_point3d_t.

dot
float dot(graphene.point3_d.Point3D b)

Computes the dot product of the two given #graphene_point3d_t.

equal
bool equal(graphene.point3_d.Point3D b)

Checks whether two given points are equal.

initFromPoint
graphene.point3_d.Point3D initFromPoint(graphene.point3_d.Point3D src)

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

initFromVec3
graphene.point3_d.Point3D initFromVec3(graphene.vec3.Vec3 v)

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

init_
graphene.point3_d.Point3D init_(float x, float y, float z)

Initializes a #graphene_point3d_t with the given coordinates.

interpolate
void interpolate(graphene.point3_d.Point3D b, double factor, graphene.point3_d.Point3D res)

Linearly interpolates each component of a and b using the provided factor, and places the result in res.

length
float length()

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

near
bool near(graphene.point3_d.Point3D b, float epsilon)

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

normalize
void normalize(graphene.point3_d.Point3D res)

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

normalizeViewport
void normalizeViewport(graphene.rect.Rect viewport, float zNear, float zFar, graphene.point3_d.Point3D res)

Normalizes the coordinates of a #graphene_point3d_t using the given viewport and clipping planes.

scale
void scale(float factor, graphene.point3_d.Point3D res)

Scales the coordinates of the given #graphene_point3d_t by the given factor.

toVec3
void toVec3(graphene.vec3.Vec3 v)

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

Static functions

alloc
graphene.point3_d.Point3D alloc()

Allocates a #graphene_point3d_t structure.

zero
graphene.point3_d.Point3D zero()

Retrieves a constant point with all three coordinates set to 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.