Skip to content

Commit

Permalink
Fix #42: sampling bug in egs_shape_collection
Browse files Browse the repository at this point in the history
The shape getPoint() method returns a point in the shape WITHOUT
applying its affine transformation. The shape collection must instead
call the getRandomPoint() method which applies the transformations
defined for each shape.
  • Loading branch information
ftessier committed Feb 25, 2016
1 parent cbf4bc9 commit 2d2d41d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class EGS_SHAPE_COLLECTION_EXPORT EGS_ShapeCollection : public EGS_BaseShape {
};
EGS_Vector getPoint(EGS_RandomGenerator *rndm) {
int j = table->sampleBin(rndm);
return shapes[j]->getPoint(rndm);
return shapes[j]->getRandomPoint(rndm);
};

bool supportsDirectionMethod() const {
Expand Down

0 comments on commit 2d2d41d

Please sign in to comment.