librtl

rtl_binarytexture Class Reference

Encapsulation of a texture which combines two materials. More...

#include <texture.h>

Inherits rtl_solidtexture.

Inherited by rtl_checkers, rtl_tiles and rtl_turbulence.

List of all members.

Protected Members


Detailed Description

Encapsulation of a texture which combines two materials.

A binary texture uses some sort of heuristic to do a weighted combination of two child materials.

Sub-classes must override the weight function.


Member Function Documentation

rtl_binarytexture::rtl_binarytexture( rtl_material*, rtl_material* ) [protected]

Creates a Binary texture from two given materials. The boolean indicates that the children materials should be deleted.

void rtl_binarytexture::texture( rtl_material*, rtl_ray&, const jVec3&, jNorm3& ) [protected]

Combines the two child materials into the given material by lerping between the two children by the amount returned by weight.

Reimplemented from rtl_texture.

virtual jFlt rtl_binarytexture::weight( rtl_ray&, const jVec3&, jNorm3& ) = 0 [protected, pure virtual]

Returns the linear interpolation coefficient to weight the two child materials by.

Reimplemented in rtl_turbulence, rtl_tiles and rtl_checkers.


Member Data Documentation

rtl_material* rtl_binarytexture::left [protected]

rtl_material * rtl_binarytexture::right [protected]


The documentation for this class was generated from the following file:
JSP / librtl v0.2 mtigges@cpsc.ucalgary.ca