An abstract base class that knows how to sample a primvar signal given a ray hit coordinate: an <element, u, v> tuple.
More...
|
| | HdEmbreePrimvarSampler ()=default |
| | Default constructor. More...
|
| |
| virtual | ~HdEmbreePrimvarSampler ()=default |
| | Default destructor. More...
|
| |
| virtual bool | Sample (unsigned int element, float u, float v, void *value, HdTupleType dataType) const =0 |
| | Sample the primvar at element index index and local basis coordinates u and v, writing the sample to value. More...
|
| |
|
template<typename T > |
| bool | Sample (unsigned int element, float u, float v, T *value) const |
| |
An abstract base class that knows how to sample a primvar signal given a ray hit coordinate: an <element, u, v> tuple.
It provides templated accessors, but derived classes are responsible for implementing appropriate sampling or interpolation modes.
Definition at line 135 of file sampler.h.
| virtual bool Sample |
( |
unsigned int |
element, |
|
|
float |
u, |
|
|
float |
v, |
|
|
void * |
value, |
|
|
HdTupleType |
dataType |
|
) |
| const |
|
pure virtual |
Sample the primvar at element index index and local basis coordinates u and v, writing the sample to value.
Interpret value as having arity numComponents, each of type componentType. These parameters may not match the datatype declaration of the underlying buffer.
Derived classes are responsible for implementing sampling logic for their particular interpolation modes. Sample returns true if a value was successfully retrieved.
- Parameters
-
| element | The element index to sample. |
| u | The u coordinate to sample. |
| v | The v coordinate to sample. |
| value | The memory to write the value to (only written on success). |
| dataType | The HdTupleType describing element values. |
- Returns
- True if the value was successfully sampled.
Implemented in HdEmbreeSubdivVertexSampler, HdEmbreeTriangleFaceVaryingSampler, HdEmbreeTriangleVertexSampler, HdEmbreeUniformSampler, and HdEmbreeConstantSampler.