本文整理汇总了C++中pointIndexHit::hitPoint方法的典型用法代码示例。如果您正苦于以下问题:C++ pointIndexHit::hitPoint方法的具体用法?C++ pointIndexHit::hitPoint怎么用?C++ pointIndexHit::hitPoint使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pointIndexHit
的用法示例。
在下文中一共展示了pointIndexHit::hitPoint方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
bool surfaceOffsetLinearDistance::sizeLocations
(
const pointIndexHit& hitPt,
const vector& n,
pointField& shapePts,
scalarField& shapeSizes
) const
{
const Foam::point& pt = hitPt.hitPoint();
const scalar offsetCellSize =
surfaceCellSizeFunction_().interpolate(pt, hitPt.index());
if (sideMode_ == rmBothsides)
{
shapePts.resize(4);
shapeSizes.resize(4);
shapePts[0] = pt - n*surfaceOffset_;
shapeSizes[0] = offsetCellSize;
shapePts[1] = pt - n*totalDistance_;
shapeSizes[1] = distanceCellSize_;
shapePts[2] = pt + n*surfaceOffset_;
shapeSizes[2] = offsetCellSize;
shapePts[3] = pt + n*totalDistance_;
shapeSizes[3] = distanceCellSize_;
}
else if (sideMode_ == smInside)
{
shapePts.resize(2);
shapeSizes.resize(2);
shapePts[0] = pt - n*surfaceOffset_;
shapeSizes[0] = offsetCellSize;
shapePts[1] = pt - n*totalDistance_;
shapeSizes[1] = distanceCellSize_;
}
else if (sideMode_ == smOutside)
{
shapePts.resize(2);
shapeSizes.resize(2);
shapePts[0] = pt + n*surfaceOffset_;
shapeSizes[0] = offsetCellSize;
shapePts[1] = pt + n*totalDistance_;
shapeSizes[1] = distanceCellSize_;
}
return true;
}
示例2: if
bool uniformDistance::sizeLocations
(
const pointIndexHit& hitPt,
const vector& n,
pointField& shapePts,
scalarField& shapeSizes
) const
{
const Foam::point& pt = hitPt.hitPoint();
const scalar distanceCellSize =
surfaceCellSizeFunction_().interpolate(pt, hitPt.index());
if (sideMode_ == rmBothsides)
{
shapePts.resize(2);
shapeSizes.resize(2);
shapePts[0] = pt - n*distance_;
shapeSizes[0] = distanceCellSize;
shapePts[1] = pt + n*distance_;
shapeSizes[1] = distanceCellSize;
}
else if (sideMode_ == smInside)
{
shapePts.resize(1);
shapeSizes.resize(1);
shapePts[0] = pt - n*distance_;
shapeSizes[0] = distanceCellSize;
}
else if (sideMode_ == smOutside)
{
shapePts.resize(1);
shapeSizes.resize(1);
shapePts[0] = pt - n*distance_;
shapeSizes[0] = distanceCellSize;
}
return false;
}
示例3: if
bool linearDistance::sizeLocations
(
const pointIndexHit& hitPt,
const vector& n,
pointField& shapePts,
scalarField& shapeSizes
) const
{
const Foam::point& pt = hitPt.hitPoint();
if (sideMode_ == rmBothsides)
{
shapePts.resize(2);
shapeSizes.resize(2);
shapePts[0] = pt - n*distance_;
shapeSizes[0] = distanceCellSize_;
shapePts[1] = pt + n*distance_;
shapeSizes[1] = distanceCellSize_;
}
else if (sideMode_ == smInside)
{
shapePts.resize(1);
shapeSizes.resize(1);
shapePts[0] = pt - n*distance_;
shapeSizes[0] = distanceCellSize_;
}
else if (sideMode_ == smOutside)
{
shapePts.resize(1);
shapeSizes.resize(1);
shapePts[0] = pt + n*distance_;
shapeSizes[0] = distanceCellSize_;
}
return false;
}