Point3D

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

Constructors

this
this(graphene_point3d_t* graphene_point3d, bool ownedRef)

Sets our main struct and passes it to the parent class.

this
this()

Allocates a #graphene_point3d_t structure.

Destructor

~this
~this()
Undocumented in source.

Members

Functions

cross
void cross(Point3D b, Point3D res)

Computes the cross product of the two given #graphene_point3d_t.

distance
float distance(Point3D b, Vec3 delta)

Computes the distance between the two given #graphene_point3d_t.

dot
float dot(Point3D b)

Computes the dot product of the two given #graphene_point3d_t.

equal
bool equal(Point3D b)

Checks whether two given points are equal.

free
void free()

Frees the resources allocated via graphene_point3d_alloc().

getPoint3DStruct
graphene_point3d_t* getPoint3DStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

init
Point3D init(float x, float y, float z)

Initializes a #graphene_point3d_t with the given coordinates.

initFromPoint
Point3D initFromPoint(Point3D src)

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

initFromVec3
Point3D initFromVec3(Vec3 v)

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

interpolate
void interpolate(Point3D b, double factor, 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(Point3D b, float epsilon)

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

normalize
void normalize(Point3D res)

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

normalizeViewport
void normalizeViewport(Rect viewport, float zNear, float zFar, Point3D res)

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

scale
void scale(float factor, Point3D res)

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

toVec3
void toVec3(Vec3 v)

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

Properties

x
float x [@property getter]
float x [@property setter]

the X coordinate

y
float y [@property getter]
float y [@property setter]

the Y coordinate

z
float z [@property getter]
float z [@property setter]

the Z coordinate

Static functions

getType
GType getType()
zero
Point3D zero()

Retrieves a constant point with all three coordinates set to 0.

Variables

graphene_point3d
graphene_point3d_t* graphene_point3d;

the main Gtk struct

ownedRef
bool ownedRef;
Undocumented in source.

Meta