dtTerrain::LCCType Class Reference

#include <lcctype.h>

List of all members.

Public Member Functions

 LCCType (unsigned int index, const std::string &name)
 Constructor.
 ~LCCType ()
 Destructor.
int GetIndex () const
 This returns the index of the lcc type.
void SetRGB (unsigned char red, unsigned char green, unsigned char blue)
 Sets the RGB color value of this type.
void GetRGB (unsigned char &red, unsigned char &green, unsigned char &blue)
 Gets the RGB color identifier for this type.
const std::string & GetLCCName () const
 Gets the LCC name of this type.
void SetSlope (float min, float max, float sharpness)
 
Parameters:
minimum slope

float GetMaxSlope () const
 
Returns:
maximum slope

float GetMinSlope () const
 
Returns:
minimum slope

void SetElevation (float min, float max, float sharpness)
 
Parameters:
minimum elevation

float GetMaxElevation () const
 
Returns:
maximum elevation

float GetMinElevation () const
 
Returns:
minimum elevation

void SetRelativeElevation (float min, float max, float sharpness)
 
Parameters:
minimum elevation

void SetAspect (int aspect)
 
Parameters:
aspect 

float GetAspect () const
 
Returns:
aspect

void AddModel (const std::string &name, float scale=1.0)
 This adds a model to the list of available models for this vegetation type.
void RemoveModel (const std::string &name)
 Removes the LCC model from this LCC type's list of models.
LCCModelGetModel (unsigned int index)
 Retrives the model at the given index.
LCCModelGetModel (const std::string &name)
 Looks up an LCC model on this type by name.
unsigned int GetNumberOfModels () const
 Gets the number of models registered under this LCC type.
void ClearModels ()
 Removes all the LCC models from this LCC type.

Classes

struct  LCCModel
 Describes an LCC's geometric model info. More...


Constructor & Destructor Documentation

dtTerrain::LCCType::LCCType ( unsigned int  index,
const std::string &  name 
)

Constructor.

dtTerrain::LCCType::~LCCType (  )  [inline]

Destructor.


Member Function Documentation

int dtTerrain::LCCType::GetIndex (  )  const [inline]

This returns the index of the lcc type.

Returns:
index of the lcctype as defined lcc configuration data

void dtTerrain::LCCType::SetRGB ( unsigned char  red,
unsigned char  green,
unsigned char  blue 
) [inline]

Sets the RGB color value of this type.

The color value maps the the color defined by the land classification cover image map.

void dtTerrain::LCCType::GetRGB ( unsigned char &  red,
unsigned char &  green,
unsigned char &  blue 
) [inline]

Gets the RGB color identifier for this type.

const std::string& dtTerrain::LCCType::GetLCCName (  )  const [inline]

Gets the LCC name of this type.

Returns:
the name of the LCC type, such as snow, water, evergreen, snow.

void dtTerrain::LCCType::SetSlope ( float  min,
float  max,
float  sharpness 
) [inline]

Parameters:
minimum slope

Parameters:
maximum slope
slope sharpness

float dtTerrain::LCCType::GetMaxSlope (  )  const [inline]

Returns:
maximum slope

float dtTerrain::LCCType::GetMinSlope (  )  const [inline]

Returns:
minimum slope

void dtTerrain::LCCType::SetElevation ( float  min,
float  max,
float  sharpness 
) [inline]

Parameters:
minimum elevation

Parameters:
maximum elevation
elevation sharpness

float dtTerrain::LCCType::GetMaxElevation (  )  const [inline]

Returns:
maximum elevation

float dtTerrain::LCCType::GetMinElevation (  )  const [inline]

Returns:
minimum elevation

void dtTerrain::LCCType::SetRelativeElevation ( float  min,
float  max,
float  sharpness 
) [inline]

Parameters:
minimum elevation

Parameters:
maximum elevation
relative elevation sharpness

void dtTerrain::LCCType::SetAspect ( int  aspect  )  [inline]

Parameters:
aspect 

float dtTerrain::LCCType::GetAspect (  )  const [inline]

Returns:
aspect

void dtTerrain::LCCType::AddModel ( const std::string &  name,
float  scale = 1.0 
)

This adds a model to the list of available models for this vegetation type.

When placing vegetation of this LCC type, a model is randomly chosen from the model list.

Parameters:
name File name of the model.
scale Uniform scaling factor for this model.
Note:
The model is loaded when vegetation is placed.

void dtTerrain::LCCType::RemoveModel ( const std::string &  name  ) 

Removes the LCC model from this LCC type's list of models.

Parameters:
The name of the model. If this name is not found in the list of models, this method does nothing.

LCCType::LCCModel * dtTerrain::LCCType::GetModel ( unsigned int  index  ) 

Retrives the model at the given index.

Parameters:
index An index into the list of models.
Returns:
If index is valid, a pointer to the model is returned, else this method will return NULL.

LCCType::LCCModel * dtTerrain::LCCType::GetModel ( const std::string &  name  ) 

Looks up an LCC model on this type by name.

Parameters:
name The name of the LCC model to retrieve.
Returns:
A valid model or NULL if the model was not found.

unsigned int dtTerrain::LCCType::GetNumberOfModels (  )  const [inline]

Gets the number of models registered under this LCC type.

Returns:
The number of models.

void dtTerrain::LCCType::ClearModels (  )  [inline]

Removes all the LCC models from this LCC type.


http://www.delta3d.org
2.0.0 generated 14 Feb 2008