16 #ifndef BT_IDEBUG_DRAW__H
17 #define BT_IDEBUG_DRAW__H
41 : m_activeObject(1, 1, 1),
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);
141 btVector3 edgecoord(1.f, 1.f, 1.f), pa, pb;
142 for (i = 0; i < 4; i++)
144 for (j = 0; j < 3; j++)
146 pa =
btVector3(edgecoord[0] * halfExtents[0], edgecoord[1] * halfExtents[1],
147 edgecoord[2] * halfExtents[2]);
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]);
160 edgecoord[i] *= -1.f;
177 int nSteps = (int)
btFabs((maxAngle - minAngle) / step);
178 if (!nSteps) nSteps = 1;
184 for (
int i = 1; i <= nSteps; i++)
225 drawN = drawS =
true;
227 int n_hor = (int)((maxTh - minTh) / step) + 1;
228 if (n_hor < 2) n_hor = 2;
230 bool isClosed =
false;
245 int n_vert = (int)((maxPs - minPs) / step) + 1;
246 if (n_vert < 2) n_vert = 2;
248 for (
int i = 0; i < n_hor; i++)
253 for (
int j = 0; j < n_vert; j++)
258 pvB[j] =
center + cth * cps * iv + cth * sps * jv + sth * kv;
275 if ((i == (n_hor - 1)) && drawN)
284 if (j == (n_vert - 1))
291 if (((!i) || (i == (n_hor - 1))) && ((!j) || (j == (n_vert - 1))))
337 int stepDegrees = 30;
340 capStart[upAxis] = -halfHeight;
343 capEnd[upAxis] = halfHeight;
348 childTransform.getOrigin() =
transform * capStart;
351 btVector3 up = childTransform.getBasis().getColumn((upAxis + 1) % 3);
352 btVector3 axis = -childTransform.getBasis().getColumn(upAxis);
358 drawSpherePatch(
center, up, axis, radius, minTh, maxTh, minPs, maxPs,
color,
btScalar(stepDegrees),
false);
364 childTransform.getOrigin() =
transform * capEnd;
367 btVector3 up = childTransform.getBasis().getColumn((upAxis + 1) % 3);
368 btVector3 axis = childTransform.getBasis().getColumn(upAxis);
373 drawSpherePatch(
center, up, axis, radius, minTh, maxTh, minPs, maxPs,
color,
btScalar(stepDegrees),
false);
380 for (
int i = 0; i < 360; i += stepDegrees)
392 offsetHeight[upAxis] = halfHeight;
393 int stepDegrees = 30;
395 capStart[upAxis] = -halfHeight;
397 capEnd[upAxis] = halfHeight;
399 for (
int i = 0; i < 360; i += stepDegrees)
409 xaxis[(upAxis + 1) % 3] =
btScalar(1.0);
416 int stepDegrees = 30;
421 offsetHeight[upAxis] = halfHeight;
423 offsetRadius[(upAxis + 1) % 3] = radius;
425 offset2Radius[(upAxis + 2) % 3] = radius;
428 capEnd[upAxis] = -halfHeight;
430 for (
int i = 0; i < 360; i += stepDegrees)
446 xaxis[(upAxis + 1) % 3] =
btScalar(1.0);
452 btVector3 planeOrigin = planeNormal * planeConst;
456 btVector3 pt0 = planeOrigin + vec0 * vecLen;
457 btVector3 pt1 = planeOrigin - vec0 * vecLen;
458 btVector3 pt2 = planeOrigin + vec1 * vecLen;
459 btVector3 pt3 = planeOrigin - vec1 * vecLen;
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)
#define SIMD_RADS_PER_DEG
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
SIMD_FORCE_INLINE btScalar btSin(btScalar x)
#define ATTRIBUTE_ALIGNED16(a)
SIMD_FORCE_INLINE btScalar btFabs(btScalar x)
SIMD_FORCE_INLINE void btPlaneSpace1(const T &n, T &p, T &q)
SIMD_FORCE_INLINE btScalar angle(const btVector3 &v) const
Return the angle between this and another vector.
btVector3
btVector3 can be used to represent 3D points and vectors. It has an un-used w component to suit 16-by...
virtual void drawCone(btScalar radius, btScalar height, int upAxis, const btTransform &transform, const btVector3 &color)
btVector3 m_deactivatedObject
virtual void drawPlane(const btVector3 &planeNormal, btScalar planeConst, const btTransform &transform, const btVector3 &color)
virtual void drawLine(const btVector3 &from, const btVector3 &to, const btVector3 &color)=0
virtual void drawLine(const btVector3 &from, const btVector3 &to, const btVector3 &fromColor, const btVector3 &toColor)
virtual void drawBox(const btVector3 &bbMin, const btVector3 &bbMax, const btTransform &trans, const btVector3 &color)
virtual void drawArc(const btVector3 ¢er, const btVector3 &normal, const btVector3 &axis, btScalar radiusA, btScalar radiusB, btScalar minAngle, btScalar maxAngle, const btVector3 &color, bool drawSect, btScalar stepDegrees=btScalar(10.f))
btVector3 m_disabledDeactivationObject
virtual void draw3dText(const btVector3 &location, const char *textString)=0
virtual void drawSphere(btScalar radius, const btTransform &transform, const btVector3 &color)
btVector3 m_wantsDeactivationObject
virtual void drawTriangle(const btVector3 &v0, const btVector3 &v1, const btVector3 &v2, const btVector3 &, const btVector3 &, const btVector3 &, const btVector3 &color, btScalar alpha)
virtual void flushLines()
virtual void reportErrorWarning(const char *warningString)=0
virtual void clearLines()
virtual void drawSphere(const btVector3 &p, btScalar radius, const btVector3 &color)
virtual void setDebugMode(int debugMode)=0
virtual void drawTransform(const btTransform &transform, btScalar orthoLen)
virtual void drawContactPoint(const btVector3 &PointOnB, const btVector3 &normalOnB, btScalar distance, int lifeTime, const btVector3 &color)=0
virtual int getDebugMode() const =0
virtual void drawBox(const btVector3 &bbMin, const btVector3 &bbMax, const btVector3 &color)
virtual void drawCylinder(btScalar radius, btScalar halfHeight, int upAxis, const btTransform &transform, const btVector3 &color)
btVector3 m_disabledSimulationObject
virtual void drawSpherePatch(const btVector3 ¢er, 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)
@ DBG_MAX_DEBUG_DRAW_MODE
@ DBG_EnableSatComparison
@ DBG_DrawConstraintLimits
virtual DefaultColors getDefaultColors() const
virtual void drawTriangle(const btVector3 &v0, const btVector3 &v1, const btVector3 &v2, const btVector3 &color, btScalar)
virtual void drawAabb(const btVector3 &from, const btVector3 &to, const btVector3 &color)
virtual void drawCapsule(btScalar radius, btScalar halfHeight, int upAxis, const btTransform &transform, const btVector3 &color)
virtual void setDefaultColors(const DefaultColors &)
the default implementation for setDefaultColors has no effect. A derived class can implement it and s...
SyclQueue void void size_t num_bytes void
IconTextureDrawCall normal
T distance(const T &a, const T &b)
SymEdge< T > * prev(const SymEdge< T > *se)