Triangle

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

A triangle.

Skipped during bindings generation

  • parameter a: Array parameter of type gfloat is not supported

  • field a: Record field a is private

  • field b: Record field b is private

  • field c: Record field c is private

Since

1.2

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 grapheneTrianglePointer: <Error class: unknown class><<Error class: unknown class>>

Functions

Link copied to clipboard

Checks whether the given triangle @t contains the point @p.

Link copied to clipboard

Checks whether the two given #graphene_triangle_t are equal.

Link copied to clipboard
fun free()

Frees the resources allocated by graphene_triangle_alloc().

Link copied to clipboard
fun getArea(): Float

Computes the area of the given #graphene_triangle_t.

Link copied to clipboard
fun getBarycoords(p: Point3D? = null, res: Vec2): Boolean

Computes the barycentric * coordinates of the given point @p.

Link copied to clipboard

Computes the bounding box of the given #graphene_triangle_t.

Link copied to clipboard

Computes the coordinates of the midpoint of the given #graphene_triangle_t.

Link copied to clipboard
fun getNormal(res: Vec3)

Computes the normal vector of the given #graphene_triangle_t.

Link copied to clipboard
fun getPlane(res: Plane)

Computes the plane based on the vertices of the given #graphene_triangle_t.

Link copied to clipboard
fun getPoints(a: Point3D?, b: Point3D?, c: Point3D?)

Retrieves the three vertices of the given #graphene_triangle_t and returns their coordinates as #graphene_point3d_t.

Link copied to clipboard
fun getUv(p: Point3D? = null, uvA: Vec2, uvB: Vec2, uvC: Vec2, res: Vec2): Boolean

Computes the UV coordinates of the given point @p.

Link copied to clipboard
fun getVertices(a: Vec3?, b: Vec3?, c: Vec3?)

Retrieves the three vertices of the given #graphene_triangle_t.

Link copied to clipboard
fun initFromPoint3d(a: Point3D? = null, b: Point3D? = null, c: Point3D? = null): Triangle

Initializes a #graphene_triangle_t using the three given 3D points.

Link copied to clipboard
fun initFromVec3(a: Vec3? = null, b: Vec3? = null, c: Vec3? = null): Triangle

Initializes a #graphene_triangle_t using the three given vectors.