aboutsummaryrefslogblamecommitdiffstats
path: root/src/lib/ephysics/ephysics_trimesh.h
blob: 975cb1cb11e58da62da000e5966d354c59288f21 (plain) (tree)
1
2
3
4
5
6
7


                          

                                  

                                                                

























































                                                                


                                                          







































































































                 

  

                             

                                                        






















































                                                                


                                                  































































































                 


      
#ifndef EPHYSICS_TRIMESH_H
#define EPHYSICS_TRIMESH_H

#define CYLINDER_NUM_VERTICES 58
#define CYLINDER_NUM_TRIANGLES 104

static btScalar cylinder_vertices[CYLINDER_NUM_VERTICES * 3] = {
  btScalar(0.508134), btScalar(-0.210476), btScalar(0.550000),
  btScalar(0.530611), btScalar(0.097476), btScalar(0.550000),
  btScalar(0.406474), btScalar(0.362621), btScalar(0.550000),
  btScalar(0.165687), btScalar(0.517043), btScalar(0.550000),
  btScalar(-0.145614), btScalar(0.521036), btScalar(0.550000),
  btScalar(-0.405485), btScalar(0.364100), btScalar(0.550000),
  btScalar(-0.536816), btScalar(0.066283), btScalar(0.550000),
  btScalar(-0.491202), btScalar(-0.235817), btScalar(0.550000),
  btScalar(-0.289243), btScalar(-0.455503), btScalar(0.550000),
  btScalar(0.018444), btScalar(-0.546331), btScalar(0.550000),
  btScalar(0.321449), btScalar(-0.433984), btScalar(0.550000),
  btScalar(0.508134), btScalar(-0.210476), btScalar(-0.550000),
  btScalar(0.321449), btScalar(-0.433984), btScalar(-0.550000),
  btScalar(0.023871), btScalar(-0.545252), btScalar(-0.550000),
  btScalar(-0.289243), btScalar(-0.455503), btScalar(-0.550000),
  btScalar(-0.490465), btScalar(-0.236920), btScalar(-0.550000),
  btScalar(-0.537432), btScalar(0.063186), btScalar(-0.550000),
  btScalar(-0.407240), btScalar(0.361475), btScalar(-0.550000),
  btScalar(-0.145614), btScalar(0.521036), btScalar(-0.550000),
  btScalar(0.162590), btScalar(0.517659), btScalar(-0.550000),
  btScalar(0.405750), btScalar(0.363704), btScalar(-0.550000),
  btScalar(0.529995), btScalar(0.100572), btScalar(-0.550000),
  btScalar(0.225162), btScalar(-0.126432), btScalar(0.550000),
  btScalar(0.182505), btScalar(0.180319), btScalar(0.550000),
  btScalar(-0.135548), btScalar(0.257663), btScalar(0.550000),
  btScalar(-0.128146), btScalar(-0.029182), btScalar(0.550000),
  btScalar(-0.047689), btScalar(-0.299859), btScalar(0.550000),
  btScalar(0.192370), btScalar(-0.050817), btScalar(-0.550000),
  btScalar(-0.080199), btScalar(-0.257948), btScalar(-0.550000),
  btScalar(-0.229392), btScalar(0.019540), btScalar(-0.550000),
  btScalar(-0.034804), btScalar(0.258372), btScalar(-0.550000),
  btScalar(0.241500), btScalar(0.226175), btScalar(-0.550000),
  btScalar(0.532902), btScalar(-0.085955), btScalar(0.216643),
  btScalar(0.483467), btScalar(0.247392), btScalar(0.234226),
  btScalar(0.278528), btScalar(0.462663), btScalar(0.218255),
  btScalar(-0.041739), btScalar(0.541698), btScalar(0.182347),
  btScalar(-0.330369), btScalar(0.428024), btScalar(0.180626),
  btScalar(-0.518580), btScalar(0.157959), btScalar(0.172947),
  btScalar(-0.521671), btScalar(-0.142420), btScalar(0.183206),
  btScalar(-0.340102), btScalar(-0.421520), btScalar(0.186658),
  btScalar(-0.046556), btScalar(-0.540740), btScalar(0.196846),
  btScalar(0.325206), btScalar(-0.431473), btScalar(0.238916),
  btScalar(0.479824), btScalar(-0.252844), btScalar(-0.162453),
  btScalar(0.184507), btScalar(-0.513299), btScalar(-0.136220),
  btScalar(-0.159624), btScalar(-0.518249), btScalar(-0.150107),
  btScalar(-0.426985), btScalar(-0.331923), btScalar(-0.168222),
  btScalar(-0.541617), btScalar(-0.042144), btScalar(-0.168426),
  btScalar(-0.470990), btScalar(0.266065), btScalar(-0.185909),
  btScalar(-0.239361), btScalar(0.488834), btScalar(-0.187932),
  btScalar(0.134846), btScalar(0.523178), btScalar(-0.152636),
  btScalar(0.397364), btScalar(0.376254), btScalar(-0.269892),
  btScalar(0.531212), btScalar(0.094456), btScalar(-0.324493),
  btScalar(0.382010), btScalar(0.393518), btScalar(-0.011940),
  btScalar(0.523986), btScalar(0.130780), btScalar(-0.048009),
  btScalar(0.041379), btScalar(-0.196807), btScalar(0.054210),
  btScalar(0.013146), btScalar(0.357496), btScalar(0.024686),
  btScalar(-0.047077), btScalar(0.119424), btScalar(-0.167934),
  btScalar(0.055271), btScalar(0.158920), btScalar(0.227414),
};

static int cylinder_indices[CYLINDER_NUM_TRIANGLES][3] = {
  {0,   1,  22},
  {1,   2,  23},
  {22,   1,  23},
  {2,   3,  23},
  {3,   4,  24},
  {23,   3,  24},
  {4,   5,  24},
  {10,   0,  22},
  {25,  24,   6},
  {5,   6,  24},
  {6,   7,  25},
  {7,   8,  26},
  {25,   7,  26},
  {8,   9,  26},
  {22,  26,  10},
  {9,  10,  26},
  {26,  22,  25},
  {22,  23,  25},
  {23,  24,  25},
  {11,  12,  27},
  {13,  28,  12},
  {13,  14,  28},
  {27,  12,  28},
  {14,  15,  28},
  {15,  16,  29},
  {28,  15,  29},
  {16,  17,  29},
  {21,  11,  27},
  {17,  18,  30},
  {29,  17,  30},
  {18,  19,  30},
  {19,  20,  31},
  {30,  19,  31},
  {20,  21,  31},
  {31,  21,  27},
  {30,  31,  27},
  {28,  29,  27},
  {30,  27,  29},
  {1,   0,  32},
  {2,   1,  33},
  {1,  32,  33},
  {3,   2,  34},
  {2,  33,  34},
  {4,   3,  35},
  {3,  34,  35},
  {5,   4,  36},
  {4,  35,  36},
  {6,   5,  37},
  {5,  36,  37},
  {7,   6,  38},
  {6,  37,  38},
  {8,   7,  39},
  {7,  38,  39},
  {9,   8,  40},
  {8,  39,  40},
  {10,   9,  41},
  {9,  40,  41},
  {12,  11,  42},
  {13,  12,  43},
  {12,  42,  43},
  {14,  13,  44},
  {13,  43,  44},
  {15,  14,  45},
  {14,  44,  45},
  {16,  15,  46},
  {15,  45,  46},
  {17,  16,  47},
  {16,  46,  47},
  {18,  17,  48},
  {17,  47,  48},
  {19,  18,  49},
  {18,  48,  49},
  {20,  19,  50},
  {19,  49,  50},
  {21,  20,  51},
  {20,  50,  51},
  {10,  41,   0},
  {21,  51,  11},
  {0,  41,  32},
  {11,  51,  42},
  {34,  33,  52},
  {35,  34,  49},
  {36,  35,  48},
  {37,  36,  47},
  {38,  37,  46},
  {39,  38,  45},
  {40,  39,  44},
  {41,  40,  43},
  {48,  35,  49},
  {44,  43,  40},
  {45,  44,  39},
  {46,  45,  38},
  {47,  46,  37},
  {48,  47,  36},
  {50,  49,  52},
  {51,  50,  53},
  {50,  52,  53},
  {33,  32,  53},
  {43,  42,  41},
  {41,  42,  32},
  {52,  49,  34},
  {33,  53,  52},
  {32,  42,  53},
  {42,  51,  53},
};

#define CUBE_NUM_VERTICES 61
#define CUBE_NUM_TRIANGLES 96

static btScalar cube_vertices[CUBE_NUM_VERTICES * 3] = {
  btScalar(0.550000), btScalar(-0.550000), btScalar(-0.550000),
  btScalar(0.550000), btScalar(-0.550000), btScalar(-0.215571),
  btScalar(0.550000), btScalar(-0.550000), btScalar(0.149207),
  btScalar(0.550000), btScalar(-0.550000), btScalar(0.550000),
  btScalar(-0.550000), btScalar(-0.550000), btScalar(-0.550000),
  btScalar(-0.215767), btScalar(-0.550000), btScalar(-0.550000),
  btScalar(0.178583), btScalar(-0.550000), btScalar(-0.550000),
  btScalar(-0.550000), btScalar(-0.550000), btScalar(0.550000),
  btScalar(-0.550000), btScalar(-0.550000), btScalar(0.205306),
  btScalar(-0.550000), btScalar(-0.550000), btScalar(-0.180403),
  btScalar(0.213790), btScalar(-0.550000), btScalar(0.550000),
  btScalar(-0.152594), btScalar(-0.550000), btScalar(0.550000),
  btScalar(0.550000), btScalar(-0.171346), btScalar(-0.550000),
  btScalar(0.550000), btScalar(0.218404), btScalar(-0.550000),
  btScalar(0.550000), btScalar(0.550000), btScalar(-0.550000),
  btScalar(0.550000), btScalar(0.550000), btScalar(0.550000),
  btScalar(0.550000), btScalar(0.216178), btScalar(0.550000),
  btScalar(0.550000), btScalar(-0.168604), btScalar(0.550000),
  btScalar(0.550000), btScalar(0.550000), btScalar(-0.230974),
  btScalar(0.550000), btScalar(0.550000), btScalar(0.154825),
  btScalar(-0.550000), btScalar(-0.201191), btScalar(-0.550000),
  btScalar(-0.550000), btScalar(0.180873), btScalar(-0.550000),
  btScalar(-0.550000), btScalar(0.550000), btScalar(-0.550000),
  btScalar(-0.167045), btScalar(0.550000), btScalar(-0.550000),
  btScalar(0.207428), btScalar(0.550000), btScalar(-0.550000),
  btScalar(-0.550000), btScalar(0.550000), btScalar(0.550000),
  btScalar(-0.550000), btScalar(0.235945), btScalar(0.550000),
  btScalar(-0.550000), btScalar(-0.152540), btScalar(0.550000),
  btScalar(0.202185), btScalar(0.550000), btScalar(0.550000),
  btScalar(-0.178486), btScalar(0.550000), btScalar(0.550000),
  btScalar(-0.550000), btScalar(0.550000), btScalar(-0.200119),
  btScalar(-0.550000), btScalar(0.550000), btScalar(0.178238),
  btScalar(0.183518), btScalar(-0.550000), btScalar(-0.048608),
  btScalar(-0.193942), btScalar(-0.550000), btScalar(-0.265714),
  btScalar(-0.176127), btScalar(-0.550000), btScalar(0.121548),
  btScalar(0.550000), btScalar(-0.228480), btScalar(-0.211018),
  btScalar(0.550000), btScalar(0.115197), btScalar(-0.269727),
  btScalar(0.550000), btScalar(0.087351), btScalar(0.133224),
  btScalar(0.019637), btScalar(-0.192951), btScalar(-0.550000),
  btScalar(0.260210), btScalar(0.183806), btScalar(-0.550000),
  btScalar(-0.127158), btScalar(0.171482), btScalar(-0.550000),
  btScalar(-0.144513), btScalar(-0.112619), btScalar(0.550000),
  btScalar(0.201326), btScalar(0.040933), btScalar(0.550000),
  btScalar(-0.167096), btScalar(0.273800), btScalar(0.550000),
  btScalar(0.207212), btScalar(0.550000), btScalar(-0.049764),
  btScalar(-0.148416), btScalar(0.550000), btScalar(-0.261736),
  btScalar(-0.150781), btScalar(0.550000), btScalar(0.120466),
  btScalar(-0.550000), btScalar(-0.243131), btScalar(0.177642),
  btScalar(-0.550000), btScalar(-0.017683), btScalar(-0.199324),
  btScalar(-0.550000), btScalar(0.150767), btScalar(0.162842),
  btScalar(-0.138413), btScalar(-0.072881), btScalar(-0.103734),
  btScalar(0.139934), btScalar(0.152037), btScalar(-0.158703),
  btScalar(0.254965), btScalar(-0.254145), btScalar(-0.307055),
  btScalar(0.228935), btScalar(-0.176885), btScalar(0.123000),
  btScalar(0.115739), btScalar(0.220857), btScalar(0.251735),
};

static int cube_indices[CUBE_NUM_TRIANGLES][3] = {
  {0,   1,   6},
  {1,   2,  32},
  {2,   3,  10},
  {5,  33,   4},
  {5,   6,  33},
  {9,   4,  33},
  {7,   8,  11},
  {8,   9,  34},
  {11,   8,  34},
  {9,  33,  34},
  {10,  11,  34},
  {2,  10,  32},
  {6,   1,  32},
  {6,  32,  33},
  {33,  32,  34},
  {34,  32,  10},
  {12,  35,   0},
  {2,   1,  35},
  {3,   2,  17},
  {12,  13,  36},
  {36,  13,  18},
  {15,  16,  19},
  {19,  16,  37},
  {16,  17,  37},
  {18,  19,  37},
  {17,   2,  37},
  {14,  18,  13},
  {1,   0,  35},
  {35,  12,  36},
  {18,  37,  36},
  {35,  36,  37},
  {2,  35,  37},
  {0,   6,  12},
  {5,   4,  20},
  {6,   5,  38},
  {5,  20,  38},
  {13,  12,  39},
  {13,  39,  14},
  {21,  40,  20},
  {21,  22,  23},
  {23,  24,  40},
  {21,  23,  40},
  {24,  14,  39},
  {12,   6,  38},
  {38,  20,  40},
  {38,  40,  39},
  {40,  24,  39},
  {12,  38,  39},
  {10,   3,  17},
  {7,  11,  27},
  {27,  11,  41},
  {11,  10,  41},
  {16,  15,  28},
  {17,  16,  42},
  {26,  43,  25},
  {26,  27,  41},
  {28,  29,  43},
  {16,  28,  42},
  {41,  43,  26},
  {10,  17,  42},
  {41,  10,  42},
  {28,  43,  42},
  {41,  42,  43},
  {29,  25,  43},
  {18,  14,  24},
  {15,  19,  28},
  {19,  18,  44},
  {28,  19,  44},
  {30,  45,  22},
  {24,  23,  45},
  {25,  29,  31},
  {29,  28,  46},
  {31,  29,  46},
  {28,  44,  46},
  {30,  31,  46},
  {23,  22,  45},
  {18,  24,  44},
  {30,  46,  45},
  {45,  46,  44},
  {44,  24,  45},
  {4,   9,  20},
  {27,  47,   7},
  {9,   8,  47},
  {8,   7,  47},
  {21,  20,  48},
  {22,  21,  30},
  {26,  25,  31},
  {26,  31,  49},
  {27,  26,  49},
  {31,  30,  49},
  {30,  21,  48},
  {47,  27,  49},
  {20,   9,  48},
  {30,  48,  49},
  {47,  49,  48},
  {9,  47,  48},
};

#endif