Blender  V3.3
btIDebugDraw.h
Go to the documentation of this file.
1 /*
2 Bullet Continuous Collision Detection and Physics Library
3 Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
4 
5 This software is provided 'as-is', without any express or implied warranty.
6 In no event will the authors be held liable for any damages arising from the use of this software.
7 Permission is granted to anyone to use this software for any purpose,
8 including commercial applications, and to alter it and redistribute it freely,
9 subject to the following restrictions:
10 
11 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
12 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
13 3. This notice may not be removed or altered from any source distribution.
14 */
15 
16 #ifndef BT_IDEBUG_DRAW__H
17 #define BT_IDEBUG_DRAW__H
18 
19 #include "btVector3.h"
20 #include "btTransform.h"
21 
27 {
28 public:
29  ATTRIBUTE_ALIGNED16(struct)
31  {
32  btVector3 m_activeObject;
39 
41  : m_activeObject(1, 1, 1),
42  m_deactivatedObject(0, 1, 0),
46  m_aabb(1, 0, 0),
47  m_contactPoint(1, 1, 0)
48  {
49  }
50  };
51 
53  {
65  DBG_EnableCCD = 1024,
66  DBG_DrawConstraints = (1 << 11),
68  DBG_FastWireframe = (1 << 13),
69  DBG_DrawNormals = (1 << 14),
70  DBG_DrawFrames = (1 << 15),
72  };
73 
74  virtual ~btIDebugDraw(){};
75 
77  {
78  DefaultColors colors;
79  return colors;
80  }
82  virtual void setDefaultColors(const DefaultColors& /*colors*/) {}
83 
84  virtual void drawLine(const btVector3& from, const btVector3& to, const btVector3& color) = 0;
85 
86  virtual void drawLine(const btVector3& from, const btVector3& to, const btVector3& fromColor, const btVector3& toColor)
87  {
88  (void)toColor;
89  drawLine(from, to, fromColor);
90  }
91 
92  virtual void drawSphere(btScalar radius, const btTransform& transform, const btVector3& color)
93  {
94  btVector3 center = transform.getOrigin();
95  btVector3 up = transform.getBasis().getColumn(1);
96  btVector3 axis = transform.getBasis().getColumn(0);
97  btScalar minTh = -SIMD_HALF_PI;
98  btScalar maxTh = SIMD_HALF_PI;
99  btScalar minPs = -SIMD_HALF_PI;
100  btScalar maxPs = SIMD_HALF_PI;
101  btScalar stepDegrees = 30.f;
102  drawSpherePatch(center, up, axis, radius, minTh, maxTh, minPs, maxPs, color, stepDegrees, false);
103  drawSpherePatch(center, up, -axis, radius, minTh, maxTh, minPs, maxPs, color, stepDegrees, false);
104  }
105 
106  virtual void drawSphere(const btVector3& p, btScalar radius, const btVector3& color)
107  {
108  btTransform tr;
109  tr.setIdentity();
110  tr.setOrigin(p);
111  drawSphere(radius, tr, color);
112  }
113 
114  virtual void drawTriangle(const btVector3& v0, const btVector3& v1, const btVector3& v2, const btVector3& /*n0*/, const btVector3& /*n1*/, const btVector3& /*n2*/, const btVector3& color, btScalar alpha)
115  {
116  drawTriangle(v0, v1, v2, color, alpha);
117  }
118  virtual void drawTriangle(const btVector3& v0, const btVector3& v1, const btVector3& v2, const btVector3& color, btScalar /*alpha*/)
119  {
120  drawLine(v0, v1, color);
121  drawLine(v1, v2, color);
122  drawLine(v2, v0, color);
123  }
124 
125  virtual void drawContactPoint(const btVector3& PointOnB, const btVector3& normalOnB, btScalar distance, int lifeTime, const btVector3& color) = 0;
126 
127  virtual void reportErrorWarning(const char* warningString) = 0;
128 
129  virtual void draw3dText(const btVector3& location, const char* textString) = 0;
130 
131  virtual void setDebugMode(int debugMode) = 0;
132 
133  virtual int getDebugMode() const = 0;
134 
135  virtual void drawAabb(const btVector3& from, const btVector3& to, const btVector3& color)
136  {
137  btVector3 halfExtents = (to - from) * 0.5f;
138  btVector3 center = (to + from) * 0.5f;
139  int i, j;
140 
141  btVector3 edgecoord(1.f, 1.f, 1.f), pa, pb;
142  for (i = 0; i < 4; i++)
143  {
144  for (j = 0; j < 3; j++)
145  {
146  pa = btVector3(edgecoord[0] * halfExtents[0], edgecoord[1] * halfExtents[1],
147  edgecoord[2] * halfExtents[2]);
148  pa += center;
149 
150  int othercoord = j % 3;
151  edgecoord[othercoord] *= -1.f;
152  pb = btVector3(edgecoord[0] * halfExtents[0], edgecoord[1] * halfExtents[1],
153  edgecoord[2] * halfExtents[2]);
154  pb += center;
155 
156  drawLine(pa, pb, color);
157  }
158  edgecoord = btVector3(-1.f, -1.f, -1.f);
159  if (i < 3)
160  edgecoord[i] *= -1.f;
161  }
162  }
163  virtual void drawTransform(const btTransform& transform, btScalar orthoLen)
164  {
165  btVector3 start = transform.getOrigin();
166  drawLine(start, start + transform.getBasis() * btVector3(orthoLen, 0, 0), btVector3(btScalar(1.), btScalar(0.3), btScalar(0.3)));
167  drawLine(start, start + transform.getBasis() * btVector3(0, orthoLen, 0), btVector3(btScalar(0.3), btScalar(1.), btScalar(0.3)));
168  drawLine(start, start + transform.getBasis() * btVector3(0, 0, orthoLen), btVector3(btScalar(0.3), btScalar(0.3), btScalar(1.)));
169  }
170 
171  virtual void drawArc(const btVector3& center, const btVector3& normal, const btVector3& axis, btScalar radiusA, btScalar radiusB, btScalar minAngle, btScalar maxAngle,
172  const btVector3& color, bool drawSect, btScalar stepDegrees = btScalar(10.f))
173  {
174  const btVector3& vx = axis;
175  btVector3 vy = normal.cross(axis);
176  btScalar step = stepDegrees * SIMD_RADS_PER_DEG;
177  int nSteps = (int)btFabs((maxAngle - minAngle) / step);
178  if (!nSteps) nSteps = 1;
179  btVector3 prev = center + radiusA * vx * btCos(minAngle) + radiusB * vy * btSin(minAngle);
180  if (drawSect)
181  {
183  }
184  for (int i = 1; i <= nSteps; i++)
185  {
186  btScalar angle = minAngle + (maxAngle - minAngle) * btScalar(i) / btScalar(nSteps);
187  btVector3 next = center + radiusA * vx * btCos(angle) + radiusB * vy * btSin(angle);
188  drawLine(prev, next, color);
189  prev = next;
190  }
191  if (drawSect)
192  {
194  }
195  }
196  virtual void drawSpherePatch(const btVector3& center, const btVector3& up, const btVector3& axis, btScalar radius,
197  btScalar minTh, btScalar maxTh, btScalar minPs, btScalar maxPs, const btVector3& color, btScalar stepDegrees = btScalar(10.f), bool drawCenter = true)
198  {
199  btVector3 vA[74];
200  btVector3 vB[74];
201  btVector3 *pvA = vA, *pvB = vB, *pT;
202  btVector3 npole = center + up * radius;
203  btVector3 spole = center - up * radius;
204  btVector3 arcStart;
205  btScalar step = stepDegrees * SIMD_RADS_PER_DEG;
206  const btVector3& kv = up;
207  const btVector3& iv = axis;
208  btVector3 jv = kv.cross(iv);
209  bool drawN = false;
210  bool drawS = false;
211  if (minTh <= -SIMD_HALF_PI)
212  {
213  minTh = -SIMD_HALF_PI + step;
214  drawN = true;
215  }
216  if (maxTh >= SIMD_HALF_PI)
217  {
218  maxTh = SIMD_HALF_PI - step;
219  drawS = true;
220  }
221  if (minTh > maxTh)
222  {
223  minTh = -SIMD_HALF_PI + step;
224  maxTh = SIMD_HALF_PI - step;
225  drawN = drawS = true;
226  }
227  int n_hor = (int)((maxTh - minTh) / step) + 1;
228  if (n_hor < 2) n_hor = 2;
229  btScalar step_h = (maxTh - minTh) / btScalar(n_hor - 1);
230  bool isClosed = false;
231  if (minPs > maxPs)
232  {
233  minPs = -SIMD_PI + step;
234  maxPs = SIMD_PI;
235  isClosed = true;
236  }
237  else if ((maxPs - minPs) >= SIMD_PI * btScalar(2.f))
238  {
239  isClosed = true;
240  }
241  else
242  {
243  isClosed = false;
244  }
245  int n_vert = (int)((maxPs - minPs) / step) + 1;
246  if (n_vert < 2) n_vert = 2;
247  btScalar step_v = (maxPs - minPs) / btScalar(n_vert - 1);
248  for (int i = 0; i < n_hor; i++)
249  {
250  btScalar th = minTh + btScalar(i) * step_h;
251  btScalar sth = radius * btSin(th);
252  btScalar cth = radius * btCos(th);
253  for (int j = 0; j < n_vert; j++)
254  {
255  btScalar psi = minPs + btScalar(j) * step_v;
256  btScalar sps = btSin(psi);
257  btScalar cps = btCos(psi);
258  pvB[j] = center + cth * cps * iv + cth * sps * jv + sth * kv;
259  if (i)
260  {
261  drawLine(pvA[j], pvB[j], color);
262  }
263  else if (drawS)
264  {
265  drawLine(spole, pvB[j], color);
266  }
267  if (j)
268  {
269  drawLine(pvB[j - 1], pvB[j], color);
270  }
271  else
272  {
273  arcStart = pvB[j];
274  }
275  if ((i == (n_hor - 1)) && drawN)
276  {
277  drawLine(npole, pvB[j], color);
278  }
279 
280  if (drawCenter)
281  {
282  if (isClosed)
283  {
284  if (j == (n_vert - 1))
285  {
286  drawLine(arcStart, pvB[j], color);
287  }
288  }
289  else
290  {
291  if (((!i) || (i == (n_hor - 1))) && ((!j) || (j == (n_vert - 1))))
292  {
293  drawLine(center, pvB[j], color);
294  }
295  }
296  }
297  }
298  pT = pvA;
299  pvA = pvB;
300  pvB = pT;
301  }
302  }
303 
304  virtual void drawBox(const btVector3& bbMin, const btVector3& bbMax, const btVector3& color)
305  {
306  drawLine(btVector3(bbMin[0], bbMin[1], bbMin[2]), btVector3(bbMax[0], bbMin[1], bbMin[2]), color);
307  drawLine(btVector3(bbMax[0], bbMin[1], bbMin[2]), btVector3(bbMax[0], bbMax[1], bbMin[2]), color);
308  drawLine(btVector3(bbMax[0], bbMax[1], bbMin[2]), btVector3(bbMin[0], bbMax[1], bbMin[2]), color);
309  drawLine(btVector3(bbMin[0], bbMax[1], bbMin[2]), btVector3(bbMin[0], bbMin[1], bbMin[2]), color);
310  drawLine(btVector3(bbMin[0], bbMin[1], bbMin[2]), btVector3(bbMin[0], bbMin[1], bbMax[2]), color);
311  drawLine(btVector3(bbMax[0], bbMin[1], bbMin[2]), btVector3(bbMax[0], bbMin[1], bbMax[2]), color);
312  drawLine(btVector3(bbMax[0], bbMax[1], bbMin[2]), btVector3(bbMax[0], bbMax[1], bbMax[2]), color);
313  drawLine(btVector3(bbMin[0], bbMax[1], bbMin[2]), btVector3(bbMin[0], bbMax[1], bbMax[2]), color);
314  drawLine(btVector3(bbMin[0], bbMin[1], bbMax[2]), btVector3(bbMax[0], bbMin[1], bbMax[2]), color);
315  drawLine(btVector3(bbMax[0], bbMin[1], bbMax[2]), btVector3(bbMax[0], bbMax[1], bbMax[2]), color);
316  drawLine(btVector3(bbMax[0], bbMax[1], bbMax[2]), btVector3(bbMin[0], bbMax[1], bbMax[2]), color);
317  drawLine(btVector3(bbMin[0], bbMax[1], bbMax[2]), btVector3(bbMin[0], bbMin[1], bbMax[2]), color);
318  }
319  virtual void drawBox(const btVector3& bbMin, const btVector3& bbMax, const btTransform& trans, const btVector3& color)
320  {
321  drawLine(trans * btVector3(bbMin[0], bbMin[1], bbMin[2]), trans * btVector3(bbMax[0], bbMin[1], bbMin[2]), color);
322  drawLine(trans * btVector3(bbMax[0], bbMin[1], bbMin[2]), trans * btVector3(bbMax[0], bbMax[1], bbMin[2]), color);
323  drawLine(trans * btVector3(bbMax[0], bbMax[1], bbMin[2]), trans * btVector3(bbMin[0], bbMax[1], bbMin[2]), color);
324  drawLine(trans * btVector3(bbMin[0], bbMax[1], bbMin[2]), trans * btVector3(bbMin[0], bbMin[1], bbMin[2]), color);
325  drawLine(trans * btVector3(bbMin[0], bbMin[1], bbMin[2]), trans * btVector3(bbMin[0], bbMin[1], bbMax[2]), color);
326  drawLine(trans * btVector3(bbMax[0], bbMin[1], bbMin[2]), trans * btVector3(bbMax[0], bbMin[1], bbMax[2]), color);
327  drawLine(trans * btVector3(bbMax[0], bbMax[1], bbMin[2]), trans * btVector3(bbMax[0], bbMax[1], bbMax[2]), color);
328  drawLine(trans * btVector3(bbMin[0], bbMax[1], bbMin[2]), trans * btVector3(bbMin[0], bbMax[1], bbMax[2]), color);
329  drawLine(trans * btVector3(bbMin[0], bbMin[1], bbMax[2]), trans * btVector3(bbMax[0], bbMin[1], bbMax[2]), color);
330  drawLine(trans * btVector3(bbMax[0], bbMin[1], bbMax[2]), trans * btVector3(bbMax[0], bbMax[1], bbMax[2]), color);
331  drawLine(trans * btVector3(bbMax[0], bbMax[1], bbMax[2]), trans * btVector3(bbMin[0], bbMax[1], bbMax[2]), color);
332  drawLine(trans * btVector3(bbMin[0], bbMax[1], bbMax[2]), trans * btVector3(bbMin[0], bbMin[1], bbMax[2]), color);
333  }
334 
335  virtual void drawCapsule(btScalar radius, btScalar halfHeight, int upAxis, const btTransform& transform, const btVector3& color)
336  {
337  int stepDegrees = 30;
338 
339  btVector3 capStart(0.f, 0.f, 0.f);
340  capStart[upAxis] = -halfHeight;
341 
342  btVector3 capEnd(0.f, 0.f, 0.f);
343  capEnd[upAxis] = halfHeight;
344 
345  // Draw the ends
346  {
347  btTransform childTransform = transform;
348  childTransform.getOrigin() = transform * capStart;
349  {
350  btVector3 center = childTransform.getOrigin();
351  btVector3 up = childTransform.getBasis().getColumn((upAxis + 1) % 3);
352  btVector3 axis = -childTransform.getBasis().getColumn(upAxis);
353  btScalar minTh = -SIMD_HALF_PI;
354  btScalar maxTh = SIMD_HALF_PI;
355  btScalar minPs = -SIMD_HALF_PI;
356  btScalar maxPs = SIMD_HALF_PI;
357 
358  drawSpherePatch(center, up, axis, radius, minTh, maxTh, minPs, maxPs, color, btScalar(stepDegrees), false);
359  }
360  }
361 
362  {
363  btTransform childTransform = transform;
364  childTransform.getOrigin() = transform * capEnd;
365  {
366  btVector3 center = childTransform.getOrigin();
367  btVector3 up = childTransform.getBasis().getColumn((upAxis + 1) % 3);
368  btVector3 axis = childTransform.getBasis().getColumn(upAxis);
369  btScalar minTh = -SIMD_HALF_PI;
370  btScalar maxTh = SIMD_HALF_PI;
371  btScalar minPs = -SIMD_HALF_PI;
372  btScalar maxPs = SIMD_HALF_PI;
373  drawSpherePatch(center, up, axis, radius, minTh, maxTh, minPs, maxPs, color, btScalar(stepDegrees), false);
374  }
375  }
376 
377  // Draw some additional lines
378  btVector3 start = transform.getOrigin();
379 
380  for (int i = 0; i < 360; i += stepDegrees)
381  {
382  capEnd[(upAxis + 1) % 3] = capStart[(upAxis + 1) % 3] = btSin(btScalar(i) * SIMD_RADS_PER_DEG) * radius;
383  capEnd[(upAxis + 2) % 3] = capStart[(upAxis + 2) % 3] = btCos(btScalar(i) * SIMD_RADS_PER_DEG) * radius;
384  drawLine(start + transform.getBasis() * capStart, start + transform.getBasis() * capEnd, color);
385  }
386  }
387 
388  virtual void drawCylinder(btScalar radius, btScalar halfHeight, int upAxis, const btTransform& transform, const btVector3& color)
389  {
390  btVector3 start = transform.getOrigin();
391  btVector3 offsetHeight(0, 0, 0);
392  offsetHeight[upAxis] = halfHeight;
393  int stepDegrees = 30;
394  btVector3 capStart(0.f, 0.f, 0.f);
395  capStart[upAxis] = -halfHeight;
396  btVector3 capEnd(0.f, 0.f, 0.f);
397  capEnd[upAxis] = halfHeight;
398 
399  for (int i = 0; i < 360; i += stepDegrees)
400  {
401  capEnd[(upAxis + 1) % 3] = capStart[(upAxis + 1) % 3] = btSin(btScalar(i) * SIMD_RADS_PER_DEG) * radius;
402  capEnd[(upAxis + 2) % 3] = capStart[(upAxis + 2) % 3] = btCos(btScalar(i) * SIMD_RADS_PER_DEG) * radius;
403  drawLine(start + transform.getBasis() * capStart, start + transform.getBasis() * capEnd, color);
404  }
405  // Drawing top and bottom caps of the cylinder
406  btVector3 yaxis(0, 0, 0);
407  yaxis[upAxis] = btScalar(1.0);
408  btVector3 xaxis(0, 0, 0);
409  xaxis[(upAxis + 1) % 3] = btScalar(1.0);
410  drawArc(start - transform.getBasis() * (offsetHeight), transform.getBasis() * yaxis, transform.getBasis() * xaxis, radius, radius, 0, SIMD_2_PI, color, false, btScalar(10.0));
411  drawArc(start + transform.getBasis() * (offsetHeight), transform.getBasis() * yaxis, transform.getBasis() * xaxis, radius, radius, 0, SIMD_2_PI, color, false, btScalar(10.0));
412  }
413 
414  virtual void drawCone(btScalar radius, btScalar height, int upAxis, const btTransform& transform, const btVector3& color)
415  {
416  int stepDegrees = 30;
417  btVector3 start = transform.getOrigin();
418 
419  btVector3 offsetHeight(0, 0, 0);
420  btScalar halfHeight = height * btScalar(0.5);
421  offsetHeight[upAxis] = halfHeight;
422  btVector3 offsetRadius(0, 0, 0);
423  offsetRadius[(upAxis + 1) % 3] = radius;
424  btVector3 offset2Radius(0, 0, 0);
425  offset2Radius[(upAxis + 2) % 3] = radius;
426 
427  btVector3 capEnd(0.f, 0.f, 0.f);
428  capEnd[upAxis] = -halfHeight;
429 
430  for (int i = 0; i < 360; i += stepDegrees)
431  {
432  capEnd[(upAxis + 1) % 3] = btSin(btScalar(i) * SIMD_RADS_PER_DEG) * radius;
433  capEnd[(upAxis + 2) % 3] = btCos(btScalar(i) * SIMD_RADS_PER_DEG) * radius;
434  drawLine(start + transform.getBasis() * (offsetHeight), start + transform.getBasis() * capEnd, color);
435  }
436 
437  drawLine(start + transform.getBasis() * (offsetHeight), start + transform.getBasis() * (-offsetHeight + offsetRadius), color);
438  drawLine(start + transform.getBasis() * (offsetHeight), start + transform.getBasis() * (-offsetHeight - offsetRadius), color);
439  drawLine(start + transform.getBasis() * (offsetHeight), start + transform.getBasis() * (-offsetHeight + offset2Radius), color);
440  drawLine(start + transform.getBasis() * (offsetHeight), start + transform.getBasis() * (-offsetHeight - offset2Radius), color);
441 
442  // Drawing the base of the cone
443  btVector3 yaxis(0, 0, 0);
444  yaxis[upAxis] = btScalar(1.0);
445  btVector3 xaxis(0, 0, 0);
446  xaxis[(upAxis + 1) % 3] = btScalar(1.0);
447  drawArc(start - transform.getBasis() * (offsetHeight), transform.getBasis() * yaxis, transform.getBasis() * xaxis, radius, radius, 0, SIMD_2_PI, color, false, 10.0);
448  }
449 
450  virtual void drawPlane(const btVector3& planeNormal, btScalar planeConst, const btTransform& transform, const btVector3& color)
451  {
452  btVector3 planeOrigin = planeNormal * planeConst;
453  btVector3 vec0, vec1;
454  btPlaneSpace1(planeNormal, vec0, vec1);
455  btScalar vecLen = 100.f;
456  btVector3 pt0 = planeOrigin + vec0 * vecLen;
457  btVector3 pt1 = planeOrigin - vec0 * vecLen;
458  btVector3 pt2 = planeOrigin + vec1 * vecLen;
459  btVector3 pt3 = planeOrigin - vec1 * vecLen;
460  drawLine(transform * pt0, transform * pt1, color);
461  drawLine(transform * pt2, transform * pt3, color);
462  }
463 
464  virtual void clearLines()
465  {
466  }
467 
468  virtual void flushLines()
469  {
470  }
471 };
472 
473 #endif //BT_IDEBUG_DRAW__H
NSNotificationCenter * center
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei height
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble v1
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position Clamp a value between a minimum and a maximum Vector Perform vector math operation Invert a color
ATTR_WARN_UNUSED_RESULT const BMVert * v2
SIMD_FORCE_INLINE btVector3 transform(const btVector3 &point) const
SIMD_FORCE_INLINE btScalar btCos(btScalar x)
Definition: btScalar.h:498
#define SIMD_RADS_PER_DEG
Definition: btScalar.h:529
#define SIMD_PI
Definition: btScalar.h:526
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
Definition: btScalar.h:314
SIMD_FORCE_INLINE btScalar btSin(btScalar x)
Definition: btScalar.h:499
#define ATTRIBUTE_ALIGNED16(a)
Definition: btScalar.h:285
SIMD_FORCE_INLINE btScalar btFabs(btScalar x)
Definition: btScalar.h:497
#define SIMD_HALF_PI
Definition: btScalar.h:528
#define SIMD_2_PI
Definition: btScalar.h:527
btTransform
The btTransform class supports rigid transforms with only translation and rotation and no scaling/she...
Definition: btTransform.h:30
SIMD_FORCE_INLINE void btPlaneSpace1(const T &n, T &p, T &q)
Definition: btVector3.h:1251
SIMD_FORCE_INLINE btScalar angle(const btVector3 &v) const
Return the angle between this and another vector.
Definition: btVector3.h:356
btVector3
btVector3 can be used to represent 3D points and vectors. It has an un-used w component to suit 16-by...
Definition: btVector3.h:82
virtual void drawCone(btScalar radius, btScalar height, int upAxis, const btTransform &transform, const btVector3 &color)
Definition: btIDebugDraw.h:414
btVector3 m_deactivatedObject
Definition: btIDebugDraw.h:33
virtual void drawPlane(const btVector3 &planeNormal, btScalar planeConst, const btTransform &transform, const btVector3 &color)
Definition: btIDebugDraw.h:450
virtual void drawLine(const btVector3 &from, const btVector3 &to, const btVector3 &color)=0
virtual ~btIDebugDraw()
Definition: btIDebugDraw.h:74
virtual void drawLine(const btVector3 &from, const btVector3 &to, const btVector3 &fromColor, const btVector3 &toColor)
Definition: btIDebugDraw.h:86
virtual void drawBox(const btVector3 &bbMin, const btVector3 &bbMax, const btTransform &trans, const btVector3 &color)
Definition: btIDebugDraw.h:319
virtual void drawArc(const btVector3 &center, const btVector3 &normal, const btVector3 &axis, btScalar radiusA, btScalar radiusB, btScalar minAngle, btScalar maxAngle, const btVector3 &color, bool drawSect, btScalar stepDegrees=btScalar(10.f))
Definition: btIDebugDraw.h:171
btVector3 m_disabledDeactivationObject
Definition: btIDebugDraw.h:35
virtual void draw3dText(const btVector3 &location, const char *textString)=0
virtual void drawSphere(btScalar radius, const btTransform &transform, const btVector3 &color)
Definition: btIDebugDraw.h:92
btVector3 m_wantsDeactivationObject
Definition: btIDebugDraw.h:34
virtual void drawTriangle(const btVector3 &v0, const btVector3 &v1, const btVector3 &v2, const btVector3 &, const btVector3 &, const btVector3 &, const btVector3 &color, btScalar alpha)
Definition: btIDebugDraw.h:114
virtual void flushLines()
Definition: btIDebugDraw.h:468
virtual void reportErrorWarning(const char *warningString)=0
virtual void clearLines()
Definition: btIDebugDraw.h:464
virtual void drawSphere(const btVector3 &p, btScalar radius, const btVector3 &color)
Definition: btIDebugDraw.h:106
virtual void setDebugMode(int debugMode)=0
virtual void drawTransform(const btTransform &transform, btScalar orthoLen)
Definition: btIDebugDraw.h:163
virtual void drawContactPoint(const btVector3 &PointOnB, const btVector3 &normalOnB, btScalar distance, int lifeTime, const btVector3 &color)=0
btVector3 m_contactPoint
Definition: btIDebugDraw.h:38
virtual int getDebugMode() const =0
virtual void drawBox(const btVector3 &bbMin, const btVector3 &bbMax, const btVector3 &color)
Definition: btIDebugDraw.h:304
virtual void drawCylinder(btScalar radius, btScalar halfHeight, int upAxis, const btTransform &transform, const btVector3 &color)
Definition: btIDebugDraw.h:388
btVector3 m_disabledSimulationObject
Definition: btIDebugDraw.h:36
virtual void drawSpherePatch(const btVector3 &center, const btVector3 &up, const btVector3 &axis, btScalar radius, btScalar minTh, btScalar maxTh, btScalar minPs, btScalar maxPs, const btVector3 &color, btScalar stepDegrees=btScalar(10.f), bool drawCenter=true)
Definition: btIDebugDraw.h:196
@ DBG_DrawContactPoints
Definition: btIDebugDraw.h:58
@ DBG_MAX_DEBUG_DRAW_MODE
Definition: btIDebugDraw.h:71
@ DBG_EnableSatComparison
Definition: btIDebugDraw.h:63
@ DBG_DrawFeaturesText
Definition: btIDebugDraw.h:57
@ DBG_DisableBulletLCP
Definition: btIDebugDraw.h:64
@ DBG_DrawConstraintLimits
Definition: btIDebugDraw.h:67
virtual DefaultColors getDefaultColors() const
Definition: btIDebugDraw.h:76
btVector3 m_aabb
Definition: btIDebugDraw.h:37
virtual void drawTriangle(const btVector3 &v0, const btVector3 &v1, const btVector3 &v2, const btVector3 &color, btScalar)
Definition: btIDebugDraw.h:118
virtual void drawAabb(const btVector3 &from, const btVector3 &to, const btVector3 &color)
Definition: btIDebugDraw.h:135
virtual void drawCapsule(btScalar radius, btScalar halfHeight, int upAxis, const btTransform &transform, const btVector3 &color)
Definition: btIDebugDraw.h:335
virtual void setDefaultColors(const DefaultColors &)
the default implementation for setDefaultColors has no effect. A derived class can implement it and s...
Definition: btIDebugDraw.h:82
StackEntry * from
SyclQueue void void size_t num_bytes void
IconTextureDrawCall normal
static ulong * next
T distance(const T &a, const T &b)
SymEdge< T > * prev(const SymEdge< T > *se)
Definition: delaunay_2d.cc:105