Definition at line 82 of file Functors.h. References Impala::Core::Array::Element::Vec3Int32::X(), Impala::Core::Array::Element::Vec3Int32::Y(), and Impala::Core::Array::Element::Vec3Int32::Z(). 00083 { 00084 int o1,o2,o3; //static to prevent allocation and cleanup every iteration 00085 o1 = (p.X()+p.Y()+p.Z())/3; 00086 if(o1>255) 00087 o1=255; 00088 if(o1<0) 00089 o1=0; 00090 o2 = 127+(p.X()-p.Y())/2; 00091 if(o2>255) 00092 o2=255; 00093 if(o2<0) 00094 o2=0; 00095 o3 = 127+(2*p.Z()-p.X()-p.Y())/4; 00096 if(o3>255) 00097 o3=255; 00098 if(o3<0) 00099 o3=0; 00100 return Vec3Int32(o1, o2, o3); 00101 }
Here is the call graph for this function:
|