|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object common:Generic reb:ImageTrapMode
class
This is a generic image trap mode formula.
It takes a sequence of complex point pairs (untransformed and transformed),
including image point pairs, and distances and produces a final result. It
similar to generic trap mode in common.ulb.
class ImageTrapMode(Generic) { ; This is a generic image trap mode formula. ; <p> ; It takes a sequence of complex point pairs (untransformed and transformed), ; including image point pairs, and distances and produces a final result. It ; similar to generic trap mode in common.ulb. public: import "common.ulb" ; constructor func ImageTrapMode(Generic pparent) Generic.Generic(pparent) endfunc ; call this at the beginning of each sequence func Init(complex pz) m_Iterations = 0 m_Solid = false m_alph = 0 int j = 0 while (j < 4) m_UntransformedPoints[j] = (0,0) m_TransformedPoints[j] = (0,0) m_IterationPoints[j] = 0 m_Distances[j] = 0.0 m_ImagePoints[j] = rgba(0,0,0,0) m_Textures[j] = 0.0 j = j + 1 endwhile endfunc ; call this for each point func Iterate(complex pz, complex pzt, float pdistance, float ptexture, color pcolor) m_Iterations = m_Iterations + 1 endfunc ; call this for each point that is ignored func IterateSilent() m_Iterations = m_Iterations + 1 endfunc ; call this to compute final results func Result() endfunc ; call this to determine if the last sequence produced a solid point bool func IsSolid() return m_Solid endfunc ; get a final untransformed point complex func GetUntransformedPoint(int pindex) return m_UntransformedPoints[pindex] endfunc ; get a final transformed point complex func GetTransformedPoint(int pindex) return m_TransformedPoints[pindex] endfunc ; get a final distance float func GetDistance(int pindex) return m_Distances[pindex] endfunc ; get a final iteration float func GetIteration(int pindex) return m_IterationPoints[pindex] endfunc ; get a final color color func GetColor(int pindex) return m_ImagePoints[pindex] endfunc ; get a final texture float func GetTexture(int pindex) return m_Textures[pindex] endfunc ; get threshold value float func GetThreshold() return 1.0 endfunc func SetThreshold(float pthreshold) endfunc ; get whether threshold is even used bool func UsesThreshold() return false endfunc float func GetAThreshold() return 1.0 endfunc func SetAThreshold(float pathreshold) endfunc ; get whether alpha threshold is even used bool func UsesAThreshold() return false endfunc protected: int m_Iterations; count the number of iterations bool m_Solid; flag indicating whether sequence was solid or not complex m_UntransformedPoints[4] complex m_TransformedPoints[4] float m_IterationPoints[4] float m_Distances[4] color m_ImagePoints[4] float m_Textures[4] float m_alph default: int param v_imagetrapmode caption = "Version (Image Trap Mode)" 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_imagetrapmode < 101 endparam }
Constructor Summary | |
---|---|
ImageTrapMode()
|
|
ImageTrapMode(Generic pparent)
constructor |
Method Summary | |
---|---|
float |
GetAThreshold()
|
color |
GetColor(int pindex)
get a final color |
float |
GetDistance(int pindex)
get a final distance |
float |
GetIteration(int pindex)
get a final iteration |
float |
GetTexture(int pindex)
get a final texture |
float |
GetThreshold()
get threshold value |
complex |
GetTransformedPoint(int pindex)
get a final transformed point |
complex |
GetUntransformedPoint(int pindex)
get a final untransformed point |
void |
Init(complex pz)
call this at the beginning of each sequence |
boolean |
IsSolid()
call this to determine if the last sequence produced a solid point |
void |
Iterate(complex pz,
complex pzt,
float pdistance,
float ptexture,
color pcolor)
call this for each point |
void |
IterateSilent()
call this for each point that is ignored |
void |
Result()
call this to compute final results |
void |
SetAThreshold(float pathreshold)
|
void |
SetThreshold(float pthreshold)
|
boolean |
UsesAThreshold()
get whether alpha threshold is even used |
boolean |
UsesThreshold()
get whether threshold is even used |
Methods inherited from class common:Generic |
---|
GetParent |
Methods inherited from class Object |
---|
|
Constructor Detail |
---|
public ImageTrapMode(Generic pparent)
public ImageTrapMode()
Method Detail |
---|
public void Init(complex pz)
public void Iterate(complex pz, complex pzt, float pdistance, float ptexture, color pcolor)
public void IterateSilent()
public void Result()
public boolean IsSolid()
public complex GetUntransformedPoint(int pindex)
public complex GetTransformedPoint(int pindex)
public float GetDistance(int pindex)
public float GetIteration(int pindex)
public color GetColor(int pindex)
public float GetTexture(int pindex)
public float GetThreshold()
public void SetThreshold(float pthreshold)
public boolean UsesThreshold()
public float GetAThreshold()
public void SetAThreshold(float pathreshold)
public boolean UsesAThreshold()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |