Name | Required | Type | Description | Public |
heightmap | yes | std::string | heightmap used for this terrain, either this or heightdata required, if both are provided, heightdata is used | yes |
heightdata | yes | std::vector<std::vector<double>> | heightdata used for this terrain, either this or heightmap required, if both are provided, heightdata is used | yes |
size | yes | double | expansion of the terrain | yes |
inputScale | yes | double | scale factor for the terrain heights, highest point of heightmap gets this height | yes |
vertices | yes | uint32_t | vertices along an edge, must be 2^n + 1 | yes |
layers | yes | uint32_t | amount of layers on the terrain | yes |
minX | yes | int64_t | minimum X for duplicates of the terrain | yes |
maxX | yes | int64_t | maximum X for duplicates of the terrain | yes |
minY | yes | int64_t | maximum Y for duplicates of the terrain | yes |
maxY | yes | int64_t | maximum Y for duplicates of the terrain | yes |
layer__size | yes | double | size of the texture units for every layer | yes |
layer__diffusespecular | yes | std::string | diffuse and specular map for every layer | yes |
layer__normal | yes | std::string | normal and displacement map for every layer | yes |
layer__minHeight | yes | double | minimum height where this layer shall appear, for every layer except the first | yes |
layer__fadeDist | yes | double | defines how fast the layers are blend over, for every layer except the first | yes |
|
| TerrainAppearanceComponent (const int64_t id, const attributeMap ¶ms) |
|
| ~TerrainAppearanceComponent () |
|
std::string | getHeightmap () const |
| Gets the GameObject's heightmap. More...
|
|
double | getSize () const |
| Gets the GameObject's size. More...
|
|
void | setHeightAtPosition (size_t x, size_t z, double height) |
| sets the height at a defined position in the terrain coordinates in vertices More...
|
|
void | setHeightAtPosition (const Vec3 &pos, double height) |
| sets the height at a defined position in the terrain position is a real world position More...
|
|
double | getHeightAtPosition (size_t x, size_t z) const |
| gets the height at a defined position in the terrain coordinates in vertices More...
|
|
double | getHeightAtPosition (const Vec3 &pos) const |
| gets the height at a defined position in the terrain position is a real world position More...
|
|
void | saveCollisionShape (const std::string &outFile, const std::function< void(void)> &cb) |
| saves collision shape as bullet collisionshape to given file calls callback after collision shape was exported More...
|
|
attributeMap | synchronize () const override |
| synchronizes the Components state More...
|
|
std::string | getTemplateName () const override |
| returns the name this template was registered with More...
|
|
std::vector< componentOptions > | getComponentOptions () override |
| returns a vector containing all options of the Component being readable and writeable in the editor More...
|
|
| Component () |
| Constructor for Component. More...
|
|
| Component (const int64_t id, const attributeMap ¶ms) |
| Constructor for Component. More...
|
|
virtual | ~Component () |
| Destructor of Component. Must be implemented in derived class. More...
|
|
void | setOwnerGO (const WeakGOPtr &objGo) |
| Sets the GameObject that owns this Component. More...
|
|
GOPtr | getOwnerGO () |
| Get the GameObject that owns this Component. More...
|
|
uint32_t | getComponentID () const |
| Returns the component identification string. More...
|
|
uint32_t | getFamilyID () const |
| Returns the family identification string. More...
|
|
std::string | getIdentifier () const |
| Returns the family identification string. More...
|
|
virtual void | Tick () |
| Components can have Tick method like normal Subsystems this method is called by the ObjectController during every Tick if the component registered itself at the ObjectFacade. More...
|
|
void | setDie () const |
| component will be deleted soon More...
|
|
int64_t | getID () const |
| returns the id of the component More...
|
|
virtual void | News (const GameMessage::Ptr &msg) |
| Receives messages for this component override this function, if you expect messages. More...
|
|
void | setSync (bool b) |
| sets whether this object has to be synchronized or not More...
|
|
bool | getSync () const |
|
void | enableTicking (bool allowTicking) const |
| triggers doEnableTicking threadsafe More...
|
|
virtual std::pair< AddStrategy, int64_t > | howToAdd (const ComPtr &comp) const |
| asks, how to handle a new component with the same type More...
|
|
void | setSelf (const WeakComPtr &self) |
| sets weak_ptr on self for registration of ticker More...
|
|
std::vector< ComPtr > | getSubComponents () const |
| returns all SubComponents attached to this Component More...
|
|
Tells the engine what heightmap and texture to use when rendering the GameObject. For creating a TerrainAppearanceComponent, these keys are possible:
Name | Required | Type | Description | Public |
heightmap | yes | std::string | heightmap used for this terrain, either this or heightdata required, if both are provided, heightdata is used | yes |
heightdata | yes | std::vector<std::vector<double>> | heightdata used for this terrain, either this or heightmap required, if both are provided, heightdata is used | yes |
size | yes | double | expansion of the terrain | yes |
inputScale | yes | double | scale factor for the terrain heights, highest point of heightmap gets this height | yes |
vertices | yes | uint32_t | vertices along an edge, must be 2^n + 1 | yes |
layers | yes | uint32_t | amount of layers on the terrain | yes |
minX | yes | int64_t | minimum X for duplicates of the terrain | yes |
maxX | yes | int64_t | maximum X for duplicates of the terrain | yes |
minY | yes | int64_t | maximum Y for duplicates of the terrain | yes |
maxY | yes | int64_t | maximum Y for duplicates of the terrain | yes |
layer__size | yes | double | size of the texture units for every layer | yes |
layer__diffusespecular | yes | std::string | diffuse and specular map for every layer | yes |
layer__normal | yes | std::string | normal and displacement map for every layer | yes |
layer__minHeight | yes | double | minimum height where this layer shall appear, for every layer except the first | yes |
layer__fadeDist | yes | double | defines how fast the layers are blend over, for every layer except the first | yes |
Definition at line 55 of file TerrainAppearanceComponent.h.