MCPcopy Create free account
hub / github.com/OctoMap/octomap / heightMapGray

Method heightMapGray

octovis/src/SceneObject.cpp:92–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90 }
91
92 void SceneObject::heightMapGray(double h, GLfloat* glArrayPos) const {
93 if (m_zMin >= m_zMax)
94 h = 0.5;
95 else{
96 h = std::min(std::max((h-m_zMin)/ (m_zMax - m_zMin), 0.0), 1.0) * 0.4 + 0.3; // h \in [0.3, 0.7]
97 }
98
99 glArrayPos[0] = h;
100 glArrayPos[1] = h;
101 glArrayPos[2] = h;
102 }
103
104
105}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected