]> pd.if.org Git - hexagon/blobdiff - hexagon.c
Added HL_fan[df] for opengl rendering support.
[hexagon] / hexagon.c
index 61bb47b0fd80429ddd49e57df1e72ebb450cfc12..123e5cfa2539928b357a178f3bef9402c685df0f 100644 (file)
--- a/hexagon.c
+++ b/hexagon.c
@@ -12,7 +12,7 @@ static int inversecantor(int cantor, int *x, int *y);
  * domain
  */
 
-double HL_vertexv[] = {
+double HL_vertexv[12] = {
        .577350269189625764509148780502, 0.0,
        .288675134594812882254574390251, 0.5,
        -.288675134594812882254574390251, 0.5,
@@ -20,6 +20,28 @@ double HL_vertexv[] = {
        -.288675134594812882254574390251, -0.5,
        .288675134594812882254574390251, -0.5};
 
+double HL_fand[16] = {
+       0.0, 0.0,
+       .577350269189625764509148780502, 0.0,
+       .288675134594812882254574390251, 0.5,
+       -.288675134594812882254574390251, 0.5,
+       -.577350269189625764509148780502, 0.0,
+       -.288675134594812882254574390251, -0.5,
+       .288675134594812882254574390251, -0.5,
+       .577350269189625764509148780502, 0.0
+};
+
+float HL_fanf[16] = {
+       0.0f, 0.0f,
+       .577350269189625764509148780502f, 0.0f,
+       .288675134594812882254574390251f, 0.5f,
+       -.288675134594812882254574390251f, 0.5f,
+       -.577350269189625764509148780502f, 0.0f,
+       -.288675134594812882254574390251f, -0.5f,
+       .288675134594812882254574390251f, -0.5f,
+       .577350269189625764509148780502f, 0.0f
+};
+
 /* these all are for a hex one unit across */
 static double          hexptvd[6][2] = {
        {.577350269189625764509148780502, 0.0}, /* 1.0/sqrt3 */