Triangle
Object Hierarchy:
Description:
[ CCode ( cname = "graphene_triangle_t" , copy_function = "g_boxed_copy" , free_function = "g_boxed_free" , type_id = "graphene_triangle_get_type ()" ) ]
[ Version ( since = "1.2" ) ]
public struct Triangle
Content:
Methods:
- public bool contains_point (Point3D p)
Checks whether the given triangle this
contains the point p
.
- public bool equal (Triangle b)
Checks whether the two given Triangle are equal.
- public float get_area ()
Computes the area of the given Triangle.
- public bool get_barycoords (Point3D? p, out Vec2 res)
- public Box get_bounding_box ()
Computes the bounding box of the given Triangle.
- public Point3D get_midpoint ()
Computes the coordinates of the midpoint of the given
Triangle.
- public Vec3 get_normal ()
Computes the normal vector of the given Triangle
.
- public Plane get_plane ()
Computes the plane based on the vertices of the given
Triangle.
- public void get_points (out Point3D a, out Point3D b, out Point3D c)
Retrieves the three vertices of the given Triangle
and returns their coordinates as Point3D.
- public bool get_uv (Point3D? p, Vec2 uv_a, Vec2 uv_b, Vec2 uv_c, out Vec2 res)
Computes the UV coordinates of the given point p
.
- public void get_vertices (out Vec3 a, out Vec3 b, out Vec3 c)
Retrieves the three vertices of the given Triangle
.
- public unowned Triangle? init_from_float (float[] a, float[] b, float[] c)
Initializes a Triangle using the three given
arrays of floating point values, each representing the coordinates of a point in 3D space.
- public unowned Triangle? init_from_point3d (Point3D? a, Point3D? b, Point3D? c)
Initializes a Triangle using the three given 3D
points.
- public unowned Triangle? init_from_vec3 (Vec3? a, Vec3? b, Vec3? c)
Initializes a Triangle using the three given
vectors.