|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object common:Generic common:TrapShape common:TrapShapeBlock
class
This is a generic trap "block". This is essentially a small
wrapper around a transformation, a trap shape, and a transfer
function. You can use it anywhere a TrapShape is needed.
class TrapShapeBlock(TrapShape) { ; This is a generic trap "block". This is essentially a small ; wrapper around a transformation, a trap shape, and a transfer ; function. You can use it anywhere a TrapShape is needed. public: func TrapShapeBlock(Generic pparent) TrapShape.TrapShape(pparent) m_TrapTransform = new @f_traptransform(this) m_TrapShape = new @f_trapshape(this) m_TrapTransfer = new @f_traptransfer(this) endfunc func Init(complex pz) TrapShape.Init(pz) m_TrapTransform.Init(pz) m_TrapShape.Init(pz) m_TrapTransfer.Init(pz) endfunc float func Iterate(complex pz) complex zt = m_TrapTransform.Iterate(pz) float distance = m_TrapShape.Iterate(zt) distance = m_TrapTransfer.Iterate(distance) return distance endfunc func SetThreshold(float pthreshold) m_TrapShape.SetThreshold(pthreshold) endfunc complex func GetTransformedPoint() return m_TrapShape.GetTransformedPoint() endfunc float func GetTextureValue() return m_TrapShape.GetTextureValue() endfunc int func GetColorChannel() return m_TrapShape.GetColorChannel() endfunc protected: UserTransform m_TrapTransform TrapShape m_TrapShape Transfer m_TrapTransfer default: title = "TrapShape Block" int param v_trapshapeblock caption = "Version (TrapShapeBlock)" default = 101 hint = "This version parameter is used to detect when a change has been made to the formula that is incompatible with the previous version. When that happens, this field will reflect the old version number to alert you to the fact that an alternate rendering is being used." visible = @v_trapshapeblock < 100 endparam UserTransform param f_traptransform caption = "Trap Position" default = TrapTransform expanded = false endparam TrapShape param f_trapshape caption = "Trap Shape" default = TrapShapePoint endparam Transfer param f_traptransfer caption = "Trap Transfer" default = NullTransfer endparam }
Constructor Summary | |
---|---|
TrapShapeBlock()
|
|
TrapShapeBlock(Generic pparent)
|
Method Summary | |
---|---|
int |
GetColorChannel()
Get color channel. |
float |
GetTextureValue()
Get texture value. |
complex |
GetTransformedPoint()
Get transformed point. |
void |
Init(complex pz)
call this before each sequence of values to be trapped |
float |
Iterate(complex pz)
call this for each iteration being trapped |
void |
SetThreshold(float pthreshold)
call this to set the threshold selected by the user it's up to the calling code to apply the threshold, but some trap shapes or merges need to know the threshold to work properly |
Methods inherited from class common:TrapShape |
---|
IterateSilent |
Methods inherited from class common:Generic |
---|
GetParent |
Methods inherited from class Object |
---|
|
Constructor Detail |
---|
public TrapShapeBlock(Generic pparent)
public TrapShapeBlock()
Method Detail |
---|
public void Init(complex pz)
TrapShape
Init
in class TrapShape
public float Iterate(complex pz)
TrapShape
Iterate
in class TrapShape
public void SetThreshold(float pthreshold)
TrapShape
SetThreshold
in class TrapShape
public complex GetTransformedPoint()
TrapShape
Some trap modes and trap coloring modes require access to the "transformed" point. This is the final point that is actually used by the trap shape class to test against the trap. For most trap shape classes this will be exactly the same as the pz passed into Iterate(), and those classes can use this base class functionality. However, some trap shape classes (e.g. TrapShapeMerge, TrapShapeBlock) perform some internal transformations on pz before passing it to the trap shape; this gives them the opportunity to call their trap shape's function to get the final transformed point.
GetTransformedPoint
in class TrapShape
public float GetTextureValue()
TrapShape
Ordinarily, a trap shape does not have a native texture (it is flat). Some formulas may pair trap shapes with trap textures, and may need more information about trap textures when trap shapes are nested via TrapShapeMerge. This function provides support for accessing texture information.
GetTextureValue
in class TrapShape
public int GetColorChannel()
TrapShape
Some trap shapes may be inherently multi-colored. Such trap shapes may either override this function to return a different color index, or may simply store the index in m_LastChannel and this function will return it. The color index is just an indication of which color channel (in a GradientWrapper object) should be used.
GetColorChannel
in class TrapShape
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |