gz-rendering icon indicating copy to clipboard operation
gz-rendering copied to clipboard

Minor inconcistency in naming origin vs center (documentation)

Open darksylinc opened this issue 4 years ago • 1 comments

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

darksylinc avatar Aug 14 '21 17:08 darksylinc

xy = center
z = origin

ah yes, your interpretation is correct. +1 to updating the doxygen comments to clarify this

iche033 avatar Aug 17 '21 00:08 iche033