HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PRM_RampUtils Class Reference

Utility functions for working with ramp parameters. More...

#include <PRM_RampUtils.h>

Classes

class  ValueData
 

Public Types

enum  PRM_ValueType { PRM_INT_TYPE, PRM_FLOAT_TYPE }
 
typedef void(* SetValueCB )(ValueData value_info)
 

Static Public Member Functions

static void updateRampFromMultiParm (fpreal t, const PRM_Parm &m, UT_Ramp *ramp, bool *time_dep=NULL, DEP_MicroNode *depnode=NULL)
 Update ramp value from a multi parm. More...
 
static void updateMultiParmFromRamp (fpreal t, const UT_Ramp &ramp, PRM_Parm &m, bool add_wrap, PRM_AddKeyType add_key)
 Update multi parm from a ramp value. More...
 
static void updateMultiParmFromRamp (fpreal t, const UT_Ramp &ramp, PRM_Parm &m, bool add_wrap, PRM_AddKeyType add_key, SetValueCB set_value_cb, void *cb_callee)
 
static void setRampDefaultFromParm (UT_OStringStream &defaults_os, const PRM_Parm &ramp_parm)
 Write out the ramp parameter values as an encoding of ramp defaults. More...
 
static void getRampParmFromDefault (PRM_Parm &ramp_parm, const char *defaults_string)
 Parse the ramp defaults and set them as values on the parameter. More...
 
static void getRampValuesFromParm (UT_DoubleArray &values, int &tuple_size, UT_DoubleArray &keys, UT_StringArray &basis, const UT_Ramp &ramp, bool is_rgb)
 
static void getRampDefaultString (UT_WorkBuffer &wbuf, const UT_DoubleArray &values, int tuple_size, const UT_DoubleArray *keys, const UT_StringArray *basis)
 

Detailed Description

Utility functions for working with ramp parameters.

Definition at line 25 of file PRM_RampUtils.h.

Member Typedef Documentation

typedef void(* PRM_RampUtils::SetValueCB)(ValueData value_info)

Callback function which sets values when updating multi-parms from ramps.

Definition at line 70 of file PRM_RampUtils.h.

Member Enumeration Documentation

Helper enumeration for stating the type of value that should be set when updating multi-parms from ramps.

Enumerator
PRM_INT_TYPE 
PRM_FLOAT_TYPE 

Definition at line 30 of file PRM_RampUtils.h.

Member Function Documentation

static void PRM_RampUtils::getRampDefaultString ( UT_WorkBuffer wbuf,
const UT_DoubleArray values,
int  tuple_size,
const UT_DoubleArray keys,
const UT_StringArray basis 
)
static

Construct the string that defines the ramp default value based on provided basis, positions, and value arrays.

static void PRM_RampUtils::getRampParmFromDefault ( PRM_Parm ramp_parm,
const char *  defaults_string 
)
static

Parse the ramp defaults and set them as values on the parameter.

static void PRM_RampUtils::getRampValuesFromParm ( UT_DoubleArray values,
int tuple_size,
UT_DoubleArray keys,
UT_StringArray basis,
const UT_Ramp ramp,
bool  is_rgb 
)
static

Get the basis, positions, value (as component sequence array), and value tuple size that define the ramp parameter value.

static void PRM_RampUtils::setRampDefaultFromParm ( UT_OStringStream defaults_os,
const PRM_Parm ramp_parm 
)
static

Write out the ramp parameter values as an encoding of ramp defaults.

static void PRM_RampUtils::updateMultiParmFromRamp ( fpreal  t,
const UT_Ramp ramp,
PRM_Parm m,
bool  add_wrap,
PRM_AddKeyType  add_key 
)
static

Update multi parm from a ramp value.

static void PRM_RampUtils::updateMultiParmFromRamp ( fpreal  t,
const UT_Ramp ramp,
PRM_Parm m,
bool  add_wrap,
PRM_AddKeyType  add_key,
SetValueCB  set_value_cb,
void cb_callee 
)
static

Update multi parm from a ramp value. This method version takes in a callback function that sets the values in the multi parm.

static void PRM_RampUtils::updateRampFromMultiParm ( fpreal  t,
const PRM_Parm m,
UT_Ramp ramp,
bool *  time_dep = NULL,
DEP_MicroNode depnode = NULL 
)
static

Update ramp value from a multi parm.


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