mirror of
https://github.com/bulletphysics/bullet3
synced 2024-12-13 21:30:09 +00:00
ab8f16961e
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
54 lines
1.1 KiB
C++
54 lines
1.1 KiB
C++
#ifndef ROBOT_LOGGING_UTIL_H
|
|
#define ROBOT_LOGGING_UTIL_H
|
|
|
|
#include "LinearMath/btAlignedObjectArray.h"
|
|
#include <string>
|
|
|
|
struct MinitaurLogValue
|
|
{
|
|
MinitaurLogValue()
|
|
: m_intVal(0xcdcdcdcd)
|
|
{
|
|
}
|
|
MinitaurLogValue(int iv)
|
|
: m_intVal(iv)
|
|
{
|
|
}
|
|
MinitaurLogValue(float fv)
|
|
: m_floatVal(fv)
|
|
{
|
|
}
|
|
MinitaurLogValue(char fv)
|
|
: m_charVal(fv)
|
|
{
|
|
}
|
|
|
|
union {
|
|
char m_charVal;
|
|
int m_intVal;
|
|
float m_floatVal;
|
|
};
|
|
};
|
|
|
|
struct MinitaurLogRecord
|
|
{
|
|
btAlignedObjectArray<MinitaurLogValue> m_values;
|
|
};
|
|
|
|
enum MINITAUR_LOG_ERROR
|
|
{
|
|
eMinitaurFileNotFound = -1,
|
|
eCorruptHeader = -2,
|
|
eUnknownType = -3,
|
|
eCorruptValue = -4,
|
|
eInvalidAABBAlignCheck = -5,
|
|
};
|
|
|
|
int readMinitaurLogFile(const char* fileName, btAlignedObjectArray<std::string>& structNames, std::string& structTypes, btAlignedObjectArray<MinitaurLogRecord>& logRecords, bool verbose);
|
|
|
|
FILE* createMinitaurLogFile(const char* fileName, btAlignedObjectArray<std::string>& structNames, std::string& structTypes);
|
|
void appendMinitaurLogData(FILE* f, std::string& structTypes, const MinitaurLogRecord& logData);
|
|
void closeMinitaurLogFile(FILE* f);
|
|
|
|
#endif //ROBOT_LOGGING_UTIL_H
|