vtdata library
|
Public Member Functions | |
vtPlantSpecies & | operator= (const vtPlantSpecies &v) |
void | AddCommonName (const char *Name, const char *Lang=NULL) |
size_t | NumCommonNames () const |
CommonName | GetCommonName (int n=0) const |
uint | CommonNamesOfLanguage (const char *lang) |
void | SetSciName (const char *szSciName) |
const char * | GetSciName () const |
void | SetMaxHeight (float f) |
float | GetMaxHeight () const |
virtual void | AddAppearance (AppearType type, const char *filename, float width, float height, float shadow_radius, float shadow_darkness) |
uint | NumAppearances () const |
vtPlantAppearance * | GetAppearance (int i) const |
Protected Attributes | |
std::vector< CommonName > | m_CommonNames |
vtString | m_szSciName |
float | m_fMaxHeight |
vtArray< vtPlantAppearance * > | m_Apps |
A species consists of a scientific name, any number of common names, and any number of appearances.
void vtPlantSpecies::AddCommonName | ( | const char * | Name, |
const char * | Lang = NULL |
||
) |
Set the common name for this species. Language is options.
Name | The common name in UTF-8. Example: "Colorado Blue Spruce". |
Lang | The language, as a lower-case two-character ISO 639 standard language code. Examples: en for English, de for German, zh for Chinese. The default is English. |
uint vtPlantSpecies::CommonNamesOfLanguage | ( | const char * | lang | ) |
Return the number of common names of this species in a given language. Language is a two-letter ISO 639 code, e.g. "fr" for French.
void vtPlantSpecies::SetSciName | ( | const char * | SciName | ) |
Set the scientific name for this species, as a plain ASCII string. It should have the standard form with the genus capitolized, e.g. "Cocos nucifera"