Author Topic: Does scale affect the Ray-detection?  (Read 1822 times)

Offline kiffa

  • long
  • ***
  • Posts: 199
    • View Profile
Does scale affect the Ray-detection?
« on: November 05, 2013, 04:32:51 am »
Code: [Select]
mRoad.scale(5);
SimpleVector d = new SimpleVector(0, -1, 0);
float frontHeight = mRoad.calcMinDistance(front, d, 100 * 30);
mRoad.setScale(1);

Code: [Select]
SimpleVector d = new SimpleVector(0, -1, 0);
float frontHeight = mRoad.calcMinDistance(front, d, 100 * 30);

Are the 2 codes above equal or not?  What's the situation when invoking mRoad.enableLazyTransformations()?
« Last Edit: November 05, 2013, 05:27:15 am by kiffa »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Does scale affect the Ray-detection?
« Reply #1 on: November 05, 2013, 10:27:09 am »
No, they are not equivalent. The result might be the same if the scale doesn't change the height of the road but in any other cases, the scale will affect the outcome.
Lazy transformations don't change the outcome.