VR-Forces Development_Version Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
sharedMemoryBulletDebugDrawer.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2010 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 
11 #pragma once
12 
13 
15 
16 #include <btBulletCollisionCommon.h>
18 
19 class Coordinate_System;
20 
22  : public btIDebugDraw
23 {
24 public:
26  {
27  public:
29  : myDrawer(drawer)
30  , myLock(*drawer.shmMem)
31  {
32  drawer.currentFrame = &myLock;
33  }
34 
36  {
37  myDrawer.currentFrame = 0;
38  }
39 
40  private:
43  };
44 
45  friend class ScopedFrame;
46 
48  unsigned long bufferSize=10485670/2, unsigned long maxSize=13*10485760/2);
49 
51  std::string tag, unsigned long bufferSize=10485670/2, unsigned long maxSize=13*10485760/2);
52 
54 
55  virtual const Coordinate_System* coordinateSystem() const;
56 
57  virtual void setCoordinateSystem(const Coordinate_System* cs);
58 
59  virtual void drawLine(const btVector3& from,const btVector3& to,const btVector3& color);
60 
61  virtual void drawSphere(const btVector3& p, btScalar radius, const btVector3& color);
62 
63  virtual void drawTriangle(
64  const btVector3& v0, const btVector3& v1, const btVector3& v2,
65  const btVector3& /*n0*/, const btVector3& /*n1*/, const btVector3& /*n2*/,
66  const btVector3& color, btScalar alpha = 0)
67  {
68  drawTriangle(v0,v1,v2,color,alpha);
69  }
70 
71  virtual void drawTriangle(
72  const btVector3& v0, const btVector3& v1,const btVector3& v2,
73  const btVector3& color, btScalar alpha = 0);
74 
75  virtual void drawContactPoint(
76  const btVector3& PointOnB, const btVector3& normalOnB, btScalar distance,
77  int lifeTime, const btVector3& color);
78 
79  virtual void reportErrorWarning(const char* warningString);
80 
81  virtual void draw3dText(const btVector3& location,const char* textString);
82 
83  virtual void setDebugMode(int debugMode);
84 
85  virtual int getDebugMode() const;
86 
87  virtual bool isEnabled();
88 
89  virtual void setEnabled(bool enable);
90 
91  virtual void setDrawTrianglesAsLines(bool val = true);
92 
93  virtual void setAlpha(btScalar alpha);
94 
95 protected:
99  bool isDrawing;
101  btScalar myDefaultAlpha;
102 };
103 

Document ID: Generated on Tue Mar 8 22:13:38 EST 2016 from SVN revision 162938
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)