25 #ifndef __I6ENGINE_API_TERRAINAPPEARANCECOMPONENT_H__
26 #define __I6ENGINE_API_TERRAINAPPEARANCECOMPONENT_H__
68 inline double getSize()
const {
return _size; }
74 void setHeightAtPosition(
size_t x,
size_t z,
double height);
80 void setHeightAtPosition(
const Vec3 & pos,
double height);
86 double getHeightAtPosition(
size_t x,
size_t z)
const;
92 double getHeightAtPosition(
const Vec3 & pos)
const;
98 void saveCollisionShape(
const std::string & outFile,
const std::function<
void(
void)> & cb);
106 return "TerrainAppearance";
109 std::vector<componentOptions> getComponentOptions()
override;
112 std::string _heightmap;
113 std::vector<std::vector<double>> _heightdata;
117 std::vector<std::tuple<double, std::string, std::string, double, double>> _layers;
123 void Init()
override;
125 void Finalize()
override;
127 void sendUpdateMessage();
129 void convertPositionToVertex(
const Vec3 & pos,
size_t & x,
size_t & z)
const;
#define ISIXE_MODULES_API
std::map< std::string, std::string > attributeMap
Implements 3-dimensional vectors.
double getSize() const
Gets the GameObject's size.
std::string getHeightmap() const
Gets the GameObject's heightmap.
std::string getTemplateName() const override
returns the name this template was registered with
Tells the engine what heightmap and texture to use when rendering the GameObject. For creating a Terr...
Component Base Class. All Components must derive from Component.