Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

12046 Posts in 1593 Topics- by 596 Members - Latest Member: anntonioo

19. May 2013, 06:51:34 pm
Xith3D CommunityXith3D InternalsDeveloper discussion (Moderators: Marvin Fröhlich, 'n ddrylliog)PickResult distances
Pages: [1]
Print
Author Topic: PickResult distances  (Read 1068 times)
Mathias 'cylab' Henze
Fierce Warrior
****
Offline Offline

Posts: 540

1064620
View Profile WWW
« on: 06. May 2008, 11:42:44 am »

There are three distances in the PickResult object and all of them give rather moonish results when picking. I fixed the minimum distance by changing the Triangle intersection code in openmali, but the other two still are way too big. Is there something with this values I don't understand or is this a bug? Can somebody with in depth knowledge explain how these values are computed and how they should be interpreted or help me to track down the locations that needs to be changed if this is a bug?
« Last Edit: 06. May 2008, 11:45:09 am by Mathias 'cylab' Henze » Logged

Mathias 'cylab' Henze
Fierce Warrior
****
Offline Offline

Posts: 540

1064620
View Profile WWW
« Reply #1 on: 06. May 2008, 11:54:05 am »

Hmm. I answer myself. Seems that all distances are squared.
Logged

Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4403


May the 4th, be with you...


View Profile
« Reply #2 on: 06. May 2008, 12:13:41 pm »

Hmm. I answer myself. Seems that all distances are squared.

That might be true. Then please don't just fix all three values to non-squared ones, but add a mechanism to only convert them to non-squared when needed, since square-root is quite expensive.

Marvin
Logged
Mathias 'cylab' Henze
Fierce Warrior
****
Offline Offline

Posts: 540

1064620
View Profile WWW
« Reply #3 on: 06. May 2008, 12:54:48 pm »

Actually the distance is explicitely squared int the triangle intersection code like return( d*d ) Smiley But I stay with squared distances for now, since changing them would also affect the move-code in the selection framework and maybe other subsystems, too.
Logged

Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic