adskRamp.h File Reference


Detailed Description

Ramp shader.

#include <shader.h>
#include "adskExport.h"
#include "adskShaderSDKNamespaceBegin.h"
#include "adskShaderSDKNamespaceEnd.h"

Include dependency graph for adskRamp.h:


Classes

struct  RampColorEntry
 Color ramp control point. More...
struct  RampColor
 mental ray structure for an array of RampColorEntry. More...
struct  RampFloatEntry
 Float ramp control point. More...
struct  RampFloat
 mental ray structure for an array of RampFloatEntry. More...

Enumerations

enum  RampInterpType { RAMP_INTERP_NONE = 0, RAMP_INTERP_LINEAR, RAMP_INTERP_SMOOTH, RAMP_INTERP_SPLINE }
 Ramp interpolation types. More...

Functions

void ramp_constructor (Ramp *ramp, miState *state, void *rampParms, miBoolean isColor)
 Construct a ramp.
void ramp_destructor (Ramp *ramp)
 Destruct a ramp.
float ramp_get_interp_float (const Ramp *ramp, float value)
 Get the interpolated floating point value of the ramp at a given location.
void ramp_get_interp_color (const Ramp *ramp, float value, miColor *result)
 Get the interpolated color value of the ramp at a given location.

Variables

const unsigned int MAX_RAMP_ENTRIES = 50
 Maximum number of entries in a ramp.

Enumeration Type Documentation

Ramp interpolation types.

Enumerator:
RAMP_INTERP_NONE  No interpolation.
RAMP_INTERP_LINEAR  Linear interpolation.
RAMP_INTERP_SMOOTH  Smooth interpolation.
RAMP_INTERP_SPLINE  Spline interpolation.


Function Documentation

void ramp_constructor ( Ramp *  ramp,
miState *  state,
void *  rampParms,
miBoolean  isColor 
)

Construct a ramp.

Parameters:
[in,out] ramp The ramp data structure.
[in] state The mental ray state.
[in] rampParms The array of control points. This can be either a RampFloat or a RampColor, but the isColor field must be set appropriately.
[in] isColor True if the array of control points are color.

void ramp_destructor ( Ramp *  ramp  ) 

Destruct a ramp.

Parameters:
[in] ramp The ramp to be destructed.

void ramp_get_interp_color ( const Ramp *  ramp,
float  value,
miColor *  result 
)

Get the interpolated color value of the ramp at a given location.

Parameters:
[in] ramp The ramp to query.
[in] value The location to lookup.
[out] result The color value of the ramp.

float ramp_get_interp_float ( const Ramp *  ramp,
float  value 
)

Get the interpolated floating point value of the ramp at a given location.

Parameters:
[in] ramp The ramp to query.
[in] value The location to lookup.
Returns:
The value of the ramp.


Autodesk® Maya® 2012 © 2010 Autodesk, Inc. All rights reserved. Generated with doxygen 1.5.6