A terraformer is something that implements the interface iTerraFormer.
Currently there is only one plugin in CS that implements this and that
is the simpleformer plugin which can read heightmap files for the
landscape engine. This simpleformer terraformer plugins is used by
maps like terrainf and terrain. The terraformer is responsible for
producing the data that the terrain engine needs. If you want to get
data for the terrain engine that comes from another source (i.e. other
then a heightmap image) then you can write your own implementation of
the iTerraFormer plugin (and also iTerraSampler). In that
implementation you can produce the data for the terrain engine from
any kind of input you want.

Another (perhaps easier) solution is to just use the existing
simpleformer plugin. It has a method
iSimpleFormerState->SetHeightmap() which accepts an iImage as input
(for getting the heightmap data from). There is a csImageMemory class
which you can use to create an iImage directly from memory data. You
can convert your 2D array to an csImageMemory instance and then give
the resulting image to the SetHeightmap() function.

Greetings,

Greetings,

On 1/4/06, Ludger Steens <[EMAIL PROTECTED]> wrote:
> Hi,
> I simply want to create a terrain mesh from a 2d array of integers and
> it turned out to be not as simple as I thought.
> I got a little bit confused with what the difference between a terrain
> sampler, a terrain mesh and a terraformer.
>
> So far I have loaded the plugin:
> "crystalspace.mesh.object.terrain.bruteblock",
> created a new mesh factory from the  iMeshObjectType,
> created a new terrain mesh from the factory and
> created a new mesh wrapper for the terrain mesh.
>
> When I start the program it crashes at the line
> i_engine->Prepare ();
> because i didn't set a terraformer for my mesh object.
>
> What the hell is a terraformer, a terrain sampler an how do I use them?
> And how to create the terrain from a 2d array?
> Thanks a lot,
>
> Ludger
>
>
>
> *By the way: The section in the CS manual about terrain meshes is
> outdated (like most of the manual which is by far to short !!!! )*
>
> **
>
> **
>
> **
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> _______________________________________________
> Crystal-main mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/crystal-main
> Unsubscribe: mailto:[EMAIL PROTECTED]
>


--
Project Manager of Crystal Space (http://www.crystalspace3d.org)
and CEL (http://cel.crystalspace3d.org)
Support Crystal Space. Donate at
https://sourceforge.net/donate/index.php?group_id=649


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
Crystal-main mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/crystal-main
Unsubscribe: mailto:[EMAIL PROTECTED]

Reply via email to