OpenVDB  9.0.1
Classes | Public Member Functions | List of all members
Film Class Reference

A simple class that allows for concurrent writes to pixels in an image, background initialization of the image, and PPM file output. More...

#include <openvdb/tools/RayTracer.h>

Classes

struct  RGBA
 Floating-point RGBA components in the range [0, 1]. More...
 

Public Member Functions

 Film (size_t width, size_t height)
 
 Film (size_t width, size_t height, const RGBA &bg)
 
const RGBApixel (size_t w, size_t h) const
 
RGBApixel (size_t w, size_t h)
 
void fill (const RGBA &rgb=RGBA(0))
 
void checkerboard (const RGBA &c1=RGBA(0.3f), const RGBA &c2=RGBA(0.6f), size_t size=32)
 
template<typename Type = unsigned char>
std::unique_ptr< Type[]> convertToBitBuffer (const bool alpha=true) const
 
void savePPM (const std::string &fileName)
 
size_t width () const
 
size_t height () const
 
size_t numPixels () const
 
const RGBApixels () const
 

Detailed Description

A simple class that allows for concurrent writes to pixels in an image, background initialization of the image, and PPM file output.

Constructor & Destructor Documentation

Film ( size_t  width,
size_t  height 
)
inline
Film ( size_t  width,
size_t  height,
const RGBA bg 
)
inline

Member Function Documentation

void checkerboard ( const RGBA c1 = RGBA(0.3f),
const RGBA c2 = RGBA(0.6f),
size_t  size = 32 
)
inline
std::unique_ptr<Type[]> convertToBitBuffer ( const bool  alpha = true) const
inline
void fill ( const RGBA rgb = RGBA(0))
inline
size_t height ( ) const
inline
size_t numPixels ( ) const
inline
const RGBA& pixel ( size_t  w,
size_t  h 
) const
inline
RGBA& pixel ( size_t  w,
size_t  h 
)
inline
const RGBA* pixels ( ) const
inline
void savePPM ( const std::string &  fileName)
inline
size_t width ( ) const
inline