integration/gwnavruntimeglue/bulletcollisioninterface/internals.h Source File
Go to the documentation of this file.
7 #ifndef KyRuntimeGlue_Internals_H
8 #define KyRuntimeGlue_Internals_H
10 KY_INLINE
Kaim::Vec3f btVectorToVec3f(
const btVector3& btVec)
15 KY_INLINE btVector3 Vec3fTobtVector(
const Kaim::Vec3f& vec3f)
17 return btVector3(vec3f[0], vec3f[1], vec3f[2]);
25 class CollisionInterfaceDebugDraw :
public btIDebugDraw
29 CollisionInterfaceDebugDraw() : m_displayList(
KY_NULL), m_debugMode(0) {}
30 virtual ~CollisionInterfaceDebugDraw() {}
32 virtual void drawLine(
const btVector3& from,
const btVector3& to,
const btVector3& color)
37 m_displayList->PushLine(a, b, c);
40 virtual void drawLine(
const btVector3& from,
const btVector3& to,
const btVector3& fromColor,
const btVector3& )
42 drawLine(from, to, fromColor);
45 virtual void drawTriangle(
const btVector3& a,
const btVector3& b,
const btVector3& c,
const btVector3& color, btScalar alpha)
48 Kaim::VisualShapeColor shapeCol;
49 shapeCol.SetOnlyTriangleColor(visCol);
50 m_displayList->PushTriangle(btVectorToVec3f(a), btVectorToVec3f(b), btVectorToVec3f(c), shapeCol);
53 virtual void drawTriangle(
const btVector3& v0,
const btVector3& v1,
const btVector3& v2,
const btVector3& ,
const btVector3& ,
const btVector3& ,
const btVector3& color, btScalar alpha)
55 drawTriangle(v0,v1,v2,color,alpha);
58 virtual void drawContactPoint(
const btVector3& PointOnB,
const btVector3& normalOnB,btScalar distance,
int lifeTime,
const btVector3& color) {}
60 virtual void reportErrorWarning(
const char* warningString) {}
62 virtual void draw3dText(
const btVector3& location,
const char* textString)
68 virtual void setDebugMode(
int debugMode)
70 m_debugMode = debugMode;
73 virtual int getDebugMode()
const
75 return btIDebugDraw::DBG_DrawWireframe;
80 m_displayList = displayList;
93 #endif //KyRuntimeGlue_Internals_H
#define KY_NULL
Null value.
Definition: types.h:247
Represents a single RGBA color.
Definition: visualcolor.h:19
static const VisualColor Coral
Represents the color with RGBA values (255, 127, 80, 255).
Definition: visualcolor.h:112
unsigned char KyUInt8
Type used internally to represent an unsigned 8-bit integer.
Definition: types.h:41
ScopedDisplayList is used to push text, lines or shapes for rendering in the NavigationLab e...
Definition: displaylist.h:136
This class defines a three-dimensional vector whose coordinates are stored using floating-point numbe...
Definition: vec3f.h:23