Re: [CrystalSpace] #982: terrain2 collider tries to call GetHeight() when height data not loaded

"CrystalSpace" <[email protected]> Mon, 01 Jul 2013 16:01:36 -0000
Newsgroups gmane.comp.graphics.crystalspace.tracker
Message-ID <[email protected]>
#982: terrain2 collider tries to call GetHeight() when height data not loaded
---------------------------+------------------------------------------------
 Reporter:  ralphcampbell  |       Owner:  kickvb  
     Type:  defect         |      Status:  accepted
 Priority:  major          |   Milestone:          
Component:  libs           |     Version:  V2.1    
 Keywords:                 |  
---------------------------+------------------------------------------------

Comment(by kickvb):

 Side note: the backtrace you sent is not complete and the relation between
 it and your fix doesn't appear clearly although it is much probably
 related.

 My main problem is that there isn't only the method
 iTerrainCell::CollideSegment() that is concerned, but also all other
 collision methods in csTerrainSystem and csTerrainCell, and potentially
 many other methods in those two classes that access in some way the cell's
 data.

 I attached another patch I propose to fix this, but I'm not sure that it
 wouldn't be better to check for the load state within csTerrainSystem
 rather than in csTerrainCell. There is for example r30832 that added this
 check within csTerrainSystem::CollideTriangles().

 In both cases, there is a problem:
 - if we force to load all cells whenever a collision or other data access
 is made, then we loose the benefit of loading the cells separately.
 - if we ignore the cells that are not loaded when doing collision tests or
 other data access, then we might end with incomplete functionalities, eg
 with the mesh generator not working for terrain cells that are not loaded
 at startup.

 Some opinion?

-- 
Ticket URL: <http://www.crystalspace3d.org/trac/CS/ticket/982#comment:2>
CrystalSpace <http://www.crystalspace3d.org/>
Free open-source 3D SDK.
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev