📄 cogelevationtest.html
字号:
<TITLE>COG 1.0 - cogelevation.hxx</TITLE>
<H1>Test Example for Elevation Map</H1>
<PRE>
#include "cogelevation.hxx"
#include "cog1d.hxx"
</PRE>
<P>We use here an elevation map - the ppm-file <A
HREF="test/elevation.ppm">test/elevation.ppm</A>. In this file, the color
encodes a short integer which defines the elevation of the grand
canyon in meter.
<P>The class <B>CogeometryElevationMap</B> allows to read this file
and defines the function
<BLOCKQUOTE>
<B>f(x,y,z) = z - elevation(x,y)</B>
</BLOCKQUOTE>
appropriately scaled. This function is used to define a geometry using
the scheme similar to <A HREF="cogfunctiontest.html#Function">
CogeometrySimpleFunction</A>. For the
<PRE>
cogeometry test_cogeometry()
{cogeometry geom1D; CogeometryElevationMap *map;
geom1D = new <A HREF="cog1dtest.html">Cogeometry1D</A>(0.0,1.0,5,wzRegion(2));
map = new CogeometryElevationMap("cog/elevationinput.ppm",geom1D);
cogFloat xmin=0,xmax=1,ymin=0,ymax=1;
cogFloat hmin= 700, hmax=4000; // boundaries for elevation in meter
map->setOrigin(xmin,ymin,hmin);
map->setSize(xmax-xmin,ymax-ymin,hmax-hmin);
return map;
}
</PRE>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -