CC-Fractal-Suite
Public Types | Public Member Functions | Protected Member Functions | Static Protected Member Functions | List of all members
CC::cop2_FractalMatteFunc Class Reference

Pixel Function used to interpret the upstream fractals. More...

#include <COP2_FractalMatte.h>

Inheritance diagram for CC::cop2_FractalMatteFunc:

Public Types

enum  ModeType { MODULUS, COMPARISON, BLENDCOLOR }
 Enumerates the different type of fundamental operators we can perform on the upstream fractals. More...
 
enum  ComparisonType {
  LESS_THAN, LESS_THAN_EQUALS, EQUALS, GREATER_THAN_EQUALS,
  GREATER_THAN, NOT_EQUALS
}
 When in the comparison mode, specifies the different kinds of comparisons we are allowed to make. More...
 
enum  BlendType { LINEAR, QUADRATIC, CONSTANT }
 When in the blendcolor mode, specifies the strategy used to blend the colors between different value ranges. More...
 

Public Member Functions

 cop2_FractalMatteFunc (fpreal modulo, fpreal offset, bool invert=false)
 For Modulus.
 
 cop2_FractalMatteFunc (fpreal compValue, ComparisonType compType, bool invert=false)
 For Comparison.
 
 cop2_FractalMatteFunc (std::vector< fpreal >sizes, std::vector< UT_Color >colors, BlendType blendType, fpreal32 offset, fpreal32 blendOffset, fpreal32 weightMult=1.0f, bool invert=false)
 For Color Blending.
 

Protected Member Functions

virtual bool eachComponentDifferent () const
 Tells Houdini whether 'component', here meaning image plane, should be different or not. More...
 
virtual bool needAllComponents () const
 Tells Houdini if all components must be cooked or not.
 
virtual RUPixelFunc getPixelFunction () const
 This is how we signal to RU_PixelFunction what method must be called per-pixel. More...
 

Static Protected Member Functions

static fpreal32 checkModulus (RU_PixelFunction *pf, fpreal32 pixelValue, int comp)
 Calculate Pixel Matte from a modulus. More...
 
static fpreal32 checkComparison (RU_PixelFunction *pf, fpreal32 pixelValue, int comp)
 Calculate Pixel Matte from a simple operator comparison.
 
static fpreal32 checkBlendColors (RU_PixelFunction *pf, fpreal32 pixelValue, int comp)
 Calculate Blended Colors based on a vector of colors and weights. More...
 

Detailed Description

Pixel Function used to interpret the upstream fractals.

Supports various modes that connect the interface to what the pixel values should be. This may get refactored in the future to distinct functions, but since only one is being run on the image at a time, and there isn't a performance benefit, I have kept them altogether for now.

Member Enumeration Documentation

§ BlendType

When in the blendcolor mode, specifies the strategy used to blend the colors between different value ranges.

§ ComparisonType

When in the comparison mode, specifies the different kinds of comparisons we are allowed to make.

These correspond directly to C++'s relational operators.

§ ModeType

Enumerates the different type of fundamental operators we can perform on the upstream fractals.

Member Function Documentation

§ checkBlendColors()

fpreal32 CC::cop2_FractalMatteFunc::checkBlendColors ( RU_PixelFunction *  pf,
fpreal32  pixelValue,
int  comp 
)
staticprotected

Calculate Blended Colors based on a vector of colors and weights.

§ checkModulus()

fpreal32 CC::cop2_FractalMatteFunc::checkModulus ( RU_PixelFunction *  pf,
fpreal32  pixelValue,
int  comp 
)
staticprotected

Calculate Pixel Matte from a modulus.

Parameters
pixelValue

Pointer to pixel function> Pixel functions recieve float values, but we will cast to int.

comp

Which image plane we are currently calculating

§ eachComponentDifferent()

virtual bool CC::cop2_FractalMatteFunc::eachComponentDifferent ( ) const
inlineprotectedvirtual

Tells Houdini whether 'component', here meaning image plane, should be different or not.

§ getPixelFunction()

virtual RUPixelFunc CC::cop2_FractalMatteFunc::getPixelFunction ( ) const
inlineprotectedvirtual

This is how we signal to RU_PixelFunction what method must be called per-pixel.

Returns a different function depending on what mode type is used.


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