1. Anders Ruud
  2. love
  3. Issues


Issue #632 resolved

Is there a better name for Source:get/setDistance?

created an issue

I'm not sure if Source:setDistance is such a meaningful name for what it does. It kind of translates to "set the distance of the Source", which doesn't really make sense.

How about Source:setAttenuationDistance? It's long and difficult to read and difficult to remember how to spell, but hey, there is also ParticleSystem:setTangentialAcceleration. :D I think it's at least descriptive though.

If that sounds good, perhaps setDistanceModel could be renamed to setAttenuationModel? It's maybe kind of more descriptive I think, and it would match setAttenuationDistance.

Comments (4)

  1. hahawoo reporter

    They do? Isn't the distance to the listener just the distance between the listener and Source positions, as set by their setPosition functions?

    As far I know, the reference and maximum distance set by setDistance, along with the attenuation model set by setDistanceModel, determines how much the volume of a Source is attenuated at some distance from the listener: http://books.google.com/books?id=xtrEvAdSOWEC&pg=P433

    (Also, what's known in LÖVE as a "distance model" is called an "attenuation model" on this page: http://books.google.com/books?id=xtrEvAdSOWEC&pg=P428)

  2. Log in to comment