Holds data for octree to work on list of faces on a bMesh (= PrimitivePatch which holds faces, not references them) Same as octreeDataFace except for that. More...
#include <dynamicMesh/octreeDataFaceList.H>
Holds data for octree to work on list of faces on a bMesh (= PrimitivePatch which holds faces, not references them) Same as octreeDataFace except for that.
Definition at line 58 of file octreeDataFaceList.H.
Public Member Functions | |
ClassName ("octreeDataFaceList") | |
octreeDataFaceList (const bMesh &mesh) | |
Construct from all faces in bMesh.
| |
octreeDataFaceList (const bMesh &mesh, const labelList &faceLabels) | |
Construct from selected faces in bMesh.
| |
octreeDataFaceList (const octreeDataFaceList &) | |
Construct as copy.
| |
~octreeDataFaceList () | |
const bMesh & | mesh () const |
const labelList & | faceLabels () const |
const treeBoundBoxList & | allBb () const |
label | size () const |
label | getSampleType (const octree< octreeDataFaceList > &, const point &) const |
Get type of sample.
| |
bool | overlaps (const label index, const treeBoundBox &sampleBb) const |
Does (bb of) shape at index overlap bb.
| |
bool | contains (const label index, const point &sample) const |
Does shape at index contain sample.
| |
bool | intersects (const label index, const point &start, const point &end, point &intersectionPoint) const |
Segment (from start to end) intersection with shape.
| |
bool | findTightest (const label index, const point &sample, treeBoundBox &tightest) const |
Sets newTightest to bounding box (and returns true) if.
| |
scalar | calcSign (const label index, const point &sample, vector &n) const |
Given index get unit normal and calculate (numerical) sign.
| |
scalar | calcNearest (const label index, const point &sample, point &nearest) const |
Calculates nearest (to sample) point in shape.
| |
void | write (Ostream &os, const label index) const |
Write shape at index.
|
octreeDataFaceList | ( | const bMesh & | mesh ) |
Construct from all faces in bMesh.
Definition at line 71 of file octreeDataFaceList.C.
References forAll.
octreeDataFaceList | ( | const bMesh & | mesh, |
const labelList & | faceLabels | ||
) |
Construct from selected faces in bMesh.
Definition at line 89 of file octreeDataFaceList.C.
octreeDataFaceList | ( | const octreeDataFaceList & | shapes ) |
Construct as copy.
Definition at line 105 of file octreeDataFaceList.C.
~octreeDataFaceList | ( | ) |
Definition at line 115 of file octreeDataFaceList.C.
ClassName | ( | "octreeDataFaceList" | ) |
const bMesh& mesh | ( | ) | const [inline]
|
Definition at line 117 of file octreeDataFaceList.H.
const labelList& faceLabels | ( | ) | const [inline]
|
Definition at line 122 of file octreeDataFaceList.H.
const treeBoundBoxList& allBb | ( | ) | const [inline]
|
Definition at line 127 of file octreeDataFaceList.H.
label size | ( | ) | const [inline]
|
Definition at line 132 of file octreeDataFaceList.H.
References List< T >::size().
Foam::label getSampleType | ( | const octree< octreeDataFaceList > & | oc, |
const point & | sample | ||
) | const |
Get type of sample.
Definition at line 123 of file octreeDataFaceList.C.
References Foam::abort(), face::centre(), e, edge::end(), Foam::endl(), Foam::FatalError, FatalErrorIn, octree< Type >::findNearest(), forAll, octree< Type >::getVolType(), treeBoundBox::greatBox, PointHit< Point >::hit(), PointHit< Point >::hitPoint(), Foam::mag(), PointHit< Point >::missPoint(), face::nearestPoint(), face::normal(), points, Foam::Pout, Foam::sqrt(), edge::start(), and Vector< Cmpt >::zero.
bool overlaps | ( | const label | index, |
const treeBoundBox & | sampleBb | ||
) | const |
Does (bb of) shape at index overlap bb.
Definition at line 396 of file octreeDataFaceList.C.
References treeBoundBox::overlaps().
bool contains | ( | const label | index, |
const point & | sample | ||
) | const |
Does shape at index contain sample.
Definition at line 406 of file octreeDataFaceList.C.
References notImplemented.
bool intersects | ( | const label | index, |
const point & | start, | ||
const point & | end, | ||
point & | intersectionPoint | ||
) | const |
Segment (from start to end) intersection with shape.
at index. If intersects returns true and sets intersectionPoint
Definition at line 420 of file octreeDataFaceList.C.
References PointHit< Point >::distance(), intersection::HALF_RAY, PointHit< Point >::hit(), PointHit< Point >::hitPoint(), Foam::mag(), face::ray(), intersection::setPlanarTol(), and intersection::VECTOR.
bool findTightest | ( | const label | index, |
const point & | sample, | ||
treeBoundBox & | tightest | ||
) | const |
Sets newTightest to bounding box (and returns true) if.
nearer to sample than tightest bounding box. Otherwise returns false.
Definition at line 462 of file octreeDataFaceList.C.
References treeBoundBox::calcExtremities(), dist, Foam::mag(), boundBox::max(), boundBox::min(), Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().
Given index get unit normal and calculate (numerical) sign.
of sample. Used to determine accuracy of calcNearest or inside/outside.
Definition at line 500 of file octreeDataFaceList.C.
References face::centre(), and Foam::mag().
Calculates nearest (to sample) point in shape.
Returns point and mag(nearest - sample). Returns GREAT if sample does not project onto (triangle decomposition) of face.
Definition at line 522 of file octreeDataFaceList.C.
References face::centre(), PointHit< Point >::distance(), Foam::endl(), PointHit< Point >::hit(), PointHit< Point >::hitPoint(), PointHit< Point >::missPoint(), face::nearestPoint(), Foam::Pout, and Foam::sign().
void write | ( | Ostream & | os, |
const label | index | ||
) | const |
Write shape at index.
Definition at line 563 of file octreeDataFaceList.C.