Update build system for multiple tizen profiles
[platform/core/uifw/dali-adaptor.git] / plugins / dynamics / bullet / bullet-dynamics-debug.h
1 #ifndef __DALI_PLUGIN_BULLET_DYNAMICS_DEBUG_H__
2 #define __DALI_PLUGIN_BULLET_DYNAMICS_DEBUG_H__
3
4 //
5 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
6 //
7 // Licensed under the Flora License, Version 1.0 (the License);
8 // you may not use this file except in compliance with the License.
9 // You may obtain a copy of the License at
10 //
11 //     http://floralicense.org/license/
12 //
13 // Unless required by applicable law or agreed to in writing, software
14 // distributed under the License is distributed on an AS IS BASIS,
15 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 // See the License for the specific language governing permissions and
17 // limitations under the License.
18 //
19
20 // EXTERNAL HEADERS
21 #include <dali/integration-api/dynamics/dynamics-debug-vertex.h>
22 // TODO: Change this to use #pragma GCC diagnostic push / pop when the compiler is updated to 4.6.0+
23 #pragma GCC diagnostic ignored "-Wfloat-equal"
24 #include <btBulletDynamicsCommon.h>
25 #pragma GCC diagnostic error "-Wfloat-equal"
26
27 namespace Dali
28 {
29
30 namespace Plugin
31 {
32
33 /**
34  * Debug draw class, BulletPhysics engine will invoke methods on this object to render debug information.
35  * Debug lines are collated into a container and then rendered as a single array during Core::Render
36  */
37 class BulletDebugDraw : public btIDebugDraw
38 {
39 public:
40   /**
41    * Constructor
42    */
43   BulletDebugDraw();
44
45   /**
46    * Destructor
47    */
48   virtual ~BulletDebugDraw();
49
50   virtual void drawLine(const btVector3& from,const btVector3& to,const btVector3& color);
51   virtual void drawContactPoint(const btVector3& PointOnB,const btVector3& normalOnB,btScalar distance,int lifeTime,const btVector3& color);
52   virtual void reportErrorWarning(const char* warningString);
53   virtual void draw3dText(const btVector3& location,const char* textString);
54   virtual void setDebugMode(int debugMode);
55   virtual int  getDebugMode() const;
56
57   void ClearVertices();
58   const Integration::DynamicsDebugVertexContainer& GetVertices() const;
59
60 private:
61
62   int mDebugMode;
63   Integration::DynamicsDebugVertexContainer mVertices;
64
65 }; // class BulletDebugDraw
66
67 } // namespace Plugin
68
69 } // namespace Dali
70
71 #endif /* __DALI_PLUGIN_BULLET_DYNAMICS_DEBUG_H__ */