Changeset 2001 for GTP/trunk/Lib/Vis/Preprocessing/src/Mutation.h
- Timestamp:
- 01/20/07 14:03:37 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/Mutation.h
r1997 r2001 47 47 // halton sequence for generatin gmutations of this ray 48 48 VssRay *mRay; 49 int mMutations;50 int mUnsuccessfulMutations;49 short mMutations; 50 short mUnsuccessfulMutations; 51 51 HaltonSequence mHalton; 52 52 float mImportance; 53 53 float mCdf; 54 54 55 Vector3 mutatedOrigin; 56 Vector3 mutatedTermination; 57 55 58 float GetSamplingFactor() const { return mMutations/mImportance; } 56 59 RayEntry() {} … … 59 62 mUnsuccessfulMutations(0), 60 63 mHalton(), 61 mImportance(1.0f) {} 64 mImportance(1.0f) 65 { 66 ResetReverseMutation(); 67 } 68 69 void ResetReverseMutation() { 70 mutatedOrigin = mutatedTermination = Vector3(0,0,0); 71 } 72 bool HasReverseMutation() const { 73 return !(mutatedOrigin == mutatedTermination); 74 } 75 76 void SetReverseMutation(const Vector3 &a, const Vector3 &b) { 77 mutatedOrigin = a; 78 mutatedTermination = b; 79 } 80 62 81 }; 63 82 64 83 65 84 Vector3 … … 90 109 ); 91 110 111 112 bool 113 ComputeReverseMutation( 114 const VssRay &oldRay, 115 const VssRay &newRay, 116 Vector3 &origin, 117 Vector3 &termination 118 ); 119 92 120 RayEntry &GetEntry(const int index) { 93 121 return mRays[(mBufferStart+index)%mRays.size()];
Note: See TracChangeset
for help on using the changeset viewer.