VR-Forces 4.2 Class Documentation
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 {
23 public:
25  {
26  public:
28  : myDrawer(drawer)
29  , myLock(*drawer.shmMem)
30  {
31  drawer.currentFrame = &myLock;
32  }
33 
35  {
36  myDrawer.currentFrame = 0;
37  }
38 
39  private:
42  };
43 
44  friend class ScopedFrame;
45 
47  DtSharedMemoryBulletDebugDrawer(std::string tag);
49 
50  virtual const Coordinate_System* coordinateSystem() const;
51 
52  virtual void setCoordinateSystem(const Coordinate_System* cs);
53 
54  virtual void drawLine(const btVector3& from,const btVector3& to,const btVector3& color);
55 
56  virtual void drawSphere(const btVector3& p, btScalar radius, const btVector3& color);
57 
58  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)
59  {
60  drawTriangle(v0,v1,v2,color,alpha);
61  }
62 
63  virtual void drawTriangle(const btVector3& v0,const btVector3& v1,const btVector3& v2,const btVector3& color, btScalar /*alpha*/);
64 
65  virtual void drawContactPoint(const btVector3& PointOnB,const btVector3& normalOnB,btScalar distance,int lifeTime,const btVector3& color);
66 
67  virtual void reportErrorWarning(const char* warningString);
68 
69  virtual void draw3dText(const btVector3& location,const char* textString);
70 
71  virtual void update();
72 
73  virtual void setDebugMode(int debugMode);
74 
75  virtual int getDebugMode() const;
76 
77  virtual bool isEnabled();
78 
79  virtual void setEnabled(bool enable);
80 
81  virtual void setDrawTrianglesAsLines(bool val = true);
82 
83 protected:
84  const Coordinate_System* myCoordinateSystem;
87  bool isDrawing;
89 };
90 

Document ID: Generated on Sun Nov 24 19:49:21 EST 2013 from SVN revision 133924
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)