Github User Fetcher 1.0.0
C Application with Server and GUI
|
Go to the source code of this file.
Macros | |
#define | graphene_simd4x4f_transpose_in_place(s) (graphene_simd4x4f_transpose_in_place ((graphene_simd4x4f_t *) (s))) |
#define graphene_simd4x4f_transpose_in_place | ( | s | ) | (graphene_simd4x4f_transpose_in_place ((graphene_simd4x4f_t *) (s))) |
Definition at line 210 of file graphene-simd4x4f.h.
Referenced by graphene_simd4x4f_inv_ortho_point3_mul(), graphene_simd4x4f_inv_ortho_vec3_mul(), and graphene_simd4x4f_transpose().
|
inlinestatic |
graphene_simd4x4f_add: : a graphene_simd4x4f_t : a graphene_simd4x4f_t @res: (out caller-allocates): return location for a graphene_simd4x4f_t
Adds each row vector of and and places the results in @res.
Since: 1.0
Definition at line 880 of file graphene-simd4x4f.h.
References graphene_simd4f_add, graphene_simd4x4f_t::w, graphene_simd4x4f_t::x, graphene_simd4x4f_t::y, and graphene_simd4x4f_t::z.
|
inlinestatic |
graphene_simd4x4f_determinant: @m: a graphene_simd4x4f_t @det_r: (out): return location for the matrix determinant @invdet_r: (out): return location for the inverse of the matrix determinant
Computes the determinant (and its inverse) of the given matrix
Since: 1.0
Definition at line 1068 of file graphene-simd4x4f.h.
References graphene_simd4f_add, graphene_simd4f_div, graphene_simd4f_madd(), graphene_simd4f_merge_high, graphene_simd4f_mul, graphene_simd4f_shuffle_wxyz, graphene_simd4f_shuffle_yzwx, graphene_simd4f_shuffle_zwxy, graphene_simd4f_splat, graphene_simd4f_splat_x, graphene_simd4f_splat_y, graphene_simd4f_sub, NULL, graphene_simd4x4f_t::w, graphene_simd4x4f_t::x, graphene_simd4x4f_t::y, and graphene_simd4x4f_t::z.
|
inlinestatic |
graphene_simd4x4f_div: : a graphene_simd4x4f_t : a graphene_simd4x4f_t @res: (out caller-allocates): return location for a graphene_simd4x4f_t
Divides each row vector of and and places the results in @res.
Since: 1.0
Definition at line 945 of file graphene-simd4x4f.h.
References graphene_simd4f_div, graphene_simd4x4f_t::w, graphene_simd4x4f_t::x, graphene_simd4x4f_t::y, and graphene_simd4x4f_t::z.
|
inlinestatic |
A SIMD-based matrix type that uses four graphene_simd4f_t vectors.
The matrix is treated as row-major, i.e. the x, y, z, and w vectors are rows, and elements of each vector are a column:
|[ graphene_simd4x4f_t = { x.x, x.y, x.z, x.w, y.x, y.y, y.z, y.w, z.x, z.y, z.z, z.w, w.x, w.y, w.z, w.w } ]|
The contents of the graphene_simd4x4f_t type are private and cannot be accessed directly; use the provided API instead.
Since: 1.0 graphene_simd4x4f_init: @x: a graphene_simd4f_t for the first row @y: a graphene_simd4f_t for the second row @z: a graphene_simd4f_t for the third row @w: a graphene_simd4f_t for the fourth row
Creates a new graphene_simd4x4f_t using the given row vectors to initialize it.
Returns: the newly created graphene_simd4x4f_t
Since: 1.0
Definition at line 73 of file graphene-simd4x4f.h.
References s, graphene_simd4f_t::w, graphene_simd4x4f_t::x, graphene_simd4f_t::y, and graphene_simd4f_t::z.
Referenced by graphene_simd4x4f_init_identity(), graphene_simd4x4f_inverse(), graphene_simd4x4f_matrix_mul(), graphene_simd4x4f_perspective(), graphene_simd4x4f_rotation(), graphene_simd4x4f_scale(), and graphene_simd4x4f_translation().
|
inlinestatic |
graphene_simd4x4f_init_from_float: @m: a graphene_simd4x4f_t @f: (array fixed-size=16): an array of 16 floating point values
Initializes a graphene_simd4x4f_t with the given array of floating point values.
Since: 1.0
Definition at line 116 of file graphene-simd4x4f.h.
References graphene_simd4f_init_4f, graphene_simd4x4f_t::w, graphene_simd4x4f_t::x, graphene_simd4x4f_t::y, and graphene_simd4x4f_t::z.
|
inlinestatic |
graphene_simd4x4f_init_frustum: @m: a graphene_simd4x4f_t @left: distance of the left clipping plane @right: distance of the right clipping plane @bottom: distance of the bottom clipping plane @top: distance of the top clipping plane @z_near: distance of the near clipping plane @z_far: distance of the far clipping plane
Initializes a SIMD matrix with a frustum described by the distances of six clipping planes.
Since: 1.2
Definition at line 696 of file graphene-simd4x4f.h.
References graphene_simd4f_init, left, right, graphene_simd4x4f_t::w, graphene_simd4x4f_t::x, graphene_simd4x4f_t::y, and graphene_simd4x4f_t::z.
|
inlinestatic |
graphene_simd4x4f_init_identity: @m: a graphene_simd4x4f_t
Initializes @m to be the identity matrix.
Since: 1.0
Definition at line 97 of file graphene-simd4x4f.h.
References graphene_simd4f_init, and graphene_simd4x4f_init().
|
inlinestatic |
graphene_simd4x4f_init_look_at: @m: a graphene_simd4x4f_t @eye: vector for the camera coordinates @center: vector for the object coordinates @up: vector for the upwards direction
Initializes a SIMD matrix with the projection necessary for the camera at the @eye coordinates to look at the object at the @center coordinates. The top of the camera is aligned to the @up vector.
Since: 1.0
Definition at line 635 of file graphene-simd4x4f.h.
References graphene_simd4f_add, graphene_simd4f_cross3, graphene_simd4f_dot3, graphene_simd4f_dup_4f, graphene_simd4f_get_x, graphene_simd4f_get_z, graphene_simd4f_init, graphene_simd4f_neg, graphene_simd4f_normalize3(), graphene_simd4f_sub, graphene_simd4x4f_t::w, graphene_simd4x4f_t::x, graphene_simd4x4f_t::y, and graphene_simd4x4f_t::z.
|
inlinestatic |
graphene_simd4x4f_init_ortho: @m: a graphene_simd4x4f_t @left: edge of the left clipping plane @right: edge of the right clipping plane @bottom: edge of the bottom clipping plane @top: edge of the top clipping plane @z_near: depth of the near clipping plane @z_far: depth of the far clipping plane
Initializes the given SIMD matrix with an orthographic projection.
Since: 1.0
Definition at line 595 of file graphene-simd4x4f.h.
References graphene_simd4f_init, left, right, graphene_simd4x4f_t::w, graphene_simd4x4f_t::x, graphene_simd4x4f_t::y, and graphene_simd4x4f_t::z.
|
inlinestatic |
graphene_simd4x4f_init_perspective: @m: a graphene_simd4x4f_t @fovy_rad: the angle of the field of vision, in radians @aspect: the aspect value @z_near: the depth of the near clipping plane @z_far: the depth of the far clipping plane
Initializes a graphene_simd4x4f_t with a perspective projection.
Since: 1.0
Definition at line 560 of file graphene-simd4x4f.h.
References GRAPHENE_PI_2, graphene_simd4f_init, graphene_simd4x4f_t::w, graphene_simd4x4f_t::x, graphene_simd4x4f_t::y, and graphene_simd4x4f_t::z.
|
inlinestatic |
graphene_simd4x4f_inv_ortho_point3_mul: : a graphene_simd4x4f_t : a graphene_simd4x4f_t @res: (out): return location for the result vector
Performs the inverse orthographic transformation of the first three components in the given vector, using the given SIMD matrix.
Unlike graphene_simd4x4f_inv_ortho_vec3_mul(), this function will also use the fourth row vector of the SIMD matrix.
Since: 1.0
Definition at line 447 of file graphene-simd4x4f.h.
References graphene_simd4f_init, graphene_simd4f_sub, graphene_simd4x4f_point3_mul(), graphene_simd4x4f_transpose_in_place, and graphene_simd4x4f_t::w.
|
inlinestatic |
graphene_simd4x4f_inv_ortho_vec3_mul: : a graphene_simd4x4f_t : a graphene_simd4f_t @res: (out): return location for the transformed vector
Performs the inverse orthographic transformation of the first three components in the given vector, using the first three row vectors of the given SIMD matrix.
Since: 1.0
Definition at line 418 of file graphene-simd4x4f.h.
References graphene_simd4f_init, graphene_simd4x4f_transpose_in_place, graphene_simd4x4f_vec3_mul(), and graphene_simd4x4f_t::w.
|
inlinestatic |
graphene_simd4x4f_inverse: @m: a graphene_simd4x4f_t @res: (out): return location for the inverse matrix
Inverts the given graphene_simd4x4f_t.
Returns: true
if the matrix was invertible
Since: 1.0
Definition at line 967 of file graphene-simd4x4f.h.
References graphene_simd4f_add, graphene_simd4f_div, graphene_simd4f_flip_sign_0101, graphene_simd4f_flip_sign_1010, graphene_simd4f_get_x, graphene_simd4f_madd(), graphene_simd4f_merge_high, graphene_simd4f_mul, graphene_simd4f_shuffle_wxyz, graphene_simd4f_shuffle_yzwx, graphene_simd4f_shuffle_zwxy, graphene_simd4f_splat, graphene_simd4f_splat_x, graphene_simd4f_splat_y, graphene_simd4f_sub, graphene_simd4x4f_init(), graphene_simd4x4f_transpose(), graphene_simd4x4f_t::w, graphene_simd4x4f_t::x, graphene_simd4x4f_t::y, and graphene_simd4x4f_t::z.
|
inlinestatic |
graphene_simd4x4f_is_2d: @m: a graphene_simd4x4f_t
Checks whether the given matrix is compatible with an affine transformation matrix.
Returns: true
if the matrix is compatible with an affine transformation matrix
Since: 1.0
Definition at line 1156 of file graphene-simd4x4f.h.
References graphene_simd4f_dup_4f, graphene_simd4f_get_w, graphene_simd4f_get_z, graphene_simd4x4f_t::w, graphene_simd4x4f_t::x, graphene_simd4x4f_t::y, and graphene_simd4x4f_t::z.
|
inlinestatic |
graphene_simd4x4f_is_identity: @m: a graphene_simd4x4f_t
Checks whether the given matrix is the identity matrix.
Returns: true
if the matrix is the identity matrix
Since: 1.0
Definition at line 1130 of file graphene-simd4x4f.h.
References graphene_simd4f_cmp_eq, graphene_simd4f_init, graphene_simd4x4f_t::w, graphene_simd4x4f_t::x, graphene_simd4x4f_t::y, and graphene_simd4x4f_t::z.
|
inlinestatic |
graphene_simd4x4f_matrix_mul: : a graphene_simd4x4f_t : a graphene_simd4x4f_t @res: (out): return location for the result
Multiplies the two matrices, following the convention:
|[ res = A × B
= ⎡ A.x × B ⎤ ⎜ A.y × B ⎟ ⎜ A.z × B ⎟ ⎣ A.w × B ⎦ = ⎡ res.x ⎤ ⎜ res.y ⎟ ⎜ res.z ⎟ ⎣ res.w ⎦
]|
See also: graphene_simd4x4f_vec4_mul()
Since: 1.0
Definition at line 487 of file graphene-simd4x4f.h.
References graphene_simd4f_init, graphene_simd4f_mul, graphene_simd4f_sum_scalar(), graphene_simd4x4f_init(), graphene_simd4x4f_transpose(), graphene_simd4x4f_vec4_mul(), graphene_simd4x4f_t::w, graphene_simd4x4f_t::x, graphene_simd4x4f_t::y, and graphene_simd4x4f_t::z.
|
inlinestatic |
graphene_simd4x4f_mul: : a graphene_simd4x4f_t : a graphene_simd4x4f_t @res: (out caller-allocates): return location for a graphene_simd4x4f_t
Multiplies each row vector of and and places the results in @res.
You most likely want graphene_simd4x4f_matrix_mul() instead.
Since: 1.0
Definition at line 924 of file graphene-simd4x4f.h.
References graphene_simd4f_mul, graphene_simd4x4f_t::w, graphene_simd4x4f_t::x, graphene_simd4x4f_t::y, and graphene_simd4x4f_t::z.
|
inlinestatic |
graphene_simd4x4f_perspective: @m: a graphene_simd4x4f_t @depth: depth of the perspective
Adds a perspective transformation for the given @depth.
Since: 1.0
Definition at line 728 of file graphene-simd4x4f.h.
References depth, graphene_simd4f_get_w, graphene_simd4f_get_x, graphene_simd4f_get_y, graphene_simd4f_get_z, graphene_simd4f_merge_w, graphene_simd4f_mul, graphene_simd4f_neg, graphene_simd4f_reciprocal, graphene_simd4f_splat, graphene_simd4f_sum(), graphene_simd4x4f_init(), graphene_simd4x4f_transpose(), graphene_simd4x4f_t::w, graphene_simd4x4f_t::x, graphene_simd4x4f_t::y, and graphene_simd4x4f_t::z.
|
inlinestatic |
graphene_simd4x4f_point3_mul: @m: a graphene_simd4x4f_t : a graphene_simd4f_t @res: (out): return location for a graphene_simd4f_t
Multiplies the given graphene_simd4x4f_t with the given graphene_simd4f_t.
Unlike graphene_simd4x4f_vec3_mul(), this function will use the W components of the matrix:
|[ res = b × A
= ⎡x⎤ ⎛ x.x x.y x.z x.w ⎞ ⎜y⎟ ⎜ y.x y.y y.z y.w ⎟ ⎜z⎟ ⎜ z.x z.y z.z z.w ⎟ ⎣w⎦ ⎝ w.x w.y w.z w.w ⎠ = [ x.x × x x.y × x x.z × x x.w × x ] + + + + [ y.x × y y.y × y y.z × y y.w × y ] + + + + [ z.x × z z.y × z z.z × z z.w × z ] + + + + [ w.x w.y w.z w.w ] = ⎡ x.x × x + y.x × y + z.x × z + w.x ⎤ ⎜ x.y × x + y.y × y + z.y × z + w.y ⎟ ⎜ x.z × x + y.z × y + z.z × z + w.z ⎟ ⎣ x.w × x + y.w × y + z.w × z + w.w ⎦
]|
Since: 1.0
Definition at line 373 of file graphene-simd4x4f.h.
References graphene_simd4f_add, graphene_simd4f_mul, graphene_simd4f_splat_x, graphene_simd4f_splat_y, graphene_simd4f_splat_z, graphene_simd4x4f_t::w, graphene_simd4x4f_t::x, graphene_simd4x4f_t::y, and graphene_simd4x4f_t::z.
Referenced by graphene_simd4x4f_inv_ortho_point3_mul().
|
inlinestatic |
graphene_simd4x4f_rotation: @m: a graphene_simd4x4f_t @rad: the rotation, in radians @axis: the vector of the axis of rotation
Initializes @m to contain a rotation of the given angle along the given axis.
Since: 1.0
Definition at line 831 of file graphene-simd4x4f.h.
References graphene_simd4f_get_x, graphene_simd4f_get_y, graphene_simd4f_get_z, graphene_simd4f_init, graphene_simd4f_normalize3(), and graphene_simd4x4f_init().
|
inlinestatic |
graphene_simd4x4f_scale: @m: a graphene_simd4x4f_t @x: scaling factor on the X axis @y: scaling factor on the Y axis @z: scaling factor on the Z axis
Initializes @m to contain a scaling transformation with the given factors.
Since: 1.0
Definition at line 807 of file graphene-simd4x4f.h.
References graphene_simd4f_init, and graphene_simd4x4f_init().
|
inlinestatic |
graphene_simd4x4f_sub: : a graphene_simd4x4f_t : a graphene_simd4x4f_t @res: (out caller-allocates): return location for a graphene_simd4x4f_t
Subtracts each row vector of and and places the results in @res.
Since: 1.0
Definition at line 901 of file graphene-simd4x4f.h.
References graphene_simd4f_sub, graphene_simd4x4f_t::w, graphene_simd4x4f_t::x, graphene_simd4x4f_t::y, and graphene_simd4x4f_t::z.
|
inlinestatic |
graphene_simd4x4f_sum: : a graphene_simd4f_t @res: (out): return location for the sum vector
Adds all the row vectors of .
Since: 1.0
Definition at line 227 of file graphene-simd4x4f.h.
References graphene_simd4f_add, and s.
|
inlinestatic |
graphene_simd4x4f_to_float: @m: a #graphene_sidm4x4f_t @v: (out caller-allocates) (array fixed-size=16): a floating point values vector capable of holding at least 16 values
Copies the content of @m in a float array.
Since: 1.0
Definition at line 136 of file graphene-simd4x4f.h.
References graphene_simd4f_dup_4f, graphene_simd4x4f_t::w, graphene_simd4x4f_t::x, graphene_simd4x4f_t::y, and graphene_simd4x4f_t::z.
|
inlinestatic |
graphene_simd4x4f_translation: @m: a graphene_simd4x4f_t @x: coordinate of the X translation @y: coordinate of the Y translation @z: coordinate of the Z translation
Initializes @m to contain a translation to the given coordinates.
Since: 1.0
Definition at line 783 of file graphene-simd4x4f.h.
References graphene_simd4f_init, and graphene_simd4x4f_init().
|
inlinestatic |
graphene_simd4x4f_transpose: @s: a graphene_simd4x4f_t @res: (out): return location for the transposed matrix
Transposes the given graphene_simd4x4f_t.
Since: 1.0
Definition at line 398 of file graphene-simd4x4f.h.
References graphene_simd4x4f_transpose_in_place, and s.
Referenced by graphene_simd4x4f_inverse(), graphene_simd4x4f_matrix_mul(), and graphene_simd4x4f_perspective().
GRAPHENE_AVAILABLE_IN_1_0 void graphene_simd4x4f_transpose_in_place | ( | graphene_simd4x4f_t * | s | ) |
|
inlinestatic |
graphene_simd4x4f_vec3_mul: @m: a graphene_simd4x4f_t @v: a graphene_simd4f_t @res: (out): return location for a graphene_simd4f_t
Left multiplies the given graphene_simd4x4f_t with the given graphene_simd4f_t, using only the first three row vectors of the matrix, and the first three components of the vector; the W components of the matrix and vector are ignored:
|[ res = b × A
= ⎡x⎤ ⎛ x.x x.y x.z ⎞ ⎜y⎟ ⎜ y.x y.y y.z ⎟ ⎣z⎦ ⎝ z.x z.y z.z ⎠ = [ x.x × x x.y × x x.z × x ] + + + [ y.x × y y.y × y y.z × y ] + + + [ z.x × z z.y × z z.z × z ] = ⎡ x.x × x + y.x × y + z.x × z ⎤ ⎜ x.y × x + y.y × y + z.y × z ⎟ ⎜ x.z × x + y.z × y + z.z × z ⎟ ⎣ 0 ⎦
]|
See also: graphene_simd4x4f_vec4_mul(), graphene_simd4x4f_point3_mul()
Since: 1.0
Definition at line 321 of file graphene-simd4x4f.h.
References graphene_simd4f_add, graphene_simd4f_mul, graphene_simd4f_splat_x, graphene_simd4f_splat_y, graphene_simd4f_splat_z, graphene_simd4f_zero_w, graphene_simd4x4f_t::x, graphene_simd4x4f_t::y, and graphene_simd4x4f_t::z.
Referenced by graphene_simd4x4f_inv_ortho_vec3_mul().
|
inlinestatic |
graphene_simd4x4f_vec4_mul: : a graphene_simd4x4f_t : a graphene_simd4f_t @res: (out): return location for a graphene_simd4f_t
Left multiplies the given graphene_simd4x4f_t with the given graphene_simd4f_t row vector using a dot product:
|[ res = b × A
= ⎡x⎤ ⎛ x.x x.y x.z x.w ⎞ ⎜y⎟ ⎜ y.x y.y y.z y.w ⎟ ⎜z⎟ ⎜ z.x z.y z.z z.w ⎟ ⎣w⎦ ⎝ w.x w.y w.z w.w ⎠ = [ x.x × x x.y × x x.z × x x.w × x ] + + + + [ y.x × y y.y × y y.z × y y.w × y ] + + + + [ z.x × z z.y × z z.z × z z.w × z ] + + + + [ w.x × w w.y × w w.z × w w.w × w ] = ⎡ x.x × x + y.x × y + z.x × z + w.x × w ⎤ ⎜ x.y × x + y.y × y + z.y × z + w.y × w ⎟ ⎜ x.z × x + y.z × y + z.z × z + w.z × w ⎟ ⎣ x.w × x + y.w × y + z.w × z + w.w × w ⎦
]|
Since: 1.0
Definition at line 270 of file graphene-simd4x4f.h.
References graphene_simd4f_add, graphene_simd4f_mul, graphene_simd4f_splat_w, graphene_simd4f_splat_x, graphene_simd4f_splat_y, and graphene_simd4f_splat_z.
Referenced by graphene_simd4x4f_matrix_mul().