Point3D

class Point3D(pointer: <Error class: unknown class><<Error class: unknown class>>)

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

Since

1.0

Constructors

Link copied to clipboard
constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val graphenePoint3DPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
var x: Float

the X coordinate

Link copied to clipboard
var y: Float

the Y coordinate

Link copied to clipboard
var z: Float

the Z coordinate

Functions

Link copied to clipboard
fun cross(b: Point3D, res: Point3D)

Computes the cross product of the two given #graphene_point3d_t.

Link copied to clipboard
fun distance(b: Point3D, delta: Vec3?): Float

Computes the distance between the two given #graphene_point3d_t.

Link copied to clipboard
fun dot(b: Point3D): Float

Computes the dot product of the two given #graphene_point3d_t.

Link copied to clipboard

Checks whether two given points are equal.

Link copied to clipboard
fun free()

Frees the resources allocated via graphene_point3d_alloc().

Link copied to clipboard
fun init(x: Float, y: Float, z: Float): Point3D

Initializes a #graphene_point3d_t with the given coordinates.

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard
fun interpolate(b: Point3D, factor: Double, res: Point3D)

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

Link copied to clipboard
fun length(): Float

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

Link copied to clipboard
fun near(b: Point3D, epsilon: Float): Boolean

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

Link copied to clipboard
fun normalize(res: Point3D)

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

Link copied to clipboard
fun normalizeViewport(viewport: Rect, zNear: Float, zFar: Float, res: Point3D)

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

Link copied to clipboard
fun scale(factor: Float, res: Point3D)

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

Link copied to clipboard
fun toVec3(v: Vec3)

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