gazebosim / gazebosim/gz-rendering

Minor inconcistency in naming origin vs center (documentation)

Open
#380 1 comment 1 reaction 0 assignees View on GitHub
bug documentation help wanted
Dominant language
C++
Stars
81
Forks
90
Avg merge
1d 13h
Merged PRs (30d)
10

Description

## Environment
* OS Version: Any
* Source or binary build?
Source: main branch, but should be all so far

## Description

The variable HeightmapDescriptor::Position documentation reads:

```
/// \brief Get the heightmap's position offset.
/// \return The heightmap's position offset.
```

Offset is really vague, as it is a relative term, not absolute. It doesn't really tell us anything about Position.

However the documentation for `ignition::rendering::HeightmapDescriptorPrivate::position` reads:
```
/// \brief Heightmap XYZ origin in meters.
```

Origin usually means the start, i.e. the top-left most corner of the terrain (or bottom right, or whatever convention it's using; but it goes from 0, 0 to width, height i.e. in the positive direction of the axes).

However as I've been porting Ogre2Heightmap, I noticed that position actually contains:

```
xy = center
z = origin
```

Documentation should probably clarify this, unless there's a bug in the code (I doubt that because everything Terrain-related would be broken)

Documentation should also clarify that z is origin in a "sea-level" kind of origin, i.e. if the heightmap contains negative height values, then those heights will be _below_ Position().Z

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.