Standard
Class Standard_TrapModeTwoBase

Object
  extended by common:Generic
      extended by common:TrapMode
          extended by common:TrapModeWithThreshold
              extended by Standard:Standard_TrapModeBase
                  extended by Standard:Standard_TrapModeTwoBase
Direct Known Subclasses:
Standard_TrapModeTwoClosest, Standard_TrapModeTwoFarthest

class 
Standard_TrapModeBase:Standard_TrapModeTwoBase

Provides utility functions to easier implement the second/two closest/farthest trap modes.


Ultra Fractal Source

Toggle UF Source Code Display

 class Standard_TrapModeTwoBase(Standard_TrapModeBase) {
 ; Provides utility functions to easier implement the second/two
 ; closest/farthest trap modes.
 public:
   func Result()
     ; Default to averaging the two trapped points for the "two" modes.
     m_UntransformedPoints[0] = (m_UntransformedPoints[0] + m_UntransformedPoints[1]) / 2
     m_TransformedPoints[0] = (m_TransformedPoints[0] + m_TransformedPoints[1]) / 2
     m_Distances[0] = (m_Distances[0] + m_Distances[1]) / 2
     m_IterationPoints[0] = round((m_IterationPoints[0] + m_IterationPoints[1]) / 2)
   endfunc
 
 protected:
   func MoveTrapInfo()
     m_UntransformedPoints[1] = m_UntransformedPoints[0]
     m_TransformedPoints[1] = m_TransformedPoints[0]
     m_Distances[1] = m_Distances[0]
     m_IterationPoints[1] = m_IterationPoints[0]
   endfunc
   
   func ResultSubtract()
     ; Subtracts the two trapped points for the "second" modes.
     m_UntransformedPoints[0] = m_UntransformedPoints[0] - m_UntransformedPoints[1]
     m_TransformedPoints[0] = m_TransformedPoints[0] - m_TransformedPoints[1]
     m_Distances[0] = m_Distances[0] - m_Distances[1]
     m_IterationPoints[0] = m_IterationPoints[0] - m_IterationPoints[1]
   endfunc
 }
 


Constructor Summary
Standard_TrapModeTwoBase()
           
 
Method Summary
protected  void MoveTrapInfo()
           
 void Result()
          call this to compute final results
protected  void ResultSubtract()
           
 
Methods inherited from class Standard:Standard_TrapModeBase
Init, SetTrapInfo
 
Methods inherited from class common:TrapModeWithThreshold
GetThreshold, SetThreshold, UsesThreshold
 
Methods inherited from class common:TrapMode
GetDistance, GetIteration, GetTexture, GetTransformedPoint, GetUntransformedPoint, IsSolid, Iterate, IterateSilent
 
Methods inherited from class common:Generic
GetParent
 
Methods inherited from class Object
 

Constructor Detail

Standard_TrapModeTwoBase

public Standard_TrapModeTwoBase()
Method Detail

Result

public void Result()
Description copied from class: TrapMode
call this to compute final results

Overrides:
Result in class TrapMode

MoveTrapInfo

protected void MoveTrapInfo()

ResultSubtract

protected void ResultSubtract()