| 147 | } |
| 148 | |
| 149 | ImagePtr HeightMapExpression::getImage() const { |
| 150 | // Get the heightmap from the contained expression |
| 151 | ImagePtr heightMap = heightMapExp->getImage(); |
| 152 | |
| 153 | if (heightMap == NULL) return ImagePtr(); |
| 154 | |
| 155 | // Don't process precompressed images |
| 156 | if (heightMap->isPrecompressed()) { |
| 157 | rWarning() << "Cannot evaluate map expression with precompressed texture." << std::endl; |
| 158 | return heightMap; |
| 159 | } |
| 160 | |
| 161 | // Convert the heightmap into a normalmap |
| 162 | ImagePtr normalMap = createNormalmapFromHeightmap(heightMap, scale); |
| 163 | return normalMap; |
| 164 | } |
| 165 | |
| 166 | std::string HeightMapExpression::getIdentifier() const { |
| 167 | std::string identifier = "_heightmap_"; |
nothing calls this directly
no test coverage detected