dmj5
Class DMJ_ClipShapePolyCurve

Object
  extended by common:Generic
      extended by common:Transform
          extended by common:ClipShape
              extended by dmj5:DMJ_ClipShapePolyCurve

class 
ClipShape:DMJ_ClipShapePolyCurve

PolyCurve clipping shape abstract base class.


Ultra Fractal Source

Toggle UF Source Code Display

 class DMJ_ClipShapePolyCurve(common.ulb:ClipShape) {
   ; PolyCurve clipping shape abstract base class.
   
 public:
   import "common.ulb"
   
   func DMJ_ClipShapePolyCurve(Generic pparent)
     ClipShape.ClipShape(pparent)
     
     m_PolyCurve = new DMJ_PolyCurve()
     m_Selector = new @f_selector(pparent)
     m_Selector.SetCurve(m_PolyCurve)
     m_PolyCurve.Rasterize(0)
   endfunc
 
   complex func Iterate(complex pz)
     m_Solid = m_PolyCurve.IsInside(pz)
 
     if (@p_outlinemode > 0)
       float d
       float t
       float to
 
       m_PolyCurve.ClosestPoint(pz, t, to, d)
       if (@p_outlinemode == 1)    ; shrink curve
         if (d < @p_outlinewidth*@p_outlinewidth)
           m_Solid = false
         endif
       elseif (@p_outlinemode == 2)  ; grow curve
         if (d < @p_outlinewidth*@p_outlinewidth)
           m_Solid = true
         endif
       elseif (@p_outlinemode == 3)  ; outline only
         if (d < @p_outlinewidth*@p_outlinewidth)
           m_Solid = true
         else
           m_Solid = false
         endif
       endif
     endif
 
     return pz
   endfunc
 
   func SetHandles(Handles phandles)
     m_Selector.SetHandles(phandles)
   endfunc
 
 protected:
   DMJ_PolyCurve m_PolyCurve
   DMJ_PolyCurveSelector m_Selector
 
 default:
   title = "PolyCurve Family"
 
   int param v_dmj_clipshapepolycurve
     caption = "Version (DMJ_ClipShapePolyCurve)"
     default = 100
     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_dmj_clipshapepolycurve < 100
   endparam
 
   DMJ_PolyCurveSelector param f_selector
     caption = "Curve Definition"
     default = DMJ_SelectorArbitraryPolygon
     hint = "Sets the method by which you will define your curve or polygon."
   endparam
   int param p_outlinemode
     caption = "Outline Use"
     default = 0
     enum = "off" "shrink shape" "grow shape" "outline only"
     hint = "Sets the way the outline will be used."
   endparam
   float param p_outlinewidth
     caption = "Outline Width"
     default = 0.1/#magn
     visible = (@p_outlinemode != 0)
     hint = "Sets the width of the outline."
   endparam
 
 }
 


Constructor Summary
DMJ_ClipShapePolyCurve()
           
DMJ_ClipShapePolyCurve(Generic pparent)
           
 
Method Summary
 complex Iterate(complex pz)
          Transform a single point within a sequence
 void SetHandles(Handles phandles)
           
 
Methods inherited from class common:ClipShape
SetAspect
 
Methods inherited from class common:Transform
Init, IsSolid, IterateSilent
 
Methods inherited from class common:Generic
GetParent
 
Methods inherited from class Object
 

Constructor Detail

DMJ_ClipShapePolyCurve

public DMJ_ClipShapePolyCurve(Generic pparent)

DMJ_ClipShapePolyCurve

public DMJ_ClipShapePolyCurve()
Method Detail

Iterate

public complex Iterate(complex pz)
Description copied from class: Transform
Transform a single point within a sequence

After a sequence has been set up with Init(), this function will be called once for each value in the sequence. Note that all values in the sequence must be processed in order (they cannot be processed out of order). If the sequence contains only one value, Init() will still be called and then Iterate() will be called just once.

Overrides:
Iterate in class Transform
Parameters:
pz - the complex value to be transformed
Returns:
the transformed value

SetHandles

public void SetHandles(Handles phandles)
Overrides:
SetHandles in class ClipShape