Added support for non-cubic volumes.
This commit is contained in:
		| @@ -47,12 +47,12 @@ void exampleLog(string message, int severity) | ||||
| int main(int argc, char *argv[]) | ||||
| { | ||||
| 	logHandler = &exampleLog; | ||||
| 	Volume<PolyVox::uint8_t> volData(g_uVolumeSideLength); | ||||
| 	Volume<PolyVox::uint8_t> volData(g_uVolumeSideLength, g_uVolumeSideLength, g_uVolumeSideLength); | ||||
|  | ||||
| 	//Make our volume contain a sphere in the center. | ||||
| 	PolyVox::uint16_t minPos = 0; | ||||
| 	PolyVox::uint16_t midPos = volData.getSideLength() / 2; | ||||
| 	PolyVox::uint16_t maxPos = volData.getSideLength() - 1; | ||||
| 	PolyVox::uint16_t midPos = g_uVolumeSideLength / 2; | ||||
| 	PolyVox::uint16_t maxPos = g_uVolumeSideLength - 1; | ||||
| 	createCubeInVolume(volData, Vector3DUint16(minPos, minPos, minPos), Vector3DUint16(maxPos, maxPos, maxPos), 0); | ||||
|  | ||||
| 	createSphereInVolume(volData, 50.0f, 5); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user