|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object common:Generic common:TrapMode common:TrapModeWithThreshold Standard:Standard_TrapModeBase Standard:Standard_TrapModeAverage
class
class Standard_TrapModeAverage(Standard_TrapModeBase) { public: func Init(complex pz) Standard_TrapModeBase.Init(pz) fTrapCount = 0 endfunc func Iterate(complex pz, complex pzt, float pdistance, float ptexture) Standard_TrapModeBase.Iterate(pz, pzt, pdistance, ptexture) if pdistance < m_Threshold SetTrapInfo(0, m_UntransformedPoints[0] + pz, \ m_TransformedPoints[0] + pzt, m_Distances[0] + pdistance) fTrapCount = fTrapCount + 1 m_Solid = false endif endfunc func Result() ; Like the original, this doesn't test whether fTrapCount is 0. m_UntransformedPoints[0] = m_UntransformedPoints[0] / fTrapCount m_TransformedPoints[0] = m_TransformedPoints[0] / fTrapCount m_Distances[0] = m_Distances[0] / fTrapCount endfunc private: int fTrapCount default: title = "Average" }
Constructor Summary | |
---|---|
Standard_TrapModeAverage()
|
Method Summary | |
---|---|
void |
Init(complex pz)
Calls the inherited Init() and also sets m_Solid to true because this is the initial condition for most trap modes. |
void |
Iterate(complex pz,
complex pzt,
float pdistance,
float ptexture)
call this for each point |
void |
Result()
call this to compute final results |
Methods inherited from class Standard:Standard_TrapModeBase |
---|
SetTrapInfo |
Methods inherited from class common:TrapModeWithThreshold |
---|
GetThreshold, SetThreshold, UsesThreshold |
Methods inherited from class common:TrapMode |
---|
GetDistance, GetIteration, GetTexture, GetTransformedPoint, GetUntransformedPoint, IsSolid, IterateSilent |
Methods inherited from class common:Generic |
---|
GetParent |
Methods inherited from class Object |
---|
|
Constructor Detail |
---|
public Standard_TrapModeAverage()
Method Detail |
---|
public void Init(complex pz)
Standard_TrapModeBase
Init
in class Standard_TrapModeBase
public void Iterate(complex pz, complex pzt, float pdistance, float ptexture)
TrapMode
Iterate
in class TrapMode
public void Result()
TrapMode
Result
in class TrapMode
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |