MCPcopy Create free account
hub / github.com/carbonengine/trinity / ConvertUByte4ToVector3

Function ConvertUByte4ToVector3

trinity/Utilities/GeometryUtils.cpp:53–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51}
52
53void ConvertUByte4ToVector3( const void* ptr, Vector3* dest )
54{
55 unsigned char* vdata = (unsigned char*)( ptr );
56
57 dest->x = (float)vdata[2] / 255.0f * 2.0f - 1.0f;
58 dest->y = (float)vdata[1] / 255.0f * 2.0f - 1.0f;
59 dest->z = (float)vdata[0] / 255.0f * 2.0f - 1.0f;
60}
61
62
63#if WITH_GRANNY

Callers 1

ConvertDataToVector3Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected