graphene.point3_d
Module for [Point3D] struct
struct Point3D
Types 1
structPoint3D
A point with three components: X, Y, and Z.
Fields
float xthe X coordinatefloat ythe Y coordinatefloat zthe Z coordinateMethods
void * boxCopy()void cross(graphene.point3_d.Point3D b, out graphene.point3_d.Point3D res)Computes the cross product of the two given #graphenepoint3dt.float distance(graphene.point3_d.Point3D b, out graphene.vec3.Vec3 delta)Computes the distance between the two given #graphenepoint3dt.float dot(graphene.point3_d.Point3D b)Computes the dot product of the two given #graphenepoint3dt.bool equal(graphene.point3_d.Point3D b)Checks whether two given points are equal.graphene.point3_d.Point3D init_(float x, float y, float z)Initializes a #graphenepoint3dt with the given coordinates.graphene.point3_d.Point3D initFromPoint(graphene.point3_d.Point3D src)Initializes a #graphenepoint3dt using the coordinates of another #graphenepoint3dt.graphene.point3_d.Point3D initFromVec3(graphene.vec3.Vec3 v)Initializes a #graphenepoint3dt using the components of a #graphenevec3t.void interpolate(graphene.point3_d.Point3D b, double factor, out graphene.point3_d.Point3D res)Linearly interpolates each component of `a` and `b` using the provided factor, and places the result in res.float length()Computes the length of the vector represented by the coordinates of the given #graphenepoint3dt. Returns: the length of the vector represented by the pointbool near(graphene.point3_d.Point3D b, float epsilon)Checks whether the two points are near each other, within an epsilon factor.void normalize(out graphene.point3_d.Point3D res)Computes the normalization of the vector represented by the coordinates of the given #graphenepoint3dt.void normalizeViewport(graphene.rect.Rect viewport, float zNear, float zFar, out graphene.point3_d.Point3D res)Normalizes the coordinates of a #graphenepoint3dt using the given viewport and clipping planes.void scale(float factor, out graphene.point3_d.Point3D res)Scales the coordinates of the given #graphenepoint3dt by the given factor.void toVec3(out graphene.vec3.Vec3 v)Stores the coordinates of a #graphenepoint3dt into a #graphenevec3t.graphene.point3_d.Point3D zero()Retrieves a constant point with all three coordinates set to 0. Returns: a zero point