graphene.triangle
Module for [Triangle] class
class Triangle
Types 1
classTriangle : gobject.boxed.Boxed
A triangle.
Methods
graphene.triangle.Triangle alloc()Allocates a new #graphenetrianglet.bool containsPoint(graphene.point3_d.Point3D p)Checks whether the given triangle `t` contains the point `p`.bool equal(graphene.triangle.Triangle b)Checks whether the two given #graphenetrianglet are equal.float getArea()Computes the area of the given #graphenetrianglet. Returns: the area of the trianglebool getBarycoords(graphene.point3_d.Point3D p, out graphene.vec2.Vec2 res)Computes the [barycentric coordinates](http://en.wikipedia.org/wiki/Barycentriccoordinatesystem) of the given point `p`.void getBoundingBox(out graphene.box.Box res)Computes the bounding box of the given #graphenetrianglet.void getMidpoint(out graphene.point3_d.Point3D res)Computes the coordinates of the midpoint of the given #graphenetrianglet.void getNormal(out graphene.vec3.Vec3 res)Computes the normal vector of the given #graphenetrianglet.void getPlane(out graphene.plane.Plane res)Computes the plane based on the vertices of the given #graphenetrianglet.void getPoints(out graphene.point3_d.Point3D a, out graphene.point3_d.Point3D b, out graphene.point3_d.Point3D c)Retrieves the three vertices of the given #graphenetrianglet and returns their coordinates as #graphenepoint3dt.bool getUv(graphene.point3_d.Point3D p, graphene.vec2.Vec2 uvA, graphene.vec2.Vec2 uvB, graphene.vec2.Vec2 uvC, out graphene.vec2.Vec2 res)Computes the UV coordinates of the given point `p`.void getVertices(out graphene.vec3.Vec3 a, out graphene.vec3.Vec3 b, out graphene.vec3.Vec3 c)Retrieves the three vertices of the given #graphenetrianglet.graphene.triangle.Triangle initFromFloat(float[] a, float[] b, float[] c)Initializes a #graphenetrianglet using the three given arrays of floating point values, each representing the coordinates of a point in 3D space.graphene.triangle.Triangle initFromPoint3d(graphene.point3_d.Point3D a, graphene.point3_d.Point3D b, graphene.point3_d.Point3D c)Initializes a #graphenetrianglet using the three given 3D points.graphene.triangle.Triangle initFromVec3(graphene.vec3.Vec3 a = null, graphene.vec3.Vec3 b = null, graphene.vec3.Vec3 c = null)Initializes a #graphenetrianglet using the three given vectors.