]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/brush.h
Merge commit '23d2497f12fe91a5eb0e14b71095cbb1c2ec80cb' into garux-merge
[xonotic/netradiant.git] / radiant / brush.h
index 21e7d9ca53e530ac0e6b29f06c1fa34a14d456af..298b161bd549c37b2cc71d6289a2ed14493cbdf0 100644 (file)
@@ -600,6 +600,14 @@ void fit( const Vector3& normal, const Winding& winding, float s_repeat, float t
        Texdef_FitTexture( m_projection, m_shader.width(), m_shader.height(), normal, winding, s_repeat, t_repeat );
 }
 
+void fitW( const Vector3& normal, const Winding& winding, float s_repeat, float t_repeat ){
+       Texdef_FitTextureW( m_projection, m_shader.width(), m_shader.height(), normal, winding, s_repeat, t_repeat );
+}
+
+void fitH( const Vector3& normal, const Winding& winding, float s_repeat, float t_repeat ){
+       Texdef_FitTextureH( m_projection, m_shader.width(), m_shader.height(), normal, winding, s_repeat, t_repeat );
+}
+
 void emitTextureCoordinates( Winding& winding, const Vector3& normal, const Matrix4& localToWorld ){
        Texdef_EmitTextureCoordinates( m_projection, m_shader.width(), m_shader.height(), winding, normal, localToWorld );
 }
@@ -1229,6 +1237,18 @@ void FitTexture( float s_repeat, float t_repeat ){
        texdefChanged();
 }
 
+void FitTextureW( float s_repeat, float t_repeat ){
+       undoSave();
+       m_texdef.fitW( m_plane.plane3().normal(), m_winding, s_repeat, t_repeat );
+       texdefChanged();
+}
+
+void FitTextureH( float s_repeat, float t_repeat ){
+       undoSave();
+       m_texdef.fitH( m_plane.plane3().normal(), m_winding, s_repeat, t_repeat );
+       texdefChanged();
+}
+
 void EmitTextureCoordinates(){
        Texdef_EmitTextureCoordinates( m_texdefTransformed, m_shader.width(), m_shader.height(), m_winding, plane3().normal(), g_matrix4_identity );
 }