Created
January 11, 2013 22:22
-
-
Save cathode/4514478 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private void InitMarchingCubesAlgorithmFancier() | |
| { | |
| // Even fancier. We'll use a LINQ query to build the lookup tables for Marching Cubes. | |
| var result = from i in Enumerable.Range(0, 256) | |
| let f = new Func<int, int>(s => (i & (1 << s)) >> s) | |
| let verts = from j in Enumerable.Range(0, 8) | |
| select f(j) | |
| select verts; // not complete yet | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment