Definition at line 98 of file Functors.h. References Impala::Core::Array::Element::Vec3Int32::X(), Impala::Core::Array::Element::Vec3Int32::Y(), and Impala::Core::Array::Element::Vec3Int32::Z(). 00099 { 00100 int o1,o2,o3; //static to prevent allocation and cleanup every iteration 00101 o1 = (p.X()+p.Y()+p.Z())/3; 00102 if(o1>255) 00103 o1=255; 00104 if(o1<0) 00105 o1=0; 00106 o2 = 127+(p.X()-p.Y())/2; 00107 if(o2>255) 00108 o2=255; 00109 if(o2<0) 00110 o2=0; 00111 o3 = 127+(2*p.Z()-p.X()-p.Y())/4; 00112 if(o3>255) 00113 o3=255; 00114 if(o3<0) 00115 o3=0; 00116 return Vec3Int32(o1, o2, o3); 00117 }
Here is the call graph for this function:
|