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

@@ -19,38 +19,44 @@ subject to the following restrictions:
#include "LinearMath/btTransform.h"
#include "LinearMath/btVector3.h"
class b3ReferenceFrameHelper {
class b3ReferenceFrameHelper
{
public:
static btVector3 getPointWorldToLocal(const btTransform& localObjectCenterOfMassTransform, const btVector3& point) {
return localObjectCenterOfMassTransform.inverse() * point; // transforms the point from the world frame into the local frame
static btVector3 getPointWorldToLocal(const btTransform& localObjectCenterOfMassTransform, const btVector3& point)
{
return localObjectCenterOfMassTransform.inverse() * point; // transforms the point from the world frame into the local frame
}
static btVector3 getPointLocalToWorld(const btTransform& localObjectCenterOfMassTransform,const btVector3& point) {
return localObjectCenterOfMassTransform * point; // transforms the point from the world frame into the local frame
static btVector3 getPointLocalToWorld(const btTransform& localObjectCenterOfMassTransform, const btVector3& point)
{
return localObjectCenterOfMassTransform * point; // transforms the point from the world frame into the local frame
}
static btVector3 getAxisWorldToLocal(const btTransform& localObjectCenterOfMassTransform, const btVector3& axis) {
btTransform local1 = localObjectCenterOfMassTransform.inverse(); // transforms the axis from the local frame into the world frame
btVector3 zero(0,0,0);
local1.setOrigin(zero);
return local1 * axis;
static btVector3 getAxisWorldToLocal(const btTransform& localObjectCenterOfMassTransform, const btVector3& axis)
{
btTransform local1 = localObjectCenterOfMassTransform.inverse(); // transforms the axis from the local frame into the world frame
btVector3 zero(0, 0, 0);
local1.setOrigin(zero);
return local1 * axis;
}
static btVector3 getAxisLocalToWorld(const btTransform& localObjectCenterOfMassTransform, const btVector3& axis) {
btTransform local1 = localObjectCenterOfMassTransform; // transforms the axis from the local frame into the world frame
btVector3 zero(0,0,0);
local1.setOrigin(zero);
return local1 * axis;
static btVector3 getAxisLocalToWorld(const btTransform& localObjectCenterOfMassTransform, const btVector3& axis)
{
btTransform local1 = localObjectCenterOfMassTransform; // transforms the axis from the local frame into the world frame
btVector3 zero(0, 0, 0);
local1.setOrigin(zero);
return local1 * axis;
}
static btTransform getTransformWorldToLocal(const btTransform& localObjectCenterOfMassTransform, const btTransform& transform) {
return localObjectCenterOfMassTransform.inverse() * transform; // transforms the axis from the local frame into the world frame
static btTransform getTransformWorldToLocal(const btTransform& localObjectCenterOfMassTransform, const btTransform& transform)
{
return localObjectCenterOfMassTransform.inverse() * transform; // transforms the axis from the local frame into the world frame
}
static btTransform getTransformLocalToWorld(const btTransform& localObjectCenterOfMassTransform, const btTransform& transform) {
return localObjectCenterOfMassTransform * transform; // transforms the axis from the local frame into the world frame
static btTransform getTransformLocalToWorld(const btTransform& localObjectCenterOfMassTransform, const btTransform& transform)
{
return localObjectCenterOfMassTransform * transform; // transforms the axis from the local frame into the world frame
}
};
#endif /* B3_REFERENCEFRAMEHELPER_H */