Definitions.h File Reference

#include <vecmath/Vector4d.h>
#include <vecmath/Vector4f.h>
#include <vecmath/Vector3f.h>
#include <vecmath/Vector3d.h>
#include <vecmath/Vector2f.h>
#include <vecmath/Vector2d.h>
#include <vecmath/Matrix3f.h>
#include <vecmath/Matrix4f.h>
#include <vecmath/Matrix3d.h>
#include <vecmath/Matrix4d.h>
#include <vecmath/Color3f.h>
#include <float.h>
#include <math.h>
#include <typeinfo>
#include <stack>
#include <esg/Export>
#include <hash_map>

Go to the source code of this file.

Namespaces

namespace  Sgi
namespace  esg
namespace  std

Classes

struct  Cache
struct  Interval

Defines

#define MAXFLOAT   FLT_MAX
#define MAXDOUBLE   DBL_MAX
#define MINDOUBLE   DBL_MIN
#define ESG_MAXFLOAT   MAXDOUBLE
#define ESG_MINFLOAT   -MAXDOUBLE
#define MAX_VEC_VALUE   MAXFLOAT
#define MIN_VEC_VALUE   -MAXFLOAT
#define MAXUNSIGNED   UINT_MAX
#define MINUNSIGNED   UINT_MIN
#define PI   M_PI
#define IS_INSTANCE_OF(a, b)   (typeid(a) == typeid(b))
#define ESG_INVERSE_TR_RAY(rMat, tVec, sVec, srcO, dstO, srcD, dstD)
#define ESG_INVERSE_TR_POINT(rMat, tVec, sVec, srcP, dstP)
#define ESG_INVERSE_TR_DIR(rMat, srcD, dstD)
#define ESG_INIT_RAND()   { srand((long int) time(NULL)); }
#define ESG_DBL_RAND   ((double)drand48())
#define ESG_INT_RAND(x)   ((int)((x)*(double)rand()/(RAND_MAX + 1.0)))
#define ESG_M1   134456
#define ESG_IA1   8121
#define ESG_IC1   28411
#define ESG_RM1   1.0/ESG_M1
#define ESG_GAUSS_RAND(iseed, ret)
#define ESG_HASH_RAND(_a, _b, _c, ret)

Typedefs

typedef Vector4d esg::Vector4
typedef Vector3d esg::Vector3
typedef Vector3d esg::Vertex3
typedef Vector2d esg::Vector2
typedef Vector2d esg::Vertex2
typedef Matrix3d esg::Matrix3
typedef Matrix4d esg::Matrix4
typedef double esg::ESGfloat
typedef int esg::ESGbitmask
typedef int esg::ESGint

Variables

OGSCENE_EXPORT esg::SceneGraphObject


Define Documentation

#define ESG_DBL_RAND   ((double)drand48())
 

Definition at line 155 of file Definitions.h.

Referenced by Sphere::randomDirection(), Triangle::randomSample(), Sphere::randomSample(), Rectangle::randomSample(), Hemisphere::randomSample(), and DirEmittance::stochasticEmission().

#define ESG_GAUSS_RAND iseed,
ret   ) 
 

Value:

{ \
    double v1, v2, r; \
    long   ix1 = 0; \
    long   ix2 = (iseed); \
    do { \
        ix1 = (ESG_IC1 + ix2 * ESG_IA1) % ESG_M1; \
        ix2 = (ESG_IC1 + ix1 * ESG_IA1) % ESG_M1; \
        v1  = ix1 * 2.0 * ESG_RM1 - 1.0; \
        v2  = ix2 * 2.0 * ESG_RM1 - 1.0; \
        r   = v1 * v1 + v2 * v2; \
    } while (r >= 1.0); \
    ret = v1 * sqrt((double)(-2.0 * log((double)r) / r)); \
}

Definition at line 173 of file Definitions.h.

#define ESG_HASH_RAND _a,
_b,
_c,
ret   ) 
 

Value:

{ \
    int a = _a; \
    int b = _b; \
    int c = _c; \
    a -= b; a -= c; a ^= (c>>13); \
    b -= c; b -= a; b ^= (a<<8);  \
    c -= a; c -= b; c ^= (b>>13); \
    a -= b; a -= c; a ^= (c>>12); \
    b -= c; b -= a; b ^= (a<<16); \
    c -= a; c -= b; c ^= (b>>5);  \
    a -= b; a -= c; a ^= (c>>3);  \
    b -= c; b -= a; b ^= (a<<10); \
    c -= a; c -= b; c ^= (b>>15); \
    ret = c & 0xffff ; \
}

Definition at line 192 of file Definitions.h.

#define ESG_IA1   8121
 

Definition at line 169 of file Definitions.h.

#define ESG_IC1   28411
 

Definition at line 170 of file Definitions.h.

 
#define ESG_INIT_RAND  )     { srand((long int) time(NULL)); }
 

Definition at line 150 of file Definitions.h.

#define ESG_INT_RAND  )     ((int)((x)*(double)rand()/(RAND_MAX + 1.0)))
 

Definition at line 158 of file Definitions.h.

Referenced by BVList::_split_by_handles().

#define ESG_INVERSE_TR_DIR rMat,
srcD,
dstD   ) 
 

Value:

{ \
    (rMat).transpose(); \
    (rMat).transform(srcD, dstD); }

Definition at line 137 of file Definitions.h.

Referenced by BVH::_dr_leaf().

#define ESG_INVERSE_TR_POINT rMat,
tVec,
sVec,
srcP,
dstP   ) 
 

Value:

{ \
    (rMat).transpose(); \
    (dstP).sub(srcP, tVec); \
    (rMat).transform(dstP); \
    if ((sVec).x) (dstP).x *= 1.0 / (sVec).x; \
    if ((sVec).y) (dstP).y *= 1.0 / (sVec).y; \
    if ((sVec).z) (dstP).z *= 1.0 / (sVec).z; }

Definition at line 129 of file Definitions.h.

Referenced by RadiusExplorer::_accept_new_transformation().

#define ESG_INVERSE_TR_RAY rMat,
tVec,
sVec,
srcO,
dstO,
srcD,
dstD   ) 
 

Value:

{\
    (rMat).transpose(); \
    (rMat).transform(srcD, dstD); \
    (dstO).sub(srcO, tVec);   /* origin = (R^T * origin) - (R^T * tr) = */ \
    (rMat).transform(dstO);   /*        = R^T * (origin - tr)           */ \
    if ((sVec).x) (dstO).x *= 1.0 / (sVec).x; \
    if ((sVec).y) (dstO).y *= 1.0 / (sVec).y; \
    if ((sVec).z) (dstO).z *= 1.0 / (sVec).z; }

Definition at line 120 of file Definitions.h.

Referenced by ShadowExplorer::_explore(), RayIntExplorer::_explore(), and ObjsAheadExplorer::_explore().

#define ESG_M1   134456
 

Definition at line 168 of file Definitions.h.

#define ESG_MAXFLOAT   MAXDOUBLE
 

Definition at line 77 of file Definitions.h.

#define ESG_MINFLOAT   -MAXDOUBLE
 

Definition at line 78 of file Definitions.h.

#define ESG_RM1   1.0/ESG_M1
 

Definition at line 171 of file Definitions.h.

#define IS_INSTANCE_OF a,
 )     (typeid(a) == typeid(b))
 

Definition at line 114 of file Definitions.h.

Referenced by POVRayExporter::_process_leaf().

#define MAX_VEC_VALUE   MAXFLOAT
 

Definition at line 80 of file Definitions.h.

Referenced by BVList::_build_area_table(), BVList::_comp_handle(), and Mesh::getActPlaneCentroid().

#define MAXDOUBLE   DBL_MAX
 

Definition at line 26 of file Definitions.h.

Referenced by FDH::_cut_line(), BVH::_dr_primitives(), OSGAdapter::distance(), Hemisphere::distance(), FDH::distance(), Cylinder::distance(), BVH::distance(), Surface::radius(), Polygon::radius(), NurbsSurface::radius(), Hemisphere::radius(), FDH::radius(), and Cylinder::rayIntersection().

#define MAXFLOAT   FLT_MAX
 

Definition at line 25 of file Definitions.h.

Referenced by BVList::_comp_handle(), FDH14DistRot::_distance(), FDH::_mesh(), FDH::_rotate(), FDH::_rotateX(), FDH::_rotateY(), FDH::_rotateZ(), FDH::_transform(), FDH14DistRot::distance(), BVDistRot::distance(), Polygon::extent(), NurbsSurface::extent(), ExtentExplorer::ExtentExplorer(), FDH::FDH(), NExtentsExplorer::NExtentsExplorer(), Point3D::rayIntersection(), FDH::rayIntersection(), and Sphere::Sphere().

#define MAXUNSIGNED   UINT_MAX
 

Definition at line 84 of file Definitions.h.

Referenced by BVList::_index_with_max_variation(), BVList::_split_by_variation(), and BVList::split().

#define MIN_VEC_VALUE   -MAXFLOAT
 

Definition at line 81 of file Definitions.h.

Referenced by BVList::_build_area_table().

#define MINDOUBLE   DBL_MIN
 

Definition at line 27 of file Definitions.h.

Referenced by Polygon::distance(), and Mesh::getActPlaneArea().

#define MINUNSIGNED   UINT_MIN
 

Definition at line 87 of file Definitions.h.

#define PI   M_PI
 

Definition at line 91 of file Definitions.h.

Referenced by PhongBRDF::albedo(), LambertianBRDF::albedo(), LightMap::getMapCoords(), Sphere::mapToUV(), Sphere::rayIntersection(), Hemisphere::rayIntersection(), Hemisphere::samplePriorToPoweredZenith(), Hemisphere::samplePriorToPoweredZenith2D(), Hemisphere::samplePriorToZenith(), Hemisphere::samplePriorToZenith2D(), Hemisphere::sampleUniformly(), and Hemisphere::sampleUniformly2D().


Generated on Wed Jun 28 12:24:32 2006 for esg by  doxygen 1.4.6