| 1037 | } |
| 1038 | |
| 1039 | void draw() |
| 1040 | { |
| 1041 | if (m_guiHelper) |
| 1042 | { |
| 1043 | btAlignedObjectArray<unsigned int> indices; |
| 1044 | btAlignedObjectArray<btVector3FloatData> points; |
| 1045 | |
| 1046 | float lineColor[4] = { 1, 0.4, .4, 1 }; |
| 1047 | |
| 1048 | for (int i = 0; i < NUMRAYS2; i++) |
| 1049 | { |
| 1050 | btVector3FloatData s, h; |
| 1051 | for (int w = 0; w < 4; w++) |
| 1052 | { |
| 1053 | s.m_floats[w] = source[i][w]; |
| 1054 | h.m_floats[w] = hit[i][w]; |
| 1055 | } |
| 1056 | |
| 1057 | points.push_back(s); |
| 1058 | points.push_back(h); |
| 1059 | indices.push_back(indices.size()); |
| 1060 | indices.push_back(indices.size()); |
| 1061 | } |
| 1062 | |
| 1063 | m_guiHelper->getRenderInterface()->drawLines(&points[0].m_floats[0], lineColor, points.size(), sizeof(btVector3FloatData), &indices[0], indices.size(), 1); |
| 1064 | } |
| 1065 | |
| 1066 | } |
| 1067 | }; |
| 1068 | |
| 1069 | static btRaycastBar3 raycastBar; |
no test coverage detected