src/inVRs/SystemCore/DataTypes.cpp File Reference

#include "DataTypes.h"
#include <sstream>
#include <math.h>
#include <limits>
#include <assert.h>
#include <stdlib.h>
#include <gmtl/AxisAngle.h>
#include <gmtl/MatrixOps.h>
#include <gmtl/Generate.h>
#include <gmtl/Numerics/Eigen.h>
#include <gmtl/VecOps.h>
#include <gmtl/Xforms.h>
#include "DebugOutput.h"
#include "WorldDatabase/Entity.h"

Include dependency graph for DataTypes.cpp:


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)
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)
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)
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 *entity)
INVRS_SYSTEMCORE_API EntitysmallerBBox (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 = Version()

Function Documentation

INVRS_SYSTEMCORE_API void addTransformationToBinaryMsg ( TransformationData data,
NetMessage dst 
)

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 (  ) 

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 
)

This method returns if the passed Position is inside the BoundingBox of the passed Entity.

Parameters:
pos Position in world coordinates
entity Entity to check
Returns:
true, if the position is inside

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

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

INVRS_SYSTEMCORE_API Entity* smallerBBox ( Entity e1,
Entity e2 
)

This method simply compares the size of the BoundingBoxes of 2 Entities and returns the Entity with the smaller box.

Parameters:
e1 Entity to compare
e2 Entity to compare with
Returns:
Entity with the smaller BoundingBox

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


Generated on Wed Oct 20 16:11:46 2010 for inVRs by doxygen 1.5.8