#include <FieldGroup.h>
template<typename BaseTypeList_T, int Dims_T>
struct FieldGroup< BaseTypeList_T, Dims_T >::GetIntersections
Definition at line 1206 of file FieldGroup.h.
◆ GetIntersections()
template<typename BaseTypeList_T , int Dims_T>
◆ intersectMatrixMapping()
template<typename BaseTypeList_T , int Dims_T>
void FieldGroup< BaseTypeList_T, Dims_T >::GetIntersections::intersectMatrixMapping |
( |
const Ray3d & |
wsRay, |
|
|
const MatrixFieldMapping * |
mtx, |
|
|
const float |
worldScale |
|
) |
| const |
|
inline |
◆ intersectFrustumMapping()
template<typename BaseTypeList_T , int Dims_T>
void FieldGroup< BaseTypeList_T, Dims_T >::GetIntersections::intersectFrustumMapping |
( |
const Ray3d & |
wsRay, |
|
|
const FrustumFieldMapping * |
mtx, |
|
|
const float |
worldScale |
|
) |
| const |
|
inline |
Intersect frustum mapping.
Definition at line 1240 of file FieldGroup.h.
1246 typedef std::vector<V3d> PointVec;
1248 const float time = 0.0f;
1254 PointVec wsCorners(lsCorners.size());
1255 for (PointVec::iterator lsP = lsCorners.begin(), wsP = wsCorners.begin(),
1256 end = lsCorners.end(); lsP != end; ++lsP, ++wsP) {
1262 planes[0] =
Plane3d(wsCorners[4], wsCorners[0], wsCorners[6]);
1263 planes[1] =
Plane3d(wsCorners[1], wsCorners[5], wsCorners[3]);
1264 planes[2] =
Plane3d(wsCorners[4], wsCorners[5], wsCorners[0]);
1265 planes[3] =
Plane3d(wsCorners[2], wsCorners[3], wsCorners[6]);
1266 planes[4] =
Plane3d(wsCorners[0], wsCorners[1], wsCorners[2]);
1267 planes[5] =
Plane3d(wsCorners[5], wsCorners[4], wsCorners[7]);
1272 for (
int i = 0; i < 6; ++i) {
1275 if (p.intersectT(wsRay, t)) {
1276 if (wsRay.dir.dot(p.normal) > 0.0) {
1288 const double minLen =
min(
min(wsVoxelSize.x, wsVoxelSize.y),
References detail::cornerPoints(), FrustumFieldMapping::localToWorld(), detail::max(), detail::min(), and FrustumFieldMapping::wsVoxelSize().
◆ operator()()
template<typename BaseTypeList_T , int Dims_T>
template<typename T >
void FieldGroup< BaseTypeList_T, Dims_T >::GetIntersections::operator() |
( |
const T & |
vec | ) |
const |
|
inline |
Functor.
Definition at line 1295 of file FieldGroup.h.
1298 for (
size_t field = 0, end = vec.size(); field < end; ++field) {
1301 if (vec[field].doOsToWs) {
1302 vec[field].wsToOs.multVecMatrix(
m_wsRay.pos, wsRay.pos);
1303 vec[field].wsToOs.multDirMatrix(
m_wsRay.dir, wsRay.dir);
1309 dynamic_cast<const MatrixFieldMapping*>(m)) {
1314 dynamic_cast<const FrustumFieldMapping*>(m)) {
◆ m_wsRay
template<typename BaseTypeList_T , int Dims_T>
const Ray3d& FieldGroup< BaseTypeList_T, Dims_T >::GetIntersections::m_wsRay |
◆ m_intervals
template<typename BaseTypeList_T , int Dims_T>
The documentation for this struct was generated from the following file:
bool intersect(const Ray3d &ray, const Box3d &box, double &outT0, double &outT1)
void intersectFrustumMapping(const Ray3d &wsRay, const FrustumFieldMapping *mtx, const float worldScale) const
Intersect frustum mapping.
Base class for mapping between world-, local- and voxel coordinates.
std::vector< V3d > cornerPoints(const Box3d &box)
T max(const T a, const T2 b)
Max operation on mixed types.
void worldToLocalDir(const V3d &wsV, V3d &lsV) const
Represents the mapping of a field by a matrix transform.
virtual V3d wsVoxelSize(int, int, int) const
Returns world-space size of a voxel at the specified coordinate.
Represents a single integration interval. The interval is assumed to be inclusive,...
IntervalVec & m_intervals
virtual void worldToLocal(const V3d &wsP, V3d &lsP) const
Transform from world space position into local space.
Represents the mapping of a field by a perspective transform.
virtual void localToWorld(const V3d &lsP, V3d &wsP) const
Transform from local space position into world space.
T min(const T a, const T2 b)
Min operation on mixed types.
virtual V3d wsVoxelSize(int i, int j, int k) const
Returns world-space size of a voxel at the specified coordinate.
void intersectMatrixMapping(const Ray3d &wsRay, const MatrixFieldMapping *mtx, const float worldScale) const
Intersect matrix mapping.