library of assembled shared sources

http://lass.cocamware.com

lass::spat::DefaultObjectTraits< ObjectType, AabbType, RayType, ObjectIterator > Class Template Reference

default traits for objects to be stored in spatial subdivision trees More...

#include <default_object_traits.h>

Inheritance diagram for lass::spat::DefaultObjectTraits< ObjectType, AabbType, RayType, ObjectIterator >:

Inheritance graph
[legend]
Collaboration diagram for lass::spat::DefaultObjectTraits< ObjectType, AabbType, RayType, ObjectIterator >:

Collaboration graph
[legend]

Public Types

typedef ObjectType TObject
 type of nD object
typedef ObjectIterator TObjectIterator
 iterator to object
typedef const TObjectTObjectReference
 const reference to object
typedef void TInfo
 extra info for contain/intersect operations
typedef DefaultAabbRayTraits
< AabbType, RayType >::TAabb 
TAabb
 an nD AABB
typedef DefaultAabbRayTraits
< AabbType, RayType >::TRay 
TRay
 an nD Ray
typedef DefaultAabbRayTraits
< AabbType, RayType >::TPoint 
TPoint
 an nD point
typedef DefaultAabbRayTraits
< AabbType, RayType >::TVector 
TVector
 an nD vector
typedef DefaultAabbRayTraits
< AabbType, RayType >::TValue 
TValue
 numerical type used in TPoint and TVector
typedef DefaultAabbRayTraits
< AabbType, RayType >::TParam 
TParam
 best type for function parameters of TValue
typedef DefaultAabbRayTraits
< AabbType, RayType >
::TReference 
TReference
 reference to TValue
typedef DefaultAabbRayTraits
< AabbType, RayType >
::TConstReference 
TConstReference
 const reference to TValue
enum  { dimension = TAabb::dimension }

Static Public Member Functions

static TObjectReference object (TObjectIterator it)
 return reference to object
static const TAabb objectAabb (TObjectIterator it)
 return the AABB of an object
static const bool objectContains (TObjectIterator it, const TPoint &point, const TInfo *)
 return true if object contains a point, return false otherwise
static const bool objectIntersect (TObjectIterator it, const TRay &ray, TReference t, TParam tMin, const TInfo *)
 return true if object is intersected by ray
static const bool objectIntersects (TObjectIterator it, const TRay &ray, TParam tMin, TParam tMax, const TInfo *)
 return true if object is intersected by ray
static const bool objectOverlaps (TObjectIterator it, const TAabb &aabb)
 return true if part of the object is inside the bounding box
static const TValue objectSquaredDistance (TObjectIterator it, const TPoint &point, const TInfo *)
 return squared distance between object and point)
static const TAabb aabbEmpty ()
 return empty AABB
static const bool aabbContains (const TAabb &aabb, const TPoint &point)
 return true if AABB contains a point, return false otherwise
static const bool aabbContains (const TAabb &aabb, const TAabb &other)
static const bool aabbIntersect (const TAabb &aabb, const TRay &ray, TReference t, const TParam tMin)
 return true if AABB is intersected by ray
static const TAabb aabbJoin (const TAabb &a, const TAabb &b)
 join two AABBs and return the result
static const TPoint aabbMin (const TAabb &aabb)
 return the minimum corner of the AABB
static const TPoint aabbMax (const TAabb &aabb)
 return the maximum corner of the AABB
static const TPoint raySupport (const TRay &ray)
 return the support point of the ray
static const TVector rayDirection (const TRay &ray)
 return the direction vector of the ray
static const TValue coord (const TPoint &point, size_t axis)
 return the axis coordinate value of point.
static void coord (TPoint &point, size_t axis, TParam value)
 set the axis coordinate value of point.
static const TValue coord (const TVector &vector, size_t axis)
 return the axis component value of vector.
static void coord (TVector &vector, size_t axis, TParam value)
 set the axis component value of vector.
static const TVector vectorReciprocal (const TVector &vector)
 return the reciprocal vector of vector

Detailed Description

template<typename ObjectType, typename AabbType = typename ObjectType::TAabb, typename RayType = typename ObjectType::TRay, typename ObjectIterator = const ObjectType*>
class lass::spat::DefaultObjectTraits< ObjectType, AabbType, RayType, ObjectIterator >

default traits for objects to be stored in spatial subdivision trees

Author:
Bram de Greve [BdG]

Definition at line 195 of file default_object_traits.h.


Member Typedef Documentation

template<typename ObjectType , typename AabbType = typename ObjectType::TAabb, typename RayType = typename ObjectType::TRay, typename ObjectIterator = const ObjectType*>
typedef ObjectType lass::spat::DefaultObjectTraits< ObjectType, AabbType, RayType, ObjectIterator >::TObject

type of nD object

Definition at line 197 of file default_object_traits.h.

template<typename ObjectType , typename AabbType = typename ObjectType::TAabb, typename RayType = typename ObjectType::TRay, typename ObjectIterator = const ObjectType*>
typedef ObjectIterator lass::spat::DefaultObjectTraits< ObjectType, AabbType, RayType, ObjectIterator >::TObjectIterator

iterator to object

Definition at line 198 of file default_object_traits.h.

template<typename ObjectType , typename AabbType = typename ObjectType::TAabb, typename RayType = typename ObjectType::TRay, typename ObjectIterator = const ObjectType*>
typedef const TObject& lass::spat::DefaultObjectTraits< ObjectType, AabbType, RayType, ObjectIterator >::TObjectReference

const reference to object

Definition at line 199 of file default_object_traits.h.

template<typename ObjectType , typename AabbType = typename ObjectType::TAabb, typename RayType = typename ObjectType::TRay, typename ObjectIterator = const ObjectType*>
typedef void lass::spat::DefaultObjectTraits< ObjectType, AabbType, RayType, ObjectIterator >::TInfo

extra info for contain/intersect operations

Definition at line 200 of file default_object_traits.h.

template<typename ObjectType , typename AabbType = typename ObjectType::TAabb, typename RayType = typename ObjectType::TRay, typename ObjectIterator = const ObjectType*>
typedef DefaultAabbRayTraits<AabbType, RayType>::TAabb lass::spat::DefaultObjectTraits< ObjectType, AabbType, RayType, ObjectIterator >::TAabb

an nD AABB

Reimplemented from lass::spat::DefaultAabbRayTraits< AabbType, RayType >.

Definition at line 202 of file default_object_traits.h.

template<typename ObjectType , typename AabbType = typename ObjectType::TAabb, typename RayType = typename ObjectType::TRay, typename ObjectIterator = const ObjectType*>
typedef DefaultAabbRayTraits<AabbType, RayType>::TRay lass::spat::DefaultObjectTraits< ObjectType, AabbType, RayType, ObjectIterator >::TRay

an nD Ray

Reimplemented from lass::spat::DefaultAabbRayTraits< AabbType, RayType >.

Definition at line 203 of file default_object_traits.h.

template<typename ObjectType , typename AabbType = typename ObjectType::TAabb, typename RayType = typename ObjectType::TRay, typename ObjectIterator = const ObjectType*>
typedef DefaultAabbRayTraits<AabbType, RayType>::TPoint lass::spat::DefaultObjectTraits< ObjectType, AabbType, RayType, ObjectIterator >::TPoint

an nD point

Reimplemented from lass::spat::DefaultAabbRayTraits< AabbType, RayType >.

Definition at line 204 of file default_object_traits.h.

template<typename ObjectType , typename AabbType = typename ObjectType::TAabb, typename RayType = typename ObjectType::TRay, typename ObjectIterator = const ObjectType*>
typedef DefaultAabbRayTraits<AabbType, RayType>::TVector lass::spat::DefaultObjectTraits< ObjectType, AabbType, RayType, ObjectIterator >::TVector

an nD vector

Reimplemented from lass::spat::DefaultAabbRayTraits< AabbType, RayType >.

Definition at line 205 of file default_object_traits.h.

template<typename ObjectType , typename AabbType = typename ObjectType::TAabb, typename RayType = typename ObjectType::TRay, typename ObjectIterator = const ObjectType*>
typedef DefaultAabbRayTraits<AabbType, RayType>::TValue lass::spat::DefaultObjectTraits< ObjectType, AabbType, RayType, ObjectIterator >::TValue

numerical type used in TPoint and TVector

Reimplemented from lass::spat::DefaultAabbRayTraits< AabbType, RayType >.

Definition at line 206 of file default_object_traits.h.

template<typename ObjectType , typename AabbType = typename ObjectType::TAabb, typename RayType = typename ObjectType::TRay, typename ObjectIterator = const ObjectType*>
typedef DefaultAabbRayTraits<AabbType, RayType>::TParam lass::spat::DefaultObjectTraits< ObjectType, AabbType, RayType, ObjectIterator >::TParam

best type for function parameters of TValue

Reimplemented from lass::spat::DefaultAabbRayTraits< AabbType, RayType >.

Definition at line 207 of file default_object_traits.h.

template<typename ObjectType , typename AabbType = typename ObjectType::TAabb, typename RayType = typename ObjectType::TRay, typename ObjectIterator = const ObjectType*>
typedef DefaultAabbRayTraits<AabbType, RayType>::TReference lass::spat::DefaultObjectTraits< ObjectType, AabbType, RayType, ObjectIterator >::TReference

reference to TValue

Reimplemented from lass::spat::DefaultAabbRayTraits< AabbType, RayType >.

Definition at line 208 of file default_object_traits.h.

template<typename ObjectType , typename AabbType = typename ObjectType::TAabb, typename RayType = typename ObjectType::TRay, typename ObjectIterator = const ObjectType*>
typedef DefaultAabbRayTraits<AabbType, RayType>::TConstReference lass::spat::DefaultObjectTraits< ObjectType, AabbType, RayType, ObjectIterator >::TConstReference

const reference to TValue

Reimplemented from lass::spat::DefaultAabbRayTraits< AabbType, RayType >.

Definition at line 209 of file default_object_traits.h.


Member Enumeration Documentation

template<typename AabbType , typename RayType >
anonymous enum [inherited]

Enumerator:
dimension 

Definition at line 78 of file default_object_traits.h.


Member Function Documentation

template<typename ObjectType , typename AabbType = typename ObjectType::TAabb, typename RayType = typename ObjectType::TRay, typename ObjectIterator = const ObjectType*>
static TObjectReference lass::spat::DefaultObjectTraits< ObjectType, AabbType, RayType, ObjectIterator >::object ( TObjectIterator  it  )  [inline, static]

template<typename ObjectType , typename AabbType = typename ObjectType::TAabb, typename RayType = typename ObjectType::TRay, typename ObjectIterator = const ObjectType*>
static const TAabb lass::spat::DefaultObjectTraits< ObjectType, AabbType, RayType, ObjectIterator >::objectAabb ( TObjectIterator  it  )  [inline, static]

return the AABB of an object

Definition at line 220 of file default_object_traits.h.

References lass::prim::aabb().

template<typename ObjectType , typename AabbType = typename ObjectType::TAabb, typename RayType = typename ObjectType::TRay, typename ObjectIterator = const ObjectType*>
static const bool lass::spat::DefaultObjectTraits< ObjectType, AabbType, RayType, ObjectIterator >::objectContains ( TObjectIterator  it,
const TPoint point,
const TInfo  
) [inline, static]

return true if object contains a point, return false otherwise

Definition at line 227 of file default_object_traits.h.

References lass::spat::DefaultObjectTraits< ObjectType, AabbType, RayType, ObjectIterator >::object().

template<typename ObjectType , typename AabbType = typename ObjectType::TAabb, typename RayType = typename ObjectType::TRay, typename ObjectIterator = const ObjectType*>
static const bool lass::spat::DefaultObjectTraits< ObjectType, AabbType, RayType, ObjectIterator >::objectIntersect ( TObjectIterator  it,
const TRay ray,
TReference  t,
TParam  tMin,
const TInfo  
) [inline, static]

return true if object is intersected by ray

Definition at line 234 of file default_object_traits.h.

References lass::prim::intersect(), and lass::prim::rNone.

template<typename ObjectType , typename AabbType = typename ObjectType::TAabb, typename RayType = typename ObjectType::TRay, typename ObjectIterator = const ObjectType*>
static const bool lass::spat::DefaultObjectTraits< ObjectType, AabbType, RayType, ObjectIterator >::objectIntersects ( TObjectIterator  it,
const TRay ray,
TParam  tMin,
TParam  tMax,
const TInfo  
) [inline, static]

return true if object is intersected by ray

Definition at line 241 of file default_object_traits.h.

References lass::prim::intersect(), and lass::prim::rNone.

template<typename ObjectType , typename AabbType = typename ObjectType::TAabb, typename RayType = typename ObjectType::TRay, typename ObjectIterator = const ObjectType*>
static const bool lass::spat::DefaultObjectTraits< ObjectType, AabbType, RayType, ObjectIterator >::objectOverlaps ( TObjectIterator  it,
const TAabb aabb 
) [inline, static]

return true if part of the object is inside the bounding box

Definition at line 249 of file default_object_traits.h.

References lass::prim::intersects().

template<typename ObjectType , typename AabbType = typename ObjectType::TAabb, typename RayType = typename ObjectType::TRay, typename ObjectIterator = const ObjectType*>
static const TValue lass::spat::DefaultObjectTraits< ObjectType, AabbType, RayType, ObjectIterator >::objectSquaredDistance ( TObjectIterator  it,
const TPoint point,
const TInfo  
) [inline, static]

return squared distance between object and point)

Definition at line 256 of file default_object_traits.h.

References lass::prim::squaredDistance().

template<typename AabbType , typename RayType >
static const TAabb lass::spat::DefaultAabbRayTraits< AabbType, RayType >::aabbEmpty (  )  [inline, static, inherited]

return empty AABB

Definition at line 84 of file default_object_traits.h.

template<typename AabbType , typename RayType >
static const bool lass::spat::DefaultAabbRayTraits< AabbType, RayType >::aabbContains ( const TAabb aabb,
const TPoint point 
) [inline, static, inherited]

return true if AABB contains a point, return false otherwise

Definition at line 91 of file default_object_traits.h.

template<typename AabbType , typename RayType >
static const bool lass::spat::DefaultAabbRayTraits< AabbType, RayType >::aabbContains ( const TAabb aabb,
const TAabb other 
) [inline, static, inherited]

Definition at line 96 of file default_object_traits.h.

template<typename AabbType , typename RayType >
static const bool lass::spat::DefaultAabbRayTraits< AabbType, RayType >::aabbIntersect ( const TAabb aabb,
const TRay ray,
TReference  t,
const TParam  tMin 
) [inline, static, inherited]

return true if AABB is intersected by ray

Definition at line 103 of file default_object_traits.h.

template<typename AabbType , typename RayType >
static const TAabb lass::spat::DefaultAabbRayTraits< AabbType, RayType >::aabbJoin ( const TAabb a,
const TAabb b 
) [inline, static, inherited]

join two AABBs and return the result

Definition at line 110 of file default_object_traits.h.

template<typename AabbType , typename RayType >
static const TPoint lass::spat::DefaultAabbRayTraits< AabbType, RayType >::aabbMin ( const TAabb aabb  )  [inline, static, inherited]

return the minimum corner of the AABB

Definition at line 117 of file default_object_traits.h.

template<typename AabbType , typename RayType >
static const TPoint lass::spat::DefaultAabbRayTraits< AabbType, RayType >::aabbMax ( const TAabb aabb  )  [inline, static, inherited]

return the maximum corner of the AABB

Definition at line 124 of file default_object_traits.h.

template<typename AabbType , typename RayType >
static const TPoint lass::spat::DefaultAabbRayTraits< AabbType, RayType >::raySupport ( const TRay ray  )  [inline, static, inherited]

return the support point of the ray

Definition at line 134 of file default_object_traits.h.

template<typename AabbType , typename RayType >
static const TVector lass::spat::DefaultAabbRayTraits< AabbType, RayType >::rayDirection ( const TRay ray  )  [inline, static, inherited]

return the direction vector of the ray

Definition at line 141 of file default_object_traits.h.

template<typename AabbType , typename RayType >
static const TValue lass::spat::DefaultAabbRayTraits< AabbType, RayType >::coord ( const TPoint point,
size_t  axis 
) [inline, static, inherited]

return the axis coordinate value of point.

Definition at line 152 of file default_object_traits.h.

template<typename AabbType , typename RayType >
static void lass::spat::DefaultAabbRayTraits< AabbType, RayType >::coord ( TPoint point,
size_t  axis,
TParam  value 
) [inline, static, inherited]

set the axis coordinate value of point.

Definition at line 159 of file default_object_traits.h.

template<typename AabbType , typename RayType >
static const TValue lass::spat::DefaultAabbRayTraits< AabbType, RayType >::coord ( const TVector vector,
size_t  axis 
) [inline, static, inherited]

return the axis component value of vector.

Definition at line 166 of file default_object_traits.h.

template<typename AabbType , typename RayType >
static void lass::spat::DefaultAabbRayTraits< AabbType, RayType >::coord ( TVector vector,
size_t  axis,
TParam  value 
) [inline, static, inherited]

set the axis component value of vector.

Definition at line 173 of file default_object_traits.h.

template<typename AabbType , typename RayType >
static const TVector lass::spat::DefaultAabbRayTraits< AabbType, RayType >::vectorReciprocal ( const TVector vector  )  [inline, static, inherited]

return the reciprocal vector of vector

Definition at line 180 of file default_object_traits.h.


The documentation for this class was generated from the following file:

Generated on Mon Nov 10 14:22:15 2008 for Library of Assembled Shared Sources by doxygen 1.5.7.1
SourceForge.net Logo