Triangle

A triangle.

Members

Functions

containsPoint
bool containsPoint(graphene.point3_d.Point3D p)

Checks whether the given triangle t contains the point p.

equal
bool equal(graphene.triangle.Triangle b)

Checks whether the two given #graphene_triangle_t are equal.

getArea
float getArea()

Computes the area of the given #graphene_triangle_t.

getBarycoords
bool getBarycoords(graphene.point3_d.Point3D p, graphene.vec2.Vec2 res)

Computes the barycentric coordinates of the given point p.

getBoundingBox
void getBoundingBox(graphene.box.Box res)

Computes the bounding box of the given #graphene_triangle_t.

getMidpoint
void getMidpoint(graphene.point3_d.Point3D res)

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

getNormal
void getNormal(graphene.vec3.Vec3 res)

Computes the normal vector of the given #graphene_triangle_t.

getPlane
void getPlane(graphene.plane.Plane res)

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

getPoints
void getPoints(graphene.point3_d.Point3D a, graphene.point3_d.Point3D b, graphene.point3_d.Point3D c)

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

getUv
bool getUv(graphene.point3_d.Point3D p, graphene.vec2.Vec2 uvA, graphene.vec2.Vec2 uvB, graphene.vec2.Vec2 uvC, graphene.vec2.Vec2 res)

Computes the UV coordinates of the given point p.

getVertices
void getVertices(graphene.vec3.Vec3 a, graphene.vec3.Vec3 b, graphene.vec3.Vec3 c)

Retrieves the three vertices of the given #graphene_triangle_t.

initFromFloat
graphene.triangle.Triangle initFromFloat(float[] a, float[] b, float[] c)

Initializes a #graphene_triangle_t using the three given arrays of floating point values, each representing the coordinates of a point in 3D space.

initFromPoint3d
graphene.triangle.Triangle initFromPoint3d(graphene.point3_d.Point3D a, graphene.point3_d.Point3D b, graphene.point3_d.Point3D c)

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

initFromVec3
graphene.triangle.Triangle initFromVec3(graphene.vec3.Vec3 a, graphene.vec3.Vec3 b, graphene.vec3.Vec3 c)

Initializes a #graphene_triangle_t using the three given vectors.

Static functions

alloc
graphene.triangle.Triangle alloc()

Allocates a new #graphene_triangle_t.

Inherited Members

From Boxed

cInstancePtr
void* cInstancePtr;

Pointer to the C boxed value

getType
GType getType()

Get the GType of this boxed type.

gType
GType gType [@property getter]

Boxed GType property.

self
Boxed self()

Convenience method to return this cast to a type. For use in D with statements.

copy_
void* copy_()

Make a copy of the wrapped C boxed data.

boxedCopy
void* boxedCopy(void* cBoxed)

Copy a C boxed value using g_boxed_copy.

boxedFree
void boxedFree(void* cBoxed)

Free a C boxed value using g_boxed_free.