Code-style consistency improvement:

Apply clang-format-all.sh using the _clang-format file through all the cpp/.h files.
make sure not to apply it to certain serialization structures, since some parser expects the * as part of the name, instead of type.
This commit contains no other changes aside from adding and applying clang-format-all.sh
This commit is contained in:
erwincoumans
2018-09-23 14:17:31 -07:00
parent b73b05e9fb
commit ab8f16961e
1773 changed files with 1081087 additions and 474249 deletions

View File

@@ -30,48 +30,52 @@ class GL_ShapeDrawer
protected:
struct ShapeCache
{
struct Edge { btVector3 n[2];int v[2]; };
ShapeCache(btConvexShape* s) : m_shapehull(s) {}
btShapeHull m_shapehull;
btAlignedObjectArray<Edge> m_edges;
struct Edge
{
btVector3 n[2];
int v[2];
};
ShapeCache(btConvexShape* s) : m_shapehull(s) {}
btShapeHull m_shapehull;
btAlignedObjectArray<Edge> m_edges;
};
//clean-up memory of dynamically created shape hulls
btAlignedObjectArray<ShapeCache*> m_shapecaches;
unsigned int m_texturehandle;
bool m_textureenabled;
bool m_textureinitialized;
btAlignedObjectArray<ShapeCache*> m_shapecaches;
unsigned int m_texturehandle;
bool m_textureenabled;
bool m_textureinitialized;
ShapeCache* cache(btConvexShape*);
ShapeCache* cache(btConvexShape*);
virtual void drawSceneInternal(const btDiscreteDynamicsWorld* world, int pass, int cameraUpAxis);
public:
GL_ShapeDrawer();
GL_ShapeDrawer();
virtual ~GL_ShapeDrawer();
virtual ~GL_ShapeDrawer();
virtual void drawScene(const btDiscreteDynamicsWorld* world, bool useShadows, int cameraUpAxis);
virtual void drawScene(const btDiscreteDynamicsWorld* world, bool useShadows, int cameraUpAxis);
///drawOpenGL might allocate temporary memoty, stores pointer in shape userpointer
virtual void drawOpenGL(btScalar* m, const btCollisionShape* shape, const btVector3& color, int debugMode, const btVector3& worldBoundsMin, const btVector3& worldBoundsMax);
virtual void drawShadow(btScalar* m, const btVector3& extrusion, const btCollisionShape* shape, const btVector3& worldBoundsMin, const btVector3& worldBoundsMax);
///drawOpenGL might allocate temporary memoty, stores pointer in shape userpointer
virtual void drawOpenGL(btScalar* m, const btCollisionShape* shape, const btVector3& color,int debugMode,const btVector3& worldBoundsMin,const btVector3& worldBoundsMax);
virtual void drawShadow(btScalar* m, const btVector3& extrusion,const btCollisionShape* shape,const btVector3& worldBoundsMin,const btVector3& worldBoundsMax);
bool enableTexture(bool enable) { bool p=m_textureenabled;m_textureenabled=enable;return(p); }
bool hasTextureEnabled() const
{
return m_textureenabled;
}
void drawSphere(btScalar r, int lats, int longs);
static void drawCoordSystem();
bool enableTexture(bool enable)
{
bool p = m_textureenabled;
m_textureenabled = enable;
return (p);
}
bool hasTextureEnabled() const
{
return m_textureenabled;
}
void drawSphere(btScalar r, int lats, int longs);
static void drawCoordSystem();
};
void OGL_displaylist_register_shape(btCollisionShape * shape);
void OGL_displaylist_register_shape(btCollisionShape* shape);
void OGL_displaylist_clean();
#endif //GL_SHAPE_DRAWER_H
#endif //GL_SHAPE_DRAWER_H