Arches 1.0
Public Member Functions | Static Public Attributes | Protected Attributes | Friends | List of all members
MaterialBox Class Reference

This class implements a material layer for the terrain representation. More...

#include <arches.h>

Public Member Functions

 MaterialBox (int=0, int=0, TypeMater=MaterialBox::AIR)
 Creates a material layer given minimum and maximum heights and a material type. More...
 
 ~MaterialBox ()
 Empty.
 
void SetMaterial (TypeMater)
 Changes the material type of a layer. More...
 
void SetA (int)
 Set the minimum height of a layer. More...
 
void SetB (int)
 Set the maximal height of a layer. More...
 
int GetAB () const
 Compute the thickness of a layer.
 
TypeMater GetMaterial () const
 Get the material type of a layer.
 
int GetB () const
 Get the maximum height of a layer.
 
int GetA () const
 Get the minimum height of a layer.
 

Static Public Attributes

static const TypeMater ROCK = 0
 Bedrock.
 
static const TypeMater SAND = 1
 Sand.
 
static const TypeMater EARTH = 2
 Soil.
 
static const TypeMater STONE = 3
 Stones.
 
static const TypeMater WATER = 4
 Water.
 
static const TypeMater SNOW = 5
 Snow.
 
static const TypeMater AIR = 7
 Air.
 

Protected Attributes

TypeMater t
 Material type.
 
int a
 Minimum height span.
 
int b
 Maximum height span.
 

Friends

class MaterialStack
 

Detailed Description

This class implements a material layer for the terrain representation.

Constructor & Destructor Documentation

◆ MaterialBox()

MaterialBox::MaterialBox ( int  a = 0,
int  b = 0,
TypeMater  type = MaterialBox::AIR 
)
inline

Creates a material layer given minimum and maximum heights and a material type.

Parameters
a,bMinimum and maximum height span.
typeMaterial type.

Member Function Documentation

◆ SetA()

void MaterialBox::SetA ( int  a)
inline

◆ SetB()

void MaterialBox::SetB ( int  b)
inline

◆ SetMaterial()

void MaterialBox::SetMaterial ( TypeMater  type)
inline