Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. // p is a point
  2. const auto pv = p.getVector3fMap();
  3. const uint32_t rgb = *reinterpret_cast<const int*>(&p.rgb);
  4. int r = int((rgb >> 16) & 0x0000ff);
  5. int g = int((rgb >> 8) & 0x0000ff);
  6. int b = int((rgb) & 0x0000ff);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement