30 float height,
float shadow_radius,
float shadow_darkness);
37 float m_shadow_radius;
38 float m_shadow_darkness;
56 void AddCommonName(
const char *Name,
const char *Lang = NULL);
57 size_t NumCommonNames()
const {
return m_CommonNames.size(); }
58 CommonName GetCommonName(
int n = 0)
const {
return m_CommonNames[n]; }
62 const char *GetSciName()
const {
return m_szSciName; }
64 void SetMaxHeight(
float f) { m_fMaxHeight = f; }
65 float GetMaxHeight()
const {
return m_fMaxHeight; }
67 virtual void AddAppearance(AppearType type,
const char *filename,
68 float width,
float height,
float shadow_radius,
float shadow_darkness)
71 width, height, shadow_radius, shadow_darkness);
75 uint NumAppearances()
const {
return m_Apps.GetSize(); }
79 std::vector<CommonName> m_CommonNames;
97 void ResetAmounts() { m_amount = 0.0f; m_iNumPlanted = 0; }
100 float m_plant_per_m2;
101 float m_typical_size;
119 void AddPlant(
vtPlantSpecies *pSpecies,
float plant_per_m2,
float typical_size = -1.0f);
137 bool ReadXML(
const char *fname,
vtString *msg = NULL);
138 bool WriteXML(
const char *fname)
const;
139 bool WriteHTML(
const char *fname)
const;
141 uint NumSpecies()
const {
return m_Species.GetSize(); }
144 if (i < m_Species.GetSize())
153 m_Species.
Append(pSpecies);
156 void Clear() { m_Species.
Empty(); }
175 bool ReadXML(
const char *fname,
const vtSpeciesList &species,
177 bool WriteXML(
const char *fname)
const;
180 int NumTypes()
const {
return m_Types.GetSize(); }
181 vtBioType *GetBioType(
int i)
const {
return m_Types[i]; }
182 int FindBiotypeIdByName(
const char *name)
const;
184 void Clear() { m_Types.
Empty(); }
202 void SetPlantList(
vtSpeciesList *list) { m_pPlantList = list; }
203 int AddPlant(
const DPoint2 &pos,
float size,
short species_id);
205 void SetPlant(
int iNum,
float size,
short species_id);
206 void GetPlant(
int iNum,
float &size,
short &species_id)
const;
209 bool ReadVF_version11(
const char *fname);
210 bool ReadVF(
const char *fname);
211 bool ReadSHP(
const char *fname);
212 bool WriteVF(
const char *fname)
const;
221 #endif // VTDATA_PLANTSH