src/inVRs/SystemCore/DataTypes.h File Reference
#include <gmtl/AxisAngle.h>#include <gmtl/Quat.h>#include <gmtl/Matrix.h>#include <gmtl/Generate.h>#include <OpenSG/OSGLock.h>#include <OpenSG/OSGVector.h>#include <OpenSG/OSGQuaternion.h>#include <OpenSG/OSGBaseTypes.h>#include "Platform.h"#include "NetMessage.h"

Classes | |
| class | Version |
| struct | AABB |
| struct | SensorData |
| struct | TransformationData |
| class | ScopedOSGLock |
Defines | |
| #define | M_PI 3.1415926535f |
Functions | |
| INVRS_SYSTEMCORE_API TransformationData & | convert (const SensorData &src, TransformationData &dst) |
| INVRS_SYSTEMCORE_API TransformationData & | multiply (TransformationData &dst, const TransformationData &second, const TransformationData &first) |
| INVRS_SYSTEMCORE_API gmtl::Matrix44f & | transformationDataToMatrix (TransformationData src, gmtl::Matrix44f &dst) |
| INVRS_SYSTEMCORE_API TransformationData & | matrixToTransformationData (const gmtl::Matrix44f &src, TransformationData &dst) |
| INVRS_SYSTEMCORE_API TransformationData & | invert (TransformationData &dst, const TransformationData &src) |
| TransformationData & | invert (TransformationData &dst) |
| INVRS_SYSTEMCORE_API void | transformVector (gmtl::Vec4f &dst, TransformationData &transf, gmtl::Vec4f &src) |
| INVRS_SYSTEMCORE_API void | dumpTransformation (TransformationData &data) |
| INVRS_SYSTEMCORE_API std::string | dumpTransformationToString (TransformationData &data, const char *prefix="") |
| INVRS_SYSTEMCORE_API void | dumpVec (gmtl::Vec3f vec, char *text) |
| INVRS_SYSTEMCORE_API void | dumpMatrix (gmtl::Matrix44f &m) |
| INVRS_SYSTEMCORE_API void | dumpMatrixDifference (gmtl::Matrix44f &m1, gmtl::Matrix44f &m2) |
| INVRS_SYSTEMCORE_API float | gmtlDet3 (gmtl::Matrix44f mat) |
| INVRS_SYSTEMCORE_API float | distMatrix3x3 (gmtl::Matrix44f mat1, gmtl::Matrix44f mat2) |
| OSG::Vec3f & | convert (gmtl::Vec3f &src, OSG::Vec3f &dst) |
| OSG::Quaternion & | convert (gmtl::Quatf &src, OSG::Quaternion &dst) |
| INVRS_SYSTEMCORE_API gmtl::Quatf & | setQuatfAsAxisAngleDeg (gmtl::Quatf &dst, float x, float y, float z, float deg) |
| template<typename DATA_TYPE > | |
| gmtl::Quat< DATA_TYPE > | operator* (const gmtl::Quat< DATA_TYPE > &q1, const gmtl::AxisAngle< DATA_TYPE > &q2) |
| template<typename DATA_TYPE > | |
| gmtl::Quat< DATA_TYPE > | operator* (const gmtl::AxisAngle< DATA_TYPE > &q1, const gmtl::Quat< DATA_TYPE > &q2) |
| INVRS_SYSTEMCORE_API void | singularValueDecomposition (const gmtl::Matrix44f &src, gmtl::Matrix44f &q, gmtl::Matrix44f &s, gmtl::Matrix44f &p) |
| unsigned int | join (unsigned short upper, unsigned short lower) |
| void | split (unsigned int source, unsigned short &upper, unsigned short &lower) |
| uint64_t | join (uint32_t upper, uint32_t lower) |
| void | split (uint64_t source, uint32_t &upper, uint32_t &lower) |
| INVRS_SYSTEMCORE_API TransformationData | identityTransformation () |
| INVRS_SYSTEMCORE_API bool | isIdentityTransformation (TransformationData &toCmp) |
| INVRS_SYSTEMCORE_API SensorData | identitySensorData () |
| INVRS_SYSTEMCORE_API void | addTransformationToBinaryMsg (TransformationData *data, NetMessage *dst) |
| INVRS_SYSTEMCORE_API TransformationData | readTransformationFrom (NetMessage *src) |
| INVRS_SYSTEMCORE_API float | getMinDistanceToAABBox (gmtl::Vec3f pos, Entity *entity) |
| INVRS_SYSTEMCORE_API bool | isInside (gmtl::Vec3f pos, Entity *entityTrans) |
| INVRS_SYSTEMCORE_API Entity * | smallerBBox (Entity *e1, Entity *e2) |
| INVRS_SYSTEMCORE_API std::string | getUInt64AsString (OSG::UInt64 src) |
| INVRS_SYSTEMCORE_API unsigned int | generateHashCode (std::string name) |
Variables | |
| const Version | UndefinedVersion |
| static const TransformationData | IdentityTransformation = identityTransformation() |
| static const SensorData | IdentitySensorData = identitySensorData() |
Define Documentation
| #define M_PI 3.1415926535f |
Function Documentation
| INVRS_SYSTEMCORE_API void addTransformationToBinaryMsg | ( | TransformationData * | data, | |
| NetMessage * | dst | |||
| ) |
| OSG::Quaternion& convert | ( | gmtl::Quatf & | src, | |
| OSG::Quaternion & | dst | |||
| ) | [inline] |
| OSG::Vec3f& convert | ( | gmtl::Vec3f & | src, | |
| OSG::Vec3f & | dst | |||
| ) | [inline] |
| INVRS_SYSTEMCORE_API TransformationData& convert | ( | const SensorData & | src, | |
| TransformationData & | dst | |||
| ) |
Converts SensorData into TransformationData (simply by setting scale to 1 and scaleOrientation to the identity quaternion)
- Parameters:
-
src SensorData which should be converted dst TransformationData where the result is written to
- Returns:
- reference to dst
| INVRS_SYSTEMCORE_API float distMatrix3x3 | ( | gmtl::Matrix44f | mat1, | |
| gmtl::Matrix44f | mat2 | |||
| ) |
| INVRS_SYSTEMCORE_API void dumpMatrix | ( | gmtl::Matrix44f & | m | ) |
| INVRS_SYSTEMCORE_API void dumpMatrixDifference | ( | gmtl::Matrix44f & | m1, | |
| gmtl::Matrix44f & | m2 | |||
| ) |
| INVRS_SYSTEMCORE_API void dumpTransformation | ( | TransformationData & | data | ) |
| INVRS_SYSTEMCORE_API std::string dumpTransformationToString | ( | TransformationData & | data, | |
| const char * | prefix = "" | |||
| ) |
| INVRS_SYSTEMCORE_API void dumpVec | ( | gmtl::Vec3f | vec, | |
| char * | text | |||
| ) |
| INVRS_SYSTEMCORE_API unsigned int generateHashCode | ( | std::string | name | ) |
| INVRS_SYSTEMCORE_API float getMinDistanceToAABBox | ( | gmtl::Vec3f | pos, | |
| Entity * | entity | |||
| ) |
| INVRS_SYSTEMCORE_API std::string getUInt64AsString | ( | OSG::UInt64 | src | ) |
| INVRS_SYSTEMCORE_API float gmtlDet3 | ( | gmtl::Matrix44f | mat | ) |
| INVRS_SYSTEMCORE_API SensorData identitySensorData | ( | ) |
| INVRS_SYSTEMCORE_API TransformationData identityTransformation | ( | ) |
| TransformationData& invert | ( | TransformationData & | dst | ) | [inline] |
Inverts a TransformationData. Multiplying a TransformationData with its inverse results in an identity TransformationData.
- Parameters:
-
dst TransformationData which will be inverted (result will be written to dst)
- Returns:
- returns dst
| INVRS_SYSTEMCORE_API TransformationData& invert | ( | TransformationData & | dst, | |
| const TransformationData & | src | |||
| ) |
Inverts a TransformationData. Multiplying a TransformationData with its inverse results in an identity TransformationData.
- Parameters:
-
dst TransformationData which will hold the inverse of src after call src TransformationData which should be inverted
- Returns:
- returns dst
| INVRS_SYSTEMCORE_API bool isIdentityTransformation | ( | TransformationData & | toCmp | ) |
| INVRS_SYSTEMCORE_API bool isInside | ( | gmtl::Vec3f | pos, | |
| Entity * | entity | |||
| ) |
| uint64_t join | ( | uint32_t | upper, | |
| uint32_t | lower | |||
| ) | [inline] |
| unsigned int join | ( | unsigned short | upper, | |
| unsigned short | lower | |||
| ) | [inline] |
| INVRS_SYSTEMCORE_API TransformationData& matrixToTransformationData | ( | const gmtl::Matrix44f & | src, | |
| TransformationData & | dst | |||
| ) |
Converts a matrix into a TransformationData. In general it cannot be expected that transformationDataToMatrix() and matrixToTransformationData() are inverse to each other. This method might be time consuming.
- Parameters:
-
src matrix which should be converted dst TransformationData where the result is written to
- Returns:
- returns dst
| INVRS_SYSTEMCORE_API TransformationData& multiply | ( | TransformationData & | dst, | |
| const TransformationData & | second, | |||
| const TransformationData & | first | |||
| ) |
Performs a matrix, matrix multiplication: C = A * B
- Parameters:
-
first TransformationData describing matrix B second TransformationData describing matrix A dst TransformationData where the resulting TransformationData is written to
- Returns:
- returns dst for conveniece
| gmtl::Quat<DATA_TYPE> operator* | ( | const gmtl::AxisAngle< DATA_TYPE > & | q1, | |
| const gmtl::Quat< DATA_TYPE > & | q2 | |||
| ) | [inline] |
| gmtl::Quat<DATA_TYPE> operator* | ( | const gmtl::Quat< DATA_TYPE > & | q1, | |
| const gmtl::AxisAngle< DATA_TYPE > & | q2 | |||
| ) | [inline] |
| INVRS_SYSTEMCORE_API TransformationData readTransformationFrom | ( | NetMessage * | src | ) |
| INVRS_SYSTEMCORE_API gmtl::Quatf& setQuatfAsAxisAngleDeg | ( | gmtl::Quatf & | dst, | |
| float | x, | |||
| float | y, | |||
| float | z, | |||
| float | deg | |||
| ) |
| INVRS_SYSTEMCORE_API void singularValueDecomposition | ( | const gmtl::Matrix44f & | src, | |
| gmtl::Matrix44f & | q, | |||
| gmtl::Matrix44f & | s, | |||
| gmtl::Matrix44f & | p | |||
| ) |
src = q * s * p where p, q orthogonal and s a diagonal matrix only the 3x3 part is considered
| void split | ( | uint64_t | source, | |
| uint32_t & | upper, | |||
| uint32_t & | lower | |||
| ) | [inline] |
| void split | ( | unsigned int | source, | |
| unsigned short & | upper, | |||
| unsigned short & | lower | |||
| ) | [inline] |
| INVRS_SYSTEMCORE_API gmtl::Matrix44f& transformationDataToMatrix | ( | TransformationData | src, | |
| gmtl::Matrix44f & | dst | |||
| ) |
Converts a TransformationData into a matrix
- Parameters:
-
src TransformationData which should be converted dst matrix
- Returns:
- returns reference to dst
| INVRS_SYSTEMCORE_API void transformVector | ( | gmtl::Vec4f & | dst, | |
| TransformationData & | transf, | |||
| gmtl::Vec4f & | src | |||
| ) |
Transforms a vector by a TransformationData transf. See TransformationData struct for a more detailed description of how a vector is transformed by a TransformationData.
- Parameters:
-
dst transformed vector transf TransformationData describing the transformation src vector which should be transformed
Variable Documentation
const SensorData IdentitySensorData = identitySensorData() [static] |
const TransformationData IdentityTransformation = identityTransformation() [static] |
| const Version UndefinedVersion |
Generated on Wed Oct 20 16:11:46 2010 for inVRs by
1.5.8