OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

searchableBox Class Reference

Searching on bounding box. More...

Inheritance diagram for searchableBox:
Collaboration diagram for searchableBox:

List of all members.


Public Member Functions

 TypeName ("searchableBox")
 Runtime type information.
 searchableBox (const IOobject &io, const treeBoundBox &bb)
 Construct from components.
 searchableBox (const IOobject &io, const dictionary &dict)
 Construct from dictionary (used by searchableSurface).
virtual ~searchableBox ()
virtual const wordList & regions () const
 Names of regions.
virtual bool hasVolumeType () const
 Whether supports volume type below.
virtual label size () const
 Range of local indices that can be returned.
pointIndexHit findNearest (const point &sample, const scalar nearestDistSqr) const
 Calculate nearest point on surface. Returns.
pointIndexHit findNearestOnEdge (const point &sample, const scalar nearestDistSqr) const
 Calculate nearest point on edge. Returns.
pointIndexHit findNearest (const linePointRef &ln, treeBoundBox &tightest, point &linePoint) const
 Find nearest to segment. Returns.
pointIndexHit findLine (const point &start, const point &end) const
 Find nearest intersection of line between start and end.
pointIndexHit findLineAny (const point &start, const point &end) const
 Find any intersection of line between start and end.
virtual void findNearest (const pointField &sample, const scalarField &nearestDistSqr, List< pointIndexHit > &) const
virtual void findLine (const pointField &start, const pointField &end, List< pointIndexHit > &) const
 Find first intersection on segment from start to end.
virtual void findLineAny (const pointField &start, const pointField &end, List< pointIndexHit > &) const
 Return any intersection on segment from start to end.
virtual void findLineAll (const pointField &start, const pointField &end, List< List< pointIndexHit > > &) const
 Get all intersections in order from start to end.
virtual void getRegion (const List< pointIndexHit > &, labelList &region) const
 From a set of points and indices get the region.
virtual void getNormal (const List< pointIndexHit > &, vectorField &normal) const
 From a set of points and indices get the normal.
virtual void getVolumeType (const pointField &, List< volumeType > &) const
 Determine type (inside/outside/mixed) for point. unknown if.
bool writeData (Ostream &) const
 Pure virtual writaData function.

Detailed Description

Searching on bounding box.

Source files

Definition at line 47 of file searchableBox.H.


Constructor & Destructor Documentation

searchableBox ( const IOobject &  io,
const treeBoundBox &  bb 
)

Construct from components.

Definition at line 157 of file searchableBox.C.

searchableBox ( const IOobject &  io,
const dictionary &  dict 
)

Construct from dictionary (used by searchableSurface).

Definition at line 181 of file searchableBox.C.

~searchableBox (  )  [virtual]

Definition at line 206 of file searchableBox.C.


Member Function Documentation

TypeName ( "searchableBox"   ) 

Runtime type information.

const Foam::wordList & regions (  )  const [virtual]

Names of regions.

Implements searchableSurface.

Definition at line 212 of file searchableBox.C.

virtual bool hasVolumeType (  )  const [inline, virtual]

Whether supports volume type below.

Implements searchableSurface.

Definition at line 113 of file searchableBox.H.

virtual label size (  )  const [inline, virtual]

Range of local indices that can be returned.

Implements searchableSurface.

Definition at line 119 of file searchableBox.H.

Foam::pointIndexHit findNearest ( const point &  sample,
const scalar  nearestDistSqr 
) const

Calculate nearest point on surface. Returns.

  • bool : any point found nearer than nearestDistSqr
  • label: relevant index in surface (=face 0..5)
  • point: actual nearest point found

Definition at line 224 of file searchableBox.C.

Foam::pointIndexHit findNearestOnEdge ( const point &  sample,
const scalar  nearestDistSqr 
) const

Calculate nearest point on edge. Returns.

  • bool : any point found nearer than nearestDistSqr
  • label: relevant index in surface(=?)
  • point: actual nearest point found

Definition at line 234 of file searchableBox.C.

References boundBox::midpoint().

Here is the call graph for this function:

Foam::pointIndexHit findNearest ( const linePointRef &  ln,
treeBoundBox &  tightest,
point &  linePoint 
) const

Find nearest to segment. Returns.

  • bool : any point found?
  • label: relevant index in shapes (=face 0..5)
  • point: actual nearest point found sets:
  • tightest : bounding box
  • linePoint : corresponding nearest point on line

Definition at line 304 of file searchableBox.C.

Foam::pointIndexHit findLine ( const point &  start,
const point &  end 
) const

Find nearest intersection of line between start and end.

Definition at line 320 of file searchableBox.C.

Referenced by searchableBox::findLineAny(), and searchableBox::findNearest().

Here is the caller graph for this function:

Foam::pointIndexHit findLineAny ( const point &  start,
const point &  end 
) const

Find any intersection of line between start and end.

Definition at line 383 of file searchableBox.C.

Referenced by searchableBox::findLineAll().

Here is the caller graph for this function:

void findNearest ( const pointField &  sample,
const scalarField &  nearestDistSqr,
List< pointIndexHit > &  info 
) const [virtual]

Implements searchableSurface.

Definition at line 393 of file searchableBox.C.

References searchableBox::findLine().

Here is the call graph for this function:

void findLine ( const pointField &  start,
const pointField &  end,
List< pointIndexHit > &   
) const [virtual]

Find first intersection on segment from start to end.

Note: searchableSurfacesQueries expects no intersection to be found if start==end. Is problem?

Implements searchableSurface.

Definition at line 411 of file searchableBox.C.

void findLineAny ( const pointField &  start,
const pointField &  end,
List< pointIndexHit > &   
) const [virtual]

Return any intersection on segment from start to end.

Implements searchableSurface.

Definition at line 427 of file searchableBox.C.

References searchableBox::findLine().

Here is the call graph for this function:

void findLineAll ( const pointField &  start,
const pointField &  end,
List< List< pointIndexHit > > &  info 
) const [virtual]

Get all intersections in order from start to end.

Implements searchableSurface.

Definition at line 443 of file searchableBox.C.

References searchableBox::findLineAny().

Here is the call graph for this function:

void getRegion ( const List< pointIndexHit > &  info,
labelList &  region 
) const [virtual]

From a set of points and indices get the region.

Implements searchableSurface.

Definition at line 511 of file searchableBox.C.

void getNormal ( const List< pointIndexHit > &  info,
vectorField &  normal 
) const [virtual]

From a set of points and indices get the normal.

Implements searchableSurface.

Definition at line 522 of file searchableBox.C.

void getVolumeType ( const pointField &  points,
List< volumeType > &  volType 
) const [virtual]

Determine type (inside/outside/mixed) for point. unknown if.

cannot be determined (e.g. non-manifold surface)

Implements searchableSurface.

Definition at line 545 of file searchableBox.C.

bool writeData ( Ostream &   )  const [inline, virtual]

Pure virtual writaData function.

Must be defined in derived types

Implements regIOobject.

Definition at line 240 of file searchableBox.H.


The documentation for this class was generated from the following files:
Copyright © 2000-2009 OpenCFD Ltd