H3DUtil  1.4.0
Namespaces | Classes | Typedefs | Functions
H3DUtil Namespace Reference

H3DUtil namespace. More...

Namespaces

 ArithmeticTypes
 DO NOT USE THIS NAMESPACE DIRECTLY.
 
 Constants
 Namespace containing various useful constants.
 
 Exception
 Namespace containing various exception classes.
 
 LogLevel
 Enum for human readable logging levels.
 

Classes

class  AutoPtrVector
 This class is similar to the auto_ptr class in the vector elements are Node * or pointers to subclasses of Node. More...
 
class  AutoRef
 The AutoRef class is similar to the auto_ptr class, but it requires that the pointer to RefCountedClass or a subclass of RefCountedClass. More...
 
class  AutoRefVector
 This class is similar to the AutoRef class in the vector elements are RefCountedClass * or pointers to subclasses of RefCountedClass. More...
 
class  basic_debugbuf
 A string buffer class that stores different messages depending on internal parameters and sends this to an output stream. More...
 
class  basic_dostream
 Output stream used to print debug information. More...
 
class  ConditionLock
 The ConditionLock is a little more advanced version of MutexLock in that it can wait for an arbitrary action in the other thread. More...
 
class  DicomImage
 This Image class uses DCMTK to create an Image from a DICOM file, providing all nesessary Image functions to use it in e.g. More...
 
class  DownhillSimplexMethod
 This algorithm tries to minimize a function and is called downhill simplex method. More...
 
struct  DynamicLibrary
 This struct provides a couple of static functions used for loading and unloading dynamic libraries at runtime. More...
 
class  FreeImageImage
 This Image class is an encapsulation of a FreeImage FIBITMAP *, providing all nesessary Image functions to use it in e.g. More...
 
class  HapticThread
 HapticThread is a thread class that should be used by haptics devices when creating threads. More...
 
class  HapticThreadBase
 The interface base class for all threads that are used for haptics devices. More...
 
class  Image
 Virtual base class for all images containing virtual functions that all Image classes must define. More...
 
class  MutexLock
 Mutual exclusion lock class for synchronisation between threads. More...
 
class  PeriodicThread
 The PeriodicThread class is used to create new threads and provides an interface to add callback functions to be executed in the new thread that can be used by other threads. More...
 
class  PeriodicThreadBase
 The abstract base class for threads that have a main loop and that allow you to add callback functions to be run in that loop. More...
 
class  PixelImage
 An Image which is defined by pixels. More...
 
struct  RawImageInfo
 Contains information needed by the loadRawImage function to correctly load the raw file. More...
 
class  ReadWriteLock
 Read-write lock that allows only one writing thread or one or more reading threads on the same lock. More...
 
class  RefCountedClass
 Base class for all classes that should be reference counted. More...
 
struct  RGB
 Structure for RGB values. More...
 
struct  RGBA
 Structure for RGBA values. More...
 
class  ScopedLock
 A helper class to lock a mutex (or any object having lock()/unlock() methods) for the current scope. More...
 
class  ScopedLockBase
 A generic scoped lock template. More...
 
class  ScopedLockRead
 A scoped read lock compatible with a ReadWriteLock. More...
 
class  ScopedLockWrite
 A scoped write lock compatible with a ReadWriteLock. More...
 
class  SimpleThread
 The SimpleThread class creates a new thread to run a function. More...
 
class  ThreadBase
 The abstract base class for threads. More...
 
class  ThreadPool
 The ThreadPool class manages of pool of worker threads that can be used to perform calculations in parallell. More...
 
class  ThreadSpecificContainer
 Similar to ThreadSpecificStorage, this class stores a value that is different for each thread. More...
 
class  ThreadSpecificContainerBase
 Internal non-templated base for ThreadSpecificContainer. More...
 
class  ThreadSpecificStorage
 A container which stores a variable that has a different value for each thread that accesses it. More...
 
struct  TimeStamp
 This struct stores time and contains routines to get system time. More...
 

Typedefs

typedef float H3DFloat
 The floating point type.
 
typedef double H3DDouble
 Used for floating point values when specified as high-precision in the X3D specification. More...
 
typedef int H3DInt32
 The 32 bit integer type.
 
typedef unsigned int H3DUInt32
 The 32 bit unsigned integer type.
 
typedef unsigned short H3DTick
 The base type for traverse tick; our way of measuring how many scene traversals have taken place. More...
 
typedef H3DUTIL_INT64 H3DInt64
 The 64 bit integer type.
 
typedef unsigned H3DUTIL_INT64 H3DUInt64
 The 64 bit unsigned integer type.
 
typedef H3DUInt64 H3DPtrUint
 The unsigned integer type with the same size as the pointer type of the system. More...
 
typedef double H3DTime
 The type for time values.
 

Functions

bool isPowerOfTwo (unsigned int i)
 Determines if the given integer is a power of two or not. More...
 
unsigned int nextPowerOfTwo (unsigned int i)
 If i is a power of two, i is returned. More...
 
template<class F >
H3DAbs (F f)
 Returns the absolute value of f. More...
 
template<class F >
H3DSqrt (F f)
 Returns the square root of f. More...
 
template<class F >
H3DSqr (F f)
 Returns f squared. More...
 
template<class F >
H3DExp (F f)
 Returns the exponential function of f. More...
 
template<class F >
H3DLog (F f)
 Returns the natural logarithm of f. More...
 
template<class F >
H3DLog10 (F f)
 Returns the base 10 logarithm of f. More...
 
template<class F , class T >
H3DPow (F f, T t)
 Returns f raised to the power of t. More...
 
double H3DPow (int f, int t)
 Returns f raised to the power of t. More...
 
template<class A >
H3DMax (const A &a, const A &b)
 Returns the maximum value of a and b. More...
 
template<class A >
H3DMin (const A &a, const A &b)
 Returns the minimum value of a and b. More...
 
template<class A >
H3DClamp (const A &a, const A &min, const A &max)
 Returns value a, clamped to the range between min and max. More...
 
template<class F >
H3DCos (F d)
 Returns the cosine of d. More...
 
template<class F >
H3DCosh (F d)
 Returns the hyperbolic cosine of d. More...
 
template<class F >
H3DAcos (F d)
 Returns the arccosine of d. More...
 
template<class F >
H3DSin (F d)
 Returns the sine of d. More...
 
template<class F >
H3DSinh (F d)
 Returns the hyperbolic sine of d. More...
 
template<class F >
H3DAsin (F d)
 Returns the arcsine of d. More...
 
template<class F >
H3DTan (F d)
 Returns the tangent of d. More...
 
template<class F >
H3DTanh (F d)
 Returns the hyperbolic tangent of d. More...
 
template<class F >
H3DAtan (F d)
 Returns the arctangent of d in the range -pi/2 to pi/2 radians. More...
 
template<class F >
H3DAtan2 (F y, F x)
 Returns the arctangent of y/x in the range -pi to pi radians. More...
 
template<class F >
H3DFloor (F f)
 Returns the largest integer that is not greater than f. More...
 
template<class F >
H3DCeil (F f)
 Returns the smallest integer greater than or equal to f. More...
 
template<class F >
bool epsilonCompare (const F &lhs, const F &rhs, const F epsilon=std::numeric_limits< F >::epsilon())
 Returns true if the difference between two values is lower than the specified epsilon value. More...
 
void initializeH3DUtil ()
 Initialize H3DUtil(only needed if using H3DUtil as a static library)?
 
void deinitializeH3DUtil ()
 Deinitialize H3DUtil(only needed if using H3DUtil as a static library)? More...
 
double H3DUTIL_API getH3DUtilVersion ()
 Will return the version of H3DUtil as a double on the form H3DUTIL_MAJOR_VERSION.H3DUTIL_MINOR_VERSION.
 
std::ostream & operator<< (std::ostream &os, const RGB &r)
 Function for printing a RGB to an ostream.
 
std::ostream & operator<< (std::ostream &os, const RGBA &r)
 Function for printing a Rotation to an ostream.
 
bool operator== (const RGB &r1, const RGB &r2)
 Test two RGB instances for equality.
 
bool operator== (const RGBA &r1, const RGBA &r2)
 Test two RGBA instances for equality.
 
bool operator!= (const RGB &r1, const RGB &r2)
 Test two RGB instances for inequality.
 
bool operator!= (const RGBA &r1, const RGBA &r2)
 Test two RGBA instances for inequality.
 
RGB operator * (const RGB &v, const float &f)
 Multiply a RGB with a float.
 
RGB operator * (const RGB &v, const double &d)
 Multiply a RGB with a double.
 
RGB operator * (const float &a, const RGB &b)
 Multiplication with float.
 
RGB operator * (const double &a, const RGB &b)
 Multiplication with double.
 
RGB operator+ (const RGB &v1, const RGB &v2)
 Addition between two RGB.
 
RGBA operator * (const RGBA &v, const float &f)
 Multiply a RGBA with a float.
 
RGBA operator * (const RGBA &v, const double &d)
 Multiply a RGBA with a double.
 
RGBA operator * (const float &a, const RGBA &b)
 Multiplication with float.
 
RGBA operator * (const double &a, const RGBA &b)
 Multiplication with double.
 
RGBA operator+ (const RGBA &v1, const RGBA &v2)
 Addition between two RGBA.
 
H3DUTIL_API ImageloadFreeImage (const std::string &url)
 Loads an image using FreeImage. More...
 
H3DUTIL_API bool saveFreeImagePNG (const std::string &url, Image &image, bool disable_alpha=false)
 Saves an image as a PNG file using FreeImage. More...
 
H3DUTIL_API ImageloadNrrdFile (const std::string &url)
 Loads a file in the Nrrd file format as an image. More...
 
H3DUTIL_API int saveImageAsNrrdFile (const std::string &url, Image *image)
 Saves an image in the Nrrd file format. More...
 
H3DUTIL_API ImageloadDicomFile (const std::string &url, bool load_single_file=true)
 Loads a file in the DICOM file format as an image. More...
 
H3DUTIL_API ImageloadRawImage (const std::string &url, RawImageInfo &raw_image_info)
 Read the data from the file pointed to by the parameter url and creates and returns a PixelImage containing this data. More...
 
H3DUTIL_API bool saveOpenEXRImage (const std::string &url, Image &image)
 Save the specified image as an OpenEXR file with the filename url. More...
 
H3DUTIL_API ImageloadOpenEXRImage (const std::string &url)
 Read the data from the OpenEXR file pointed to by the parameter url. More...
 
H3DUTIL_API ImageloadDDSImage (const std::string &url)
 Read the data from the DDS file pointed to by the parameter url and create and return a PixelImage containing this data. More...
 
H3DUTIL_API ImageloadDDSImage (std::istream &is, const std::string &url="<unnamed stream>")
 Load a DDS image from the specified input stream. More...
 
void writeH3DType (std::ostream &output, H3DInt32 data)
 Write a H3DInt32 binary to an ostream ( such as an ofstream ). More...
 
void writeH3DType (std::ostream &output, float data)
 Write a float binary to an ostream ( such as an ofstream ). More...
 
void writeH3DType (std::ostream &output, double data)
 Write a double binary to an ostream ( such as an ofstream ). More...
 
void writeH3DType (std::ostream &output, const Vec2f &data)
 Write a Vec2f binary to an ostream ( such as an ofstream ). More...
 
void writeH3DType (std::ostream &output, const Vec2d &data)
 Write a Vec2d binary to an ostream ( such as an ofstream ). More...
 
void writeH3DType (std::ostream &output, const Vec3f &data)
 Write a Vec3f binary to an ostream ( such as an ofstream ). More...
 
void writeH3DType (std::ostream &output, const Vec3d &data)
 Write a Vec3d binary to an ostream ( such as an ofstream ). More...
 
void writeH3DType (std::ostream &output, const Vec4f &data)
 Write a Vec4f binary to an ostream ( such as an ofstream ). More...
 
void writeH3DType (std::ostream &output, const Vec4d &data)
 Write a Vec4d binary to an ostream ( such as an ofstream ). More...
 
void writeH3DType (std::ostream &output, const Rotation &data)
 Write a Rotation binary to an ostream ( such as an ofstream ). More...
 
void writeH3DType (std::ostream &output, const Rotationd &data)
 Write a Rotationd binary to an ostream ( such as an ofstream ). More...
 
void writeH3DType (std::ostream &output, const Matrix3f &data)
 Write a Matrix3f binary to an ostream ( such as an ofstream ). More...
 
void writeH3DType (std::ostream &output, const Matrix3d &data)
 Write a Matrix3d binary to an ostream ( such as an ofstream ). More...
 
void writeH3DType (std::ostream &output, const Matrix4f &data)
 Write a Matrix4f binary to an ostream ( such as an ofstream ). More...
 
void writeH3DType (std::ostream &output, const Matrix4d &data)
 Write a Matrix4d binary to an ostream ( such as an ofstream ). More...
 
void writeH3DType (std::ostream &output, const Quaternion &data)
 Write a Quaternion binary to an ostream ( such as an ofstream ). More...
 
void writeH3DType (std::ostream &output, const Quaterniond &data)
 Write a Quaterniond binary to an ostream ( such as an ofstream ). More...
 
void writeH3DType (std::ostream &output, const std::string &data)
 Write a string binary to an ostream ( such as an ofstream ). More...
 
void readH3DType (std::istream &input, H3DInt32 &data)
 Read a H3DInt32 binary from an istream ( such as an ifstream ). More...
 
void readH3DType (std::istream &input, float &data)
 Read a float binary from an istream ( such as an ifstream ). More...
 
void readH3DType (std::istream &input, double &data)
 Read a double binary from an istream ( such as an ifstream ). More...
 
void readH3DType (std::istream &input, Vec2f &data)
 Read a Vec2f binary from an istream ( such as an ifstream ). More...
 
void readH3DType (std::istream &input, Vec2d &data)
 Read a Vec2d binary from an istream ( such as an ifstream ). More...
 
void readH3DType (std::istream &input, Vec3f &data)
 Read a Vec3f binary from an istream ( such as an ifstream ). More...
 
void readH3DType (std::istream &input, Vec3d &data)
 Read a Vec3d binary from an istream ( such as an ifstream ). More...
 
void readH3DType (std::istream &input, Vec4f &data)
 Read a Vec4f binary from an istream ( such as an ifstream ). More...
 
void readH3DType (std::istream &input, Vec4d &data)
 Read a Vec4d binary from an istream ( such as an ifstream ). More...
 
void readH3DType (std::istream &input, Rotation &data)
 Read a Rotation binary from an istream ( such as an ifstream ). More...
 
void readH3DType (std::istream &input, Rotationd &data)
 Read a Rotationd binary from an istream ( such as an ifstream ). More...
 
void readH3DType (std::istream &input, Matrix3f &data)
 Read a Matrix3f binary from an istream ( such as an ifstream ). More...
 
void readH3DType (std::istream &input, Matrix3d &data)
 Read a Matrix3d binary from an istream ( such as an ifstream ). More...
 
void readH3DType (std::istream &input, Matrix4f &data)
 Read a Matrix4f binary from an istream ( such as an ifstream ). More...
 
void readH3DType (std::istream &input, Matrix4d &data)
 Read a Matrix4d binary from an istream ( such as an ifstream ). More...
 
void readH3DType (std::istream &input, Quaternion &data)
 Read a Quaternion binary from an istream ( such as an ifstream ). More...
 
void readH3DType (std::istream &input, Quaterniond &data)
 Read a Quaterniond binary from an istream ( such as an ifstream ). More...
 
void readH3DType (std::istream &input, std::string &data)
 Read a string binary from an istream ( such as an ifstream ). More...
 

Detailed Description

H3DUtil namespace.

Typedef Documentation

◆ H3DDouble

typedef double H3DUtil::H3DDouble

Used for floating point values when specified as high-precision in the X3D specification.

◆ H3DPtrUint

The unsigned integer type with the same size as the pointer type of the system.

◆ H3DTick

typedef unsigned short H3DUtil::H3DTick

The base type for traverse tick; our way of measuring how many scene traversals have taken place.

Function Documentation

◆ deinitializeH3DUtil()

void H3DUtil::deinitializeH3DUtil ( )

Deinitialize H3DUtil(only needed if using H3DUtil as a static library)?

Deinitialize H3DUtil(only needed if using H3DUtil as a static library).