Radiant:
misc... * changed surface inspector behavior from 'set whole texture projection' to 'set modified value' (makes sense for multiple surfaces selected) * BP: surface inspector and Tex* binds scale texture by its axes, not world axes * BP: fix rotation of tex projection with scale S != scale T * BP: fix ruining nonregular tex projections by surface inspector (for example after fit/seamless/arbitrary projection) * jump over tex projection scale = 0 case, while modifying one (AP and BP)
This commit is contained in:
@@ -273,6 +273,22 @@ inline double vector2_cross( const BasicVector2<Element>& self, const BasicVecto
|
||||
return self.x() * other.y() - self.y() * other.x();
|
||||
}
|
||||
|
||||
template<typename Element>
|
||||
inline Element float_divided( Element f, Element other ){
|
||||
//ASSERT_MESSAGE(other != 0, "float_divided: invalid divisor");
|
||||
return f / other;
|
||||
}
|
||||
|
||||
template<typename Element>
|
||||
inline BasicVector2<Element> vector2_normalised( const BasicVector2<Element>& self ){
|
||||
return vector2_scaled( self, float_divided( 1.0, vector2_length( self ) ) );
|
||||
}
|
||||
|
||||
template<typename Element>
|
||||
inline void vector2_normalise( BasicVector2<Element>& self ){
|
||||
self = vector2_normalised( self );
|
||||
}
|
||||
|
||||
const Vector3 g_vector3_identity( 0, 0, 0 );
|
||||
const Vector3 g_vector3_max = Vector3( FLT_MAX, FLT_MAX, FLT_MAX );
|
||||
const Vector3 g_vector3_axis_x( 1, 0, 0 );
|
||||
@@ -498,12 +514,6 @@ inline double vector3_length( const BasicVector3<Element>& self ){
|
||||
return sqrt( vector3_length_squared( self ) );
|
||||
}
|
||||
|
||||
template<typename Element>
|
||||
inline Element float_divided( Element f, Element other ){
|
||||
//ASSERT_MESSAGE(other != 0, "float_divided: invalid divisor");
|
||||
return f / other;
|
||||
}
|
||||
|
||||
template<typename Element>
|
||||
inline BasicVector3<Element> vector3_normalised( const BasicVector3<Element>& self ){
|
||||
return vector3_scaled( self, float_divided( 1.0, vector3_length( self ) ) );
|
||||
|
||||
Reference in New Issue
Block a user