OpenVDB  3.2.0
Public Types | Public Member Functions | List of all members
NormalShader< GridT, SamplerType > Class Template Reference

Color shader that treats the surface normal (x, y, z) as an RGB color. More...

#include <RayTracer.h>

Inherits BaseShader.

Public Types

typedef math::Ray< RealRayT
 

Public Member Functions

 NormalShader (const GridT &grid)
 
virtual ~NormalShader ()
 
virtual Film::RGBA operator() (const Vec3R &xyz, const Vec3R &normal, const Vec3R &) const
 Defines the interface of the virtual function that returns a RGB color. More...
 
virtual BaseShadercopy () const
 

Detailed Description

template<typename GridT = Film::RGBA, typename SamplerType = tools::PointSampler>
class openvdb::v3_2_0::tools::NormalShader< GridT, SamplerType >

Color shader that treats the surface normal (x, y, z) as an RGB color.

The color can either be constant (if GridT = Film::RGBA which is the default) or defined in a separate Vec3 color grid. Use SamplerType to define the order of interpolation (default is zero order, i.e. closes-point).

Member Typedef Documentation

typedef math::Ray<Real> RayT
inherited

Constructor & Destructor Documentation

NormalShader ( const GridT &  grid)
inline
virtual ~NormalShader ( )
inlinevirtual

Member Function Documentation

virtual BaseShader* copy ( ) const
inlinevirtual

Implements BaseShader.

virtual Film::RGBA operator() ( const Vec3R xyz,
const Vec3R nml,
const Vec3R dir 
) const
inlinevirtual

Defines the interface of the virtual function that returns a RGB color.

Parameters
xyzWorld position of the intersection point.
nmlNormal in world space at the intersection point.
dirDirection of the ray in world space.

Implements BaseShader.


The documentation for this class was generated from the following file: