#145: Uncaught exception on importing a terrain heightmap

0 views
Skip to first unread message

Cafu Trac

unread,
Oct 20, 2014, 8:04:05 AM10/20/14
to cafu...@googlegroups.com
#145: Uncaught exception on importing a terrain heightmap
---------------------+----------------------
Reporter: Carsten | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: other | Version: svn-head
Keywords: | Platform:
---------------------+----------------------
As reported at http://www.cafu.de/forum/viewtopic.php?f=9&t=1659, the
importing of terrain heightmaps with incorrect dimensions raises an
exception that we don't handle.

The correct behavior is to display a helpful error message instead.

--
Ticket URL: <http://trac.cafu.de/ticket/145>
Cafu 3D Game and Graphics Engine <http://www.cafu.de>
The open-source game engine and graphics engine for multiplayer, cross-platform, real-time 3D action.

Cafu Trac

unread,
Nov 11, 2014, 5:43:56 AM11/11/14
to cafu...@googlegroups.com
#145: Uncaught exception on importing a terrain heightmap
----------------------+---------------------------------------------
Reporter: Carsten | Owner: Carsten Fuchs <carsten.fuchs@…>
Type: defect | Status: closed
Priority: normal | Milestone:
Component: other | Version: svn-head
Resolution: fixed | Keywords:
Platform: |
----------------------+---------------------------------------------
Changes (by Carsten Fuchs <carsten.fuchs@…>):

* owner: => Carsten Fuchs <carsten.fuchs@…>
* status: new => closed
* resolution: => fixed


Comment:

In [changeset:"8485927c5ed7590361bad48928dbd551708a8e0b/git"]:
{{{
#!CommitTicketReference repository="git"
revision="8485927c5ed7590361bad48928dbd551708a8e0b"
Map Editor: Revise the loading/importing of heightmaps into terrains.

The new code is more robust and provides an error message explaining the
problem rather than leaving the exception unhandled.

In the future, we should consider refactoring the whole heightmap-related
code,
e.g. moving it into an explicit, commonly used `HeightmapT` class that
loads,
"validates" and keeps the heightmap data from which new terrains can be
constructed or existing terrains be updated (this would also eliminate the
duplication of the `TerrainT`'s loading and validating code in
`MapTerrainT`).

Fixes #145.
}}}

--
Ticket URL: <http://trac.cafu.de/ticket/145#comment:1>
Reply all
Reply to author
Forward
0 new messages