OSGAdapter Class Reference

#include <OSGAdapter.h>

List of all members.

Public Types

enum  bvType { BV_FDH14, BV_AABB, BV_SPHERE }

Public Member Functions

 OSGAdapter (osg::Geometry *, unsigned, unsigned, BVList::SplitStrategy, bvType)
 OSGAdapter (AutoPtr< Geometry > *, unsigned, unsigned, BVList::SplitStrategy, bvType)
 OSGAdapter (Geometry *, unsigned, unsigned, BVList::SplitStrategy, bvType)
virtual ~OSGAdapter ()
double * getVertices (Matrix4 *, unsigned *)
double distance (Matrix4 *, OSGAdapter &, Matrix4 *, BVH::Node **, BVH::Node **, Vector3 *pDir=NULL, unsigned d1=UINT_MAX, unsigned d2=UINT_MAX)
bool separation (Matrix4 *, OSGAdapter &, Matrix4 *, Vector3 *pDir=NULL, unsigned d1=UINT_MAX, unsigned d2=UINT_MAX)
Geometry ** collision (Matrix4 *, float, float, float, float, int *)
PointEnvrayIntersection (const Matrix4 *pTrMat, const Vector3 &origin, const Vector3 &direction, int mask=(ENV_WANT_INTERSECTION|ENV_WANT_NORMAL|ENV_WANT_TRANSFORMATION), float maxDist=FLT_MAX)
Interval extent (const Matrix4 *pTrMat, const Vector3 &direction)
IntervalnExtents (const Matrix4 *pTrMat, const Vector3 *directions, unsigned nDirs)

Protected Member Functions

void _put_polygon (osg::Geometry::PrimitiveSetList *, osg::Vec3Array *, osg::Vec3Array *, osg::Geometry::AttributeBinding)

Protected Attributes

Group_pGroupNode


Detailed Description

This class is used for integration of the ESG with the OSG library. OSGAdapter contains methods that define interface for available oprations over the OSG library. Most of these methods are just abbreviations for the concept of explorers, i.e.. methods like rayIntersection() just instantiate appropriate explorer internaly and then returns the explorer's results.

Definition at line 30 of file OSGAdapter.h.


Member Enumeration Documentation

enum bvType
 

Supported types of bounding volumes

Enumerator:
BV_FDH14 
BV_AABB 
BV_SPHERE 

Definition at line 43 of file OSGAdapter.h.


Constructor & Destructor Documentation

OSGAdapter osg::Geometry ,
unsigned  ,
unsigned  ,
BVList::SplitStrategy  ,
bvType 
 

Definition at line 128 of file OSGAdapter.cc.

References OSGAdapter::_pGroupNode, OSGAdapter::_put_polygon(), Group::build(), OSGAdapter::BV_AABB, OSGAdapter::BV_FDH14, and OSGAdapter::BV_SPHERE.

OSGAdapter AutoPtr< Geometry > *  ,
unsigned  ,
unsigned  ,
BVList::SplitStrategy  ,
bvType 
 

Definition at line 187 of file OSGAdapter.cc.

References OSGAdapter::_pGroupNode, Group::append(), Group::build(), OSGAdapter::BV_AABB, OSGAdapter::BV_FDH14, OSGAdapter::BV_SPHERE, and SceneGraphObject::setSharedGeometry().

OSGAdapter Geometry ,
unsigned  ,
unsigned  ,
BVList::SplitStrategy  ,
bvType 
 

Definition at line 163 of file OSGAdapter.cc.

References OSGAdapter::_pGroupNode, Group::append(), Group::build(), OSGAdapter::BV_AABB, OSGAdapter::BV_FDH14, OSGAdapter::BV_SPHERE, and SceneGraphObject::setPrivateGeometry().

virtual ~OSGAdapter  )  [inline, virtual]
 

Definition at line 66 of file OSGAdapter.h.


Member Function Documentation

void _put_polygon osg::Geometry::PrimitiveSetList *  ,
osg::Vec3Array *  ,
osg::Vec3Array *  ,
osg::Geometry::AttributeBinding 
[protected]
 

Definition at line 8 of file OSGAdapter.cc.

Referenced by OSGAdapter::OSGAdapter().

Geometry ** collision Matrix4 ,
float  ,
float  ,
float  ,
float  ,
int * 
 

Definition at line 282 of file OSGAdapter.cc.

References OSGAdapter::_pGroupNode, BVH::collision(), and Group::getRepository().

double distance Matrix4 ,
OSGAdapter ,
Matrix4 ,
BVH::Node **  ,
BVH::Node **  ,
Vector3 pDir = NULL,
unsigned  d1 = UINT_MAX,
unsigned  d2 = UINT_MAX
 

Definition at line 250 of file OSGAdapter.cc.

References OSGAdapter::_pGroupNode, BVH::distance(), Group::getRepository(), and MAXDOUBLE.

Interval extent const Matrix4 pTrMat,
const Vector3 direction
 

Definition at line 322 of file OSGAdapter.cc.

References OSGAdapter::_pGroupNode, Explorer::explore(), ExtentExplorer::result(), SceneGraphObject::setPrivateTransformation(), and esg::Transform.

double * getVertices Matrix4 ,
unsigned * 
 

Definition at line 211 of file OSGAdapter.cc.

References OSGAdapter::_pGroupNode, List::append(), BVH::createIterator(), IteratorSDS::firstChild(), List::firstItem(), Group::getRepository(), OSGPolygon::getVertex(), IteratorSDS::initChildrenSearch(), List::length(), IteratorSDS::nextChild(), and List::nextItem().

Interval * nExtents const Matrix4 pTrMat,
const Vector3 directions,
unsigned  nDirs
 

Definition at line 330 of file OSGAdapter.cc.

References OSGAdapter::_pGroupNode, Explorer::explore(), NExtentsExplorer::result(), SceneGraphObject::setPrivateTransformation(), and esg::Transform.

PointEnv * rayIntersection const Matrix4 pTrMat,
const Vector3 origin,
const Vector3 direction,
int  mask = (ENV_WANT_INTERSECTION|ENV_WANT_NORMAL|ENV_WANT_TRANSFORMATION),
float  maxDist = FLT_MAX
 

Definition at line 289 of file OSGAdapter.cc.

References OSGAdapter::_pGroupNode, ENV_HAVE_ASOC_PRIMITIVE, ENV_HAVE_INTERSECTION, ENV_HAVE_NORMAL, ENV_HAVE_TRANSFORMATION, RayIntExplorer::explore(), Intersector::init(), PointEnv::intersection, PointEnv::mask, PointEnv::normal, RayIntExplorer::result(), SceneGraphObject::setPrivateTransformation(), and esg::Transform.

bool separation Matrix4 ,
OSGAdapter ,
Matrix4 ,
Vector3 pDir = NULL,
unsigned  d1 = UINT_MAX,
unsigned  d2 = UINT_MAX
 

Definition at line 267 of file OSGAdapter.cc.

References OSGAdapter::_pGroupNode, Group::getRepository(), and BVH::separation().


Member Data Documentation

Group* _pGroupNode [protected]
 

Definition at line 32 of file OSGAdapter.h.

Referenced by OSGAdapter::collision(), OSGAdapter::distance(), OSGAdapter::extent(), OSGAdapter::getVertices(), OSGAdapter::nExtents(), OSGAdapter::OSGAdapter(), OSGAdapter::rayIntersection(), and OSGAdapter::separation().


The documentation for this class was generated from the following files:
Generated on Wed Jun 28 12:24:35 2006 for esg by  doxygen 1.4.6