From: Mikko Rasa Date: Sun, 6 Mar 2011 01:01:00 +0000 (+0000) Subject: Rename CUT to CROP in GeometryBuilder X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=fc503f2996e663e6bea88d95e4b251dd87428161;p=libs%2Fgl.git Rename CUT to CROP in GeometryBuilder Fix capsule texture coordinates Use adjust_texture_scale in capsule and box builders --- diff --git a/source/box.cpp b/source/box.cpp index 21d5f33f..5347ccc7 100644 --- a/source/box.cpp +++ b/source/box.cpp @@ -55,13 +55,7 @@ void BoxBuilder::build_face(PrimitiveBuilder &builder, const Vector3 &o, const V float u_size = 1; float v_size = 1; - if(tex_fit!=STRETCH) - { - if((l1rings/2 ? 0.5 : -0.5); - float v = (i*radius*M_PI/rings+(i>rings/2 ? length : 0))*v_scale; + float v = ((i>rings/2 ? i-1 : i)*radius*M_PI/(rings-1)+(i>rings/2 ? length : 0))*v_scale; float ra = (i>rings/2 ? i-1 : i)*M_PI/(rings-1); float rc = cos(ra); float rs = sin(ra); diff --git a/source/geometrybuilder.cpp b/source/geometrybuilder.cpp index 018ea447..6ed52ed2 100644 --- a/source/geometrybuilder.cpp +++ b/source/geometrybuilder.cpp @@ -39,7 +39,7 @@ void GeometryBuilder::adjust_texture_scale(float &u_scale, float &v_scale, float { if(tex_fit!=STRETCH) { - if((width