Mantid
|
Functions | |
template<Kernel::V3D(*)(const detail::ShapeInfo &, Kernel::PseudoRandomNumberGenerator &) T> | |
boost::optional< Kernel::V3D > | bounded (const detail::ShapeInfo &shapeInfo, Kernel::PseudoRandomNumberGenerator &rng, const BoundingBox &box, size_t maxAttempts) |
Return a random point in a known shape restricted by a bounding box. More... | |
MANTID_GEOMETRY_DLL boost::optional< Kernel::V3D > | bounded (const IObject &object, Kernel::PseudoRandomNumberGenerator &rng, const BoundingBox &box, size_t maxAttempts) |
Return a random point in a generic shape limited by a bounding box. More... | |
MANTID_GEOMETRY_DLL Kernel::V3D | inCuboid (const detail::ShapeInfo &shapeInfo, Kernel::PseudoRandomNumberGenerator &rng) |
Return a random point in a cuboid shape. More... | |
MANTID_GEOMETRY_DLL Kernel::V3D | inCylinder (const detail::ShapeInfo &shapeInfo, Kernel::PseudoRandomNumberGenerator &rng) |
Return a random point in cylinder. More... | |
MANTID_GEOMETRY_DLL boost::optional< Kernel::V3D > | inGenericShape (const IObject &object, Kernel::PseudoRandomNumberGenerator &rng, size_t maxAttempts) |
Return a random point in a generic shape. More... | |
MANTID_GEOMETRY_DLL Kernel::V3D | inHollowCylinder (const detail::ShapeInfo &shapeInfo, Kernel::PseudoRandomNumberGenerator &rng) |
Return a random point in a hollow cylinder. More... | |
MANTID_GEOMETRY_DLL Kernel::V3D | inSphere (const detail::ShapeInfo &shapeInfo, Kernel::PseudoRandomNumberGenerator &rng) |
Return a random point in sphere. More... | |
MANTID_GEOMETRY_DLL Kernel::V3D | localPointInCylinder (const Kernel::V3D &basis, const Kernel::V3D &alongAxis, double polarAngle, double radialLength) |
Return a local point in a cylinder shape. More... | |
boost::optional< Kernel::V3D > Mantid::Geometry::RandomPoint::bounded | ( | const detail::ShapeInfo & | shapeInfo, |
Kernel::PseudoRandomNumberGenerator & | rng, | ||
const BoundingBox & | box, | ||
size_t | maxAttempts | ||
) |
Return a random point in a known shape restricted by a bounding box.
This could be called with one of the inCylinder
, inSphere
,... functions as the template argument.
shapeInfo | a shape info |
rng | a random number generator |
box | a restricting box |
maxAttempts | number of attempts |
Definition at line 62 of file RandomPoint.h.
References Mantid::Geometry::BoundingBox::isPointInside().
Referenced by Mantid::Geometry::CSGObject::generatePointInObject(), Mantid::Geometry::MeshObject::generatePointInObject(), and inGenericShape().
boost::optional< Kernel::V3D > Mantid::Geometry::RandomPoint::bounded | ( | const IObject & | object, |
Kernel::PseudoRandomNumberGenerator & | rng, | ||
const BoundingBox & | box, | ||
size_t | maxAttempts | ||
) |
Return a random point in a generic shape limited by a bounding box.
object | an object in which the point is generated |
rng | a random number generator |
box | a box restricting the point's volume |
maxAttempts | number of attempts to find a suitable point |
Definition at line 145 of file RandomPoint.cpp.
References Mantid::Geometry::BoundingBox::generatePointInside(), Mantid::Geometry::BoundingBox::isNull(), and Mantid::Kernel::PseudoRandomNumberGenerator::nextValue().
Kernel::V3D Mantid::Geometry::RandomPoint::inCuboid | ( | const detail::ShapeInfo & | shapeInfo, |
Kernel::PseudoRandomNumberGenerator & | rng | ||
) |
Return a random point in a cuboid shape.
shapeInfo | cuboid's shape info |
rng | a random number generate |
Definition at line 50 of file RandomPoint.cpp.
References Mantid::Geometry::detail::ShapeInfo::cuboidGeometry(), and Mantid::Kernel::PseudoRandomNumberGenerator::nextValue().
Referenced by Mantid::Geometry::CSGObject::generatePointInObject().
Kernel::V3D Mantid::Geometry::RandomPoint::inCylinder | ( | const detail::ShapeInfo & | shapeInfo, |
Kernel::PseudoRandomNumberGenerator & | rng | ||
) |
Return a random point in cylinder.
shapeInfo | cylinder's shape info |
rng | a random number generator |
Definition at line 67 of file RandomPoint.cpp.
References Mantid::Geometry::detail::ShapeInfo::cylinderGeometry(), localPointInCylinder(), Mantid::Kernel::PseudoRandomNumberGenerator::nextValue(), and Mantid::Geometry::z.
Referenced by Mantid::Geometry::CSGObject::generatePointInObject().
boost::optional< Kernel::V3D > Mantid::Geometry::RandomPoint::inGenericShape | ( | const IObject & | object, |
Kernel::PseudoRandomNumberGenerator & | rng, | ||
size_t | maxAttempts | ||
) |
Return a random point in a generic shape.
object | an IObject within which the point is generated |
rng | a random number generator |
maxAttempts | maximum number of random numbers to use before giving up |
Definition at line 132 of file RandomPoint.cpp.
References bounded().
Referenced by Mantid::Geometry::CSGObject::generatePointInObject().
Kernel::V3D Mantid::Geometry::RandomPoint::inHollowCylinder | ( | const detail::ShapeInfo & | shapeInfo, |
Kernel::PseudoRandomNumberGenerator & | rng | ||
) |
Return a random point in a hollow cylinder.
shapeInfo | hollow cylinder's shape info |
rng | a random number generator |
Definition at line 87 of file RandomPoint.cpp.
References Mantid::Geometry::detail::ShapeInfo::hollowCylinderGeometry(), localPointInCylinder(), Mantid::Kernel::PseudoRandomNumberGenerator::nextValue(), and Mantid::Geometry::z.
Referenced by Mantid::Geometry::CSGObject::generatePointInObject().
Kernel::V3D Mantid::Geometry::RandomPoint::inSphere | ( | const detail::ShapeInfo & | shapeInfo, |
Kernel::PseudoRandomNumberGenerator & | rng | ||
) |
Return a random point in sphere.
shapeInfo | sphere's shape info |
rng | a random number generator |
Definition at line 110 of file RandomPoint.cpp.
References Mantid::Kernel::PseudoRandomNumberGenerator::nextValue(), Mantid::Geometry::detail::ShapeInfo::sphereGeometry(), Mantid::Geometry::x, Mantid::Geometry::y, and Mantid::Geometry::z.
Referenced by Mantid::Geometry::CSGObject::generatePointInObject().
Kernel::V3D Mantid::Geometry::RandomPoint::localPointInCylinder | ( | const Kernel::V3D & | basis, |
const Kernel::V3D & | alongAxis, | ||
double | polarAngle, | ||
double | radialLength | ||
) |
Return a local point in a cylinder shape.
basis | a basis vector |
alongAxis | symmetry axis vector of a cylinder |
polarAngle | a polar angle (in radians) of a point in a cylinder |
radialLength | radial position of point in a cylinder |
Definition at line 23 of file RandomPoint.cpp.
References Mantid::Kernel::V3D::cross_prod(), Mantid::Kernel::V3D::normalize(), Mantid::Kernel::V3D::setX(), Mantid::Kernel::V3D::setY(), Mantid::Kernel::V3D::setZ(), Mantid::Kernel::V3D::X(), Mantid::Kernel::V3D::Y(), and Mantid::Kernel::V3D::Z().
Referenced by inCylinder(), and inHollowCylinder().