|
|
|
indexedOctree Class Template ReferenceInheritance diagram for indexedOctree:![]() ![]() Detailed Descriptiontemplate<class Type>
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Public Types | |
| enum | volumeType { UNKNOWN = 0, MIXED = 1, INSIDE = 2, OUTSIDE = 3 } |
| volume types More... | |
Public Member Functions | |
| indexedOctree (const Type &shapes) | |
| Construct null. | |
| indexedOctree (const Type &shapes, const List< node > &nodes, const labelListList &contents) | |
| Construct from components. | |
| indexedOctree (const Type &shapes, const treeBoundBox &bb, const label maxLevels, const scalar maxLeafRatio, const scalar maxDuplicity) | |
| Construct from shapes. | |
| indexedOctree (const Type &shapes, Istream &is) | |
| Construct from Istream. | |
| const Type & | shapes () const |
| Reference to shape. | |
| const List< node > & | nodes () const |
| List of all nodes. | |
| const labelListList & | contents () const |
| List of all contents (referenced by those nodes that are. | |
| const treeBoundBox & | bb () const |
| Top bounding box. | |
| pointIndexHit | findNearest (const point &sample, const scalar nearestDistSqr) const |
| Calculate nearest point on nearest shape. Returns. | |
| void | findNearest (const label nodeI, const point &, scalar &nearestDistSqr, label &nearestShapeI, point &nearestPoint) const |
| Low level: calculate nearest starting from subnode. | |
| pointIndexHit | findNearest (const linePointRef &ln, treeBoundBox &tightest, point &linePoint) const |
| Find nearest to line. 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. | |
| labelList | findBox (const boundBox &bb) const |
| Find (in no particular order) indices of all shapes inside or. | |
| labelBits | findNode (const label nodeI, const point &) const |
| Find deepest node (as parent+octant) containing point. Starts. | |
| volumeType | getVolumeType (const point &) const |
| Determine type (inside/outside/mixed) for point. unknown if. | |
| void | print (prefixOSstream &, const bool printContents, const label) const |
| Print tree. Either print all indices (printContent = true) or. | |
| bool | write (Ostream &os) const |
Static Public Member Functions | |
| static bool | isContent (const labelBits i) |
| static bool | isEmpty (const labelBits i) |
| static bool | isNode (const labelBits i) |
| static label | getContent (const labelBits i) |
| static label | getNode (const labelBits i) |
| static direction | getOctant (const labelBits i) |
| static bool | intersects (const point &bbMin, const point &bbMax, const scalar nearestDistSqr, const point &sample) |
| Helper: does bb intersect a sphere around sample? Or is any. | |
Friends | |
| Ostream & | operator (Ostream &, const indexedOctree< Type > &) |
Classes | |
| class | node |
| enum volumeType |
| indexedOctree | ( | const Type & | shapes | ) |
Construct null.
| indexedOctree | ( | const Type & | shapes, | |
| const List< node > & | nodes, | |||
| const labelListList & | contents | |||
| ) |
Construct from components.
| indexedOctree | ( | const Type & | shapes, | |
| const treeBoundBox & | bb, | |||
| const label | maxLevels, | |||
| const scalar | maxLeafRatio, | |||
| const scalar | maxDuplicity | |||
| ) |
Construct from shapes.
| indexedOctree | ( | const Type & | shapes, | |
| Istream & | is | |||
| ) |
Construct from Istream.
| const Type& shapes | ( | ) | const [inline] |
| const labelListList& contents | ( | ) | const [inline] |
List of all contents (referenced by those nodes that are.
contents)
Definition at line 379 of file indexedOctree.H.
| const treeBoundBox& bb | ( | ) | const [inline] |
| static bool isContent | ( | const labelBits | i | ) | [inline, static] |
Definition at line 398 of file indexedOctree.H.
| static bool isEmpty | ( | const labelBits | i | ) | [inline, static] |
Definition at line 403 of file indexedOctree.H.
| static bool isNode | ( | const labelBits | i | ) | [inline, static] |
Definition at line 408 of file indexedOctree.H.
Referenced by indexedOctree< Foam::treeDataTriSurface >::isEmpty().
Here is the caller graph for this function:

Definition at line 413 of file indexedOctree.H.
Definition at line 423 of file indexedOctree.H.
Definition at line 433 of file indexedOctree.H.
| pointIndexHit findNearest | ( | const point & | sample, | |
| const scalar | nearestDistSqr | |||
| ) | const |
Calculate nearest point on nearest shape. Returns.
| void findNearest | ( | const label | nodeI, | |
| const point & | , | |||
| scalar & | nearestDistSqr, | |||
| label & | nearestShapeI, | |||
| point & | nearestPoint | |||
| ) | const |
Low level: calculate nearest starting from subnode.
| pointIndexHit findNearest | ( | const linePointRef & | ln, | |
| treeBoundBox & | tightest, | |||
| point & | linePoint | |||
| ) | const |
Find nearest to line. 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.
Find (in no particular order) indices of all shapes inside or.
overlapping bounding box (i.e. all shapes not outside box)
Find deepest node (as parent+octant) containing point. Starts.
off from starting index in nodes_ (use 0 to start from top) Use getNode, getOctant to extract info.
| volumeType getVolumeType | ( | const point & | ) | const |
Determine type (inside/outside/mixed) for point. unknown if.
cannot be determined (e.g. non-manifold surface)
| static bool intersects | ( | const point & | bbMin, | |
| const point & | bbMax, | |||
| const scalar | nearestDistSqr, | |||
| const point & | sample | |||
| ) | [static] |
Helper: does bb intersect a sphere around sample? Or is any.
corner point of bb closer than nearestDistSqr to sample.
| void print | ( | prefixOSstream & | , | |
| const bool | printContents, | |||
| const | label | |||
| ) | const |
Print tree. Either print all indices (printContent = true) or.
just size of contents nodes.
| bool write | ( | Ostream & | os | ) | const |
| Ostream& operator | ( | Ostream & | , | |
| const indexedOctree< Type > & | ||||
| ) | [friend] |