Represents a single spatial instance (tree, rock, prop) with position, class identifier, and radius.
More...
#include <scatter_item.hpp>
|
| | ScatterItem ()=default |
| | Default constructor initializing item at origin.
|
| | ScatterItem (const glm::vec3 &position, uint32_t class_id=0, float radius=HMAP_DEFAULT_SCATTER_RADIUS) |
| | Constructs a ScatterItem from 3D position, class_id, and radius.
|
| | ScatterItem (const glm::vec2 &position_2d, uint32_t class_id=0, float radius=HMAP_DEFAULT_SCATTER_RADIUS) |
| | Constructs a ScatterItem from 2D position (z = 0), class_id, and radius.
|
| | ScatterItem (float x, float y, float z=0.0f, uint32_t class_id=0, float radius=HMAP_DEFAULT_SCATTER_RADIUS) |
| | Constructs a ScatterItem from coordinate components.
|
| Point | to_point () const |
| | Converts the item to a 2D Point (x, y) with value set to radius.
|
| std::string | to_string () const |
| | Returns a formatted string representation of the item.
|
| glm::vec2 | to_vec2 () const |
| | Converts the item position to glm::vec2 (x, y).
|
| glm::vec3 | to_vec3 () const |
| | Converts the item position to glm::vec3 (x, y, z).
|
| bool | operator== (const ScatterItem &other) const |
| bool | operator!= (const ScatterItem &other) const |
|
| glm::vec3 | position = {0.f, 0.f, 0.f} |
| | 3D spatial position (x, y, elevation z).
|
| uint32_t | class_id = 0 |
| | Unique category/class identifier (species, rock type, prop class).
|
| float | radius = HMAP_DEFAULT_SCATTER_RADIUS |
| | Characteristic radius.
|
Represents a single spatial instance (tree, rock, prop) with position, class identifier, and radius.
◆ ScatterItem() [1/4]
| hmap::ScatterItem::ScatterItem |
( |
| ) |
|
|
default |
Default constructor initializing item at origin.
◆ ScatterItem() [2/4]
| hmap::ScatterItem::ScatterItem |
( |
const glm::vec3 & | position, |
|
|
uint32_t | class_id = 0, |
|
|
float | radius = HMAP_DEFAULT_SCATTER_RADIUS ) |
Constructs a ScatterItem from 3D position, class_id, and radius.
- Parameters
-
| position | 3D coordinates (x, y, z). |
| class_id | Class / category identifier. |
| radius | Characteristic radius. |
◆ ScatterItem() [3/4]
| hmap::ScatterItem::ScatterItem |
( |
const glm::vec2 & | position_2d, |
|
|
uint32_t | class_id = 0, |
|
|
float | radius = HMAP_DEFAULT_SCATTER_RADIUS ) |
Constructs a ScatterItem from 2D position (z = 0), class_id, and radius.
- Parameters
-
| position_2d | 2D coordinates (x, y). |
| class_id | Class / category identifier. |
| radius | Characteristic radius. |
◆ ScatterItem() [4/4]
| hmap::ScatterItem::ScatterItem |
( |
float | x, |
|
|
float | y, |
|
|
float | z = 0.0f, |
|
|
uint32_t | class_id = 0, |
|
|
float | radius = HMAP_DEFAULT_SCATTER_RADIUS ) |
Constructs a ScatterItem from coordinate components.
- Parameters
-
| x | The x-coordinate. |
| y | The y-coordinate. |
| z | The elevation / z-coordinate. |
| class_id | Class / category identifier. |
| radius | Characteristic radius. |
◆ to_point()
| Point hmap::ScatterItem::to_point |
( |
| ) |
const |
Converts the item to a 2D Point (x, y) with value set to radius.
- Returns
- Point Point representation.
◆ to_string()
| std::string hmap::ScatterItem::to_string |
( |
| ) |
const |
Returns a formatted string representation of the item.
- Returns
- std::string Formatted string with item properties.
◆ to_vec2()
| glm::vec2 hmap::ScatterItem::to_vec2 |
( |
| ) |
const |
Converts the item position to glm::vec2 (x, y).
- Returns
- glm::vec2 The 2D coordinates.
◆ to_vec3()
| glm::vec3 hmap::ScatterItem::to_vec3 |
( |
| ) |
const |
Converts the item position to glm::vec3 (x, y, z).
- Returns
- glm::vec3 The 3D coordinates.
◆ operator==()
| bool hmap::ScatterItem::operator== |
( |
const ScatterItem & | other | ) |
const |
◆ operator!=()
| bool hmap::ScatterItem::operator!= |
( |
const ScatterItem & | other | ) |
const |
◆ position
| glm::vec3 hmap::ScatterItem::position = {0.f, 0.f, 0.f} |
3D spatial position (x, y, elevation z).
◆ class_id
| uint32_t hmap::ScatterItem::class_id = 0 |
Unique category/class identifier (species, rock type, prop class).
◆ radius
| float hmap::ScatterItem::radius = HMAP_DEFAULT_SCATTER_RADIUS |
The documentation for this class was generated from the following files: