Point3D
Object Hierarchy:
Description:
[ CCode ( cname = "graphene_point3d_t" , copy_function = "g_boxed_copy" , free_function = "g_boxed_free" , lower_case_csuffix = "point3d" , type_id = "graphene_point3d_get_type ()" ) ]
[ Version ( since = "1.0" ) ]
public struct Point3D
A point with three components: X, Y, and Z.
Content:
Static methods:
Methods:
- public Point3D cross (Point3D b)
Computes the cross product of the two given Point3D
.
- public float distance (Point3D b, out Vec3 delta)
Computes the distance between the two given Point3D
.
- public float dot (Point3D b)
Computes the dot product of the two given Point3D
.
- public bool equal (Point3D b)
Checks whether two given points are equal.
- public unowned Point3D? init (float x, float y, float z)
Initializes a Point3D with the given
coordinates.
- public unowned Point3D? init_from_point (Point3D src)
Initializes a Point3D using the coordinates of
another Point3D.
- public unowned Point3D? init_from_vec3 (Vec3 v)
Initializes a Point3D using the components of a
Vec3.
- public Point3D interpolate (Point3D b, double factor)
Linearly interpolates each component of this
and b
using the provided factor
, and places the result in res
.
- public float length ()
Computes the length of the vector represented by the coordinates of the
given Point3D.
- public bool near (Point3D b, float epsilon)
Checks whether the two points are near each other, within an epsilon
factor.
- public Point3D normalize ()
Computes the normalization of the vector represented by the coordinates of
the given Point3D.
- public Point3D normalize_viewport (Rect viewport, float z_near, float z_far)
Normalizes the coordinates of a Point3D using
the given viewport and clipping planes.
- public Point3D scale (float factor)
Scales the coordinates of the given Point3D by
the given factor
.
- public Vec3 to_vec3 ()
Stores the coordinates of a Point3D into a
Vec3.
Fields: