From 77aa79cbfe70883aa291d5fc64d54c3d0288444d Mon Sep 17 00:00:00 2001 From: cosmosninja Date: Wed, 7 May 2008 04:38:33 +0000 Subject: [PATCH] Added some comments to the widget.cpp file git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@1821 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/widget.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/widget.cpp b/src/widget.cpp index 7b5aeae6c..173849e2a 100644 --- a/src/widget.cpp +++ b/src/widget.cpp @@ -316,6 +316,9 @@ bool Widget::createRect() typedef std::vector float3; std::vector inner_vertex; std::vector outer_vertex; + + //NUM_QUADS + 1, because we have to add the union between the sides, and + //multiplied by 2, because there are two sides inner_vertex.resize((NUM_QUADS + 1) * 2); outer_vertex.resize((NUM_QUADS + 1) * 2); @@ -358,6 +361,10 @@ bool Widget::createRect() //position for the circle is dependant on rect; if a corner //wasn't given, then the y position is computed as if it was //for a rectangle without rounder corners. + // + //The value in the position 0 of these vectors is X, the + //second the Y for the top part of the widget and the third + //the Y for the lower part of the widget. inner_vertex[i].resize(3); outer_vertex[i].resize(3); outer_vertex[i][0] = m_radius - circle_x;