misc...
	* place created simple patch mesh not in middle of bbox, but on edge to make result more usable
	* prefs-interface-layout-single scrollable toolbar
This commit is contained in:
Garux
2017-08-02 09:47:35 +03:00
parent da43652df1
commit fb7c979d42
5 changed files with 109 additions and 79 deletions

View File

@@ -309,28 +309,7 @@ inline void matrix4_multiply_by_matrix4( Matrix4& self, const Matrix4& other ){
/// \brief Returns \p self pre-multiplied by \p other.
inline Matrix4 matrix4_premultiplied_by_matrix4( const Matrix4& self, const Matrix4& other ){
#if 1
return matrix4_multiplied_by_matrix4( other, self );
#else
return Matrix4(
self[0] * other[0] + self[1] * other[4] + self[2] * other[8] + self[3] * other[12],
self[0] * other[1] + self[1] * other[5] + self[2] * other[9] + self[3] * other[13],
self[0] * other[2] + self[1] * other[6] + self[2] * other[10] + self[3] * other[14],
self[0] * other[3] + self[1] * other[7] + self[2] * other[11] + self[3] * other[15],
self[4] * other[0] + self[5] * other[4] + self[6] * other[8] + self[7] * other[12],
self[4] * other[1] + self[5] * other[5] + self[6] * other[9] + self[7] * other[13],
self[4] * other[2] + self[5] * other[6] + self[6] * other[10] + self[7] * other[14],
self[4] * other[3] + self[5] * other[7] + self[6] * other[11] + self[7] * other[15],
self[8] * other[0] + self[9] * other[4] + self[10] * other[8] + self[11] * other[12],
self[8] * other[1] + self[9] * other[5] + self[10] * other[9] + self[11] * other[13],
self[8] * other[2] + self[9] * other[6] + self[10] * other[10] + self[11] * other[14],
self[8] * other[3] + self[9] * other[7] + self[10] * other[11] + self[11] * other[15],
self[12] * other[0] + self[13] * other[4] + self[14] * other[8] + self[15] * other[12],
self[12] * other[1] + self[13] * other[5] + self[14] * other[9] + self[15] * other[13],
self[12] * other[2] + self[13] * other[6] + self[14] * other[10] + self[15] * other[14],
self[12] * other[3] + self[13] * other[7] + self[14] * other[11] + self[15] * other[15]
);
#endif
}
/// \brief Pre-multiplies \p self by \p other in-place.
@@ -375,29 +354,7 @@ inline void matrix4_affine_multiply_by_matrix4( Matrix4& self, const Matrix4& ot
/// \brief Returns \p self pre-multiplied by \p other.
/// \p self and \p other must be affine.
inline Matrix4 matrix4_affine_premultiplied_by_matrix4( const Matrix4& self, const Matrix4& other ){
#if 1
return matrix4_affine_multiplied_by_matrix4( other, self );
#else
return Matrix4(
self[0] * other[0] + self[1] * other[4] + self[2] * other[8],
self[0] * other[1] + self[1] * other[5] + self[2] * other[9],
self[0] * other[2] + self[1] * other[6] + self[2] * other[10],
0,
self[4] * other[0] + self[5] * other[4] + self[6] * other[8],
self[4] * other[1] + self[5] * other[5] + self[6] * other[9],
self[4] * other[2] + self[5] * other[6] + self[6] * other[10],
0,
self[8] * other[0] + self[9] * other[4] + self[10] * other[8],
self[8] * other[1] + self[9] * other[5] + self[10] * other[9],
self[8] * other[2] + self[9] * other[6] + self[10] * other[10],
0,
self[12] * other[0] + self[13] * other[4] + self[14] * other[8] + other[12],
self[12] * other[1] + self[13] * other[5] + self[14] * other[9] + other[13],
self[12] * other[2] + self[13] * other[6] + self[14] * other[10] + other[14],
1
)
);
#endif
}
/// \brief Pre-multiplies \p self by \p other in-place.