1#ifndef SMALLCHANGE_SCENERY_H
2#define SMALLCHANGE_SCENERY_H
27#include <Inventor/SbBasic.h>
28#include <Inventor/nodes/SoSubNode.h>
29#include <Inventor/nodes/SoShape.h>
30#include <Inventor/actions/SoCallbackAction.h>
31#include <Inventor/fields/SoSFString.h>
32#include <Inventor/fields/SoSFBool.h>
33#include <Inventor/fields/SoSFEnum.h>
34#include <Inventor/fields/SoSFFloat.h>
35#include <Inventor/fields/SoSFShort.h>
36#include <Inventor/fields/SoMFInt32.h>
37#include <Inventor/fields/SoMFFloat.h>
39#include <SmallChange/basic.h>
41typedef struct ss_system ss_system;
42typedef struct ss_render_pre_cb_info ss_render_pre_cb_info;
44typedef uint32_t SmSceneryTexture2CB(
void *
closure,
double *
xypos,
float elevation,
double * spacing);
53 static void initClass(
void);
55 static SmScenery * createInstance(
double *
origo,
double * spacing,
int * elements,
float * values,
const float undefval = 999999.0f);
59 static SmScenery * createCrossAndLineInstance(
double *
min,
double * spacing,
int * elements);
90 void preFrame(uint32_t glcontextid);
91 int postFrame(uint32_t glcontextid);
93 void setBlockRottger(
const float c);
94 float getBlockRottger(
void)
const;
95 void setLoadRottger(
const float c);
96 float getLoadRottger(
void)
const;
98 void setVertexArraysRendering(
const SbBool
onoff);
99 SbBool getVertexArraysRendering(
void)
const;
101 SbVec3f getRenderCoordinateOffset(
void)
const;
102 SbVec2f getElevationRange(
void)
const;
103 SbVec2f getDatasetElevationRange(
int dataset)
const;
105 void set2DColorationTextureCB(SmSceneryTexture2CB * callback,
void *
closure);
108 static uint32_t colortexture_cb(
void * node,
double *
xypos,
float elevation,
double * spacing);
113 SbBool getElevation(
const double x,
const double y,
float &
elev);
115 void getSpacingForLodlevel(
int lodlevel,
double * spacing)
const;
116 float getUndefElevationValue(
void)
const;
118 int addElevationDataset(
const char * name);
119 int addMaterialDataset(
const char * name, uint32_t color);
122 int deleteElevationDataset(
int datasetid);
133 void refreshTextures(
const int id);
134 void * getScenerySystemHandle();
146 SoSFBool colorTexture;
149 friend class SceneryP;
Definition misc/SbList.h:69
The SmScenery class is a Coin node interface to the SIM Scenery library.
Definition SmScenery.h:48
SoSFBool visualDebug
Show information designed for debugging purposes on the viewport.
Definition SmScenery.h:85
SoMFFloat colorMap
A table of colors to use for coloring the terrain, starting with the color of the lowest elevations,...
Definition SmScenery.h:76
SoSFFloat elevationLineThickness
Make elevation lines this thick.
Definition SmScenery.h:83
SoSFFloat loadRottger
The rottger formula constant for deciding the LOD level of blocks as you remove yourself from the foc...
Definition SmScenery.h:65
SoSFFloat blockRottger
The rottger factor for tessellating the surface of a terrain block.
Definition SmScenery.h:64
SoSFFloat elevationLineOffset
Offset the elevation lines with this value.
Definition SmScenery.h:81
SoMFFloat colorElevation
A table of elevation values, which will decide where the colors given in colorMap will kick in.
Definition SmScenery.h:77
SoSFString filename
The filename for a SIM Scenery database.
Definition SmScenery.h:63
SoSFEnum colorTexturing
Decides whether or not the values of colorMap and colorElevation (optional) should be used to generat...
Definition SmScenery.h:75
SoSFShort elevationLineEmphasis
Emphasize every Nth elevation line.
Definition SmScenery.h:82
SoSFFloat elevationLineDistance
The elevation distance between elevation lines.
Definition SmScenery.h:80
SoSFBool elevationLines
Whether or not the elevation lines feature should be used.
Definition SmScenery.h:79
SoMFInt32 renderSequence
The description of how datasets in the SIM Scenery database should be merged before being rendered.
Definition SmScenery.h:67