Scalar specialization.
More...
#include <FieldSampler.h>
|
static void | getMinMax (const WrapperVec_T &f, const Box3d &wsBounds, float *min, float *max) |
|
static void | getMinMaxMIP (const WrapperVec_T &f, const Box3d &wsBounds, float *min, float *max) |
|
static void | sample (const WrapperVec_T &f, const V3d &p, float *value, bool isVs) |
|
static void | sampleMIP (const WrapperVec_T &f, const V3d &p, const float wsSpotSize, float *value, bool isVs) |
|
template<typename WrapperVec_T>
struct FieldSampler< WrapperVec_T, 1 >
Scalar specialization.
Definition at line 39 of file FieldSampler.h.
template<typename WrapperVec_T >
static void FieldSampler< WrapperVec_T, 1 >::sample |
( |
const WrapperVec_T & |
f, |
|
|
const V3d & |
p, |
|
|
float * |
value, |
|
|
bool |
isVs |
|
) |
| |
|
inlinestatic |
Definition at line 42 of file FieldSampler.h.
46 for (
size_t i = 0, end = f.size(); i < end; ++i) {
47 if (f[i].vsBounds.intersects(p)) {
48 *value += f[i].interp.sample(*f[i].field, p);
53 for (
size_t i = 0, end = f.size(); i < end; ++i) {
54 f[i].mapping->worldToVoxel(p, vsP);
55 if (f[i].vsBounds.intersects(vsP)) {
56 *value += f[i].interp.sample(*f[i].field, vsP);
template<typename WrapperVec_T >
static void FieldSampler< WrapperVec_T, 1 >::sampleMIP |
( |
const WrapperVec_T & |
f, |
|
|
const V3d & |
p, |
|
|
const float |
wsSpotSize, |
|
|
float * |
value, |
|
|
bool |
isVs |
|
) |
| |
|
inlinestatic |
Definition at line 62 of file FieldSampler.h.
66 for (
size_t i = 0, end = f.size(); i < end; ++i) {
67 if (f[i].vsBounds.intersects(p)) {
68 *value += f[i].interp->sample(p, wsSpotSize);
73 for (
size_t i = 0, end = f.size(); i < end; ++i) {
74 f[i].mapping->worldToVoxel(p, vsP);
75 if (f[i].vsBounds.intersects(vsP)) {
76 *value += f[i].interp->sample(vsP, wsSpotSize);
template<typename WrapperVec_T >
static void FieldSampler< WrapperVec_T, 1 >::getMinMax |
( |
const WrapperVec_T & |
f, |
|
|
const Box3d & |
wsBounds, |
|
|
float * |
min, |
|
|
float * |
max |
|
) |
| |
|
inlinestatic |
Definition at line 82 of file FieldSampler.h.
References clipBounds(), discreteBounds(), and worldToVoxel().
85 for (
size_t field = 0, end = f.size(); field < end; ++field) {
87 const Box3i dw = f[field].field->dataWindow();
93 if (!dw.intersects(dvsBounds)) {
96 for (
int k = dvsBounds.min.z; k <= dvsBounds.max.z; ++k) {
97 for (
int j = dvsBounds.min.y; j <= dvsBounds.max.y; ++j) {
98 for (
int i = dvsBounds.min.x; i <= dvsBounds.max.x; ++i) {
99 float val = f[field].field->fastValue(i, j, k);
100 min[0] = std::min(val, min[0]);
101 max[0] = std::max(val, max[0]);
Box3i clipBounds(const Box3i &bbox, const Box3i &bounds)
void worldToVoxel(const Field3D::FieldMapping *mapping, const Box3d &wsBounds, Box3d &vsBounds)
Computes a voxel space bounds given a bounding box in world space. This is done by transforming each ...
Box3i discreteBounds(const Box3d &bbox)
template<typename WrapperVec_T >
static void FieldSampler< WrapperVec_T, 1 >::getMinMaxMIP |
( |
const WrapperVec_T & |
f, |
|
|
const Box3d & |
wsBounds, |
|
|
float * |
min, |
|
|
float * |
max |
|
) |
| |
|
inlinestatic |
Definition at line 108 of file FieldSampler.h.
References clipBounds(), discreteBounds(), and worldToVoxel().
111 for (
size_t field = 0, end = f.size(); field < end; ++field) {
113 const Box3i dw = f[field].field->dataWindow();
119 if (!dw.intersects(dvsBounds)) {
122 for (
int k = dvsBounds.min.z; k <= dvsBounds.max.z; ++k) {
123 for (
int j = dvsBounds.min.y; j <= dvsBounds.max.y; ++j) {
124 for (
int i = dvsBounds.min.x; i <= dvsBounds.max.x; ++i) {
125 float val = f[field].field->fastMipValue(0, i, j, k);
126 min[0] = std::min(val, min[0]);
127 max[0] = std::max(val, max[0]);
Box3i clipBounds(const Box3i &bbox, const Box3i &bounds)
void worldToVoxel(const Field3D::FieldMapping *mapping, const Box3d &wsBounds, Box3d &vsBounds)
Computes a voxel space bounds given a bounding box in world space. This is done by transforming each ...
Box3i discreteBounds(const Box3d &bbox)
The documentation for this struct was generated from the following file: