Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Opened 15 years ago

Closed 15 years ago

#329 closed enhancement (fixed)

Improve get2DViewdirection

Reported by: rgrieder Owned by: nobody
Priority: minor Milestone:
Component: misc Version:
Keywords: performance Cc:
Referenced By: References:

Description

The function mentioned can be found in util/Math.cc line 123. It uses only Vector3 as input/output, but makes heavy use of sin, cos and acos functions. This is quite expensive considering performance (tested with a profiler).
What can you do? According to my experience with such problems, you can always replace the of the triangular functions with standard operations and square roots given that neither input nor output contains any angle values (which is the case here).

Change History (2)

comment:1 Changed 15 years ago by scheusso

replaced acos, cos and sin through sqrt and *

if you like my solution you are welcome to close this ticket ;)

comment:2 Changed 15 years ago by scheusso

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.