MCPcopy Create free account
hub / github.com/bulletphysics/bullet3 / normal

Method normal

examples/TinyRenderer/model.cpp:187–195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

185
186
187Vec3f Model::normal(Vec2f uvf)
188{
189 Vec2i uv(uvf[0] * normalmap_.get_width(), uvf[1] * normalmap_.get_height());
190 TGAColor c = normalmap_.get(uv[0], uv[1]);
191 Vec3f res;
192 for (int i = 0; i < 3; i++)
193 res[2 - i] = (float)c[i] / 255.f * 2.f - 1.f;
194 return res;
195}
196
197Vec2f Model::uv(int iface, int nthvert)
198{

Callers 15

ParametrizedLineMethod · 0.80
intersectionParameterMethod · 0.80
Hyperplane ThroughFunction · 0.80
vertexMethod · 0.80
vertexMethod · 0.80
_noisy_observationMethod · 0.80
_noisy_observationMethod · 0.80
_AddSensorNoiseMethod · 0.80
_get_noiseMethod · 0.80
filterMethod · 0.80
_AddSensorNoiseMethod · 0.80

Calls 4

get_widthMethod · 0.80
get_heightMethod · 0.80
getMethod · 0.45
normalizeMethod · 0.45

Tested by

no test coverage detected