ofxVolumetrics upsidedown with ofxARToolkitPlus

Hi all,
I have tried implement Volumetrics and artoolkti together
but unluckily the voilumetrics was inverted when i tilt in y axis (x axis?)
please check the video below

http://vimeo.com/57343052

i found that may be the transform matrix issue
please tell if you have any further investigation

http://github.com/fishkingsin/ARVolumetrics

addons:
http://github.com/fishkingsin/ofxARtoolkitPlus
http://github.com/timscaffidi/ofxVolumetrics

Hi fishkingsin,

I was able to get the orientation correct by using the following code in the for loop at the end of draw:

  
  
for(int i=0; i<numDetected; i++) {  
  
		// Set the matrix to the perspective of this marker  
		// The origin is in the middle of the marker  
		artk.applyProjectionMatrix();  
		ofScale(1,-1,1);  
		artk.applyModelMatrix(i);  
		ofTranslate(0,0,50);  
		ofRotateX(180);  
		myVolume.drawVolume(0,0,0, 100, 0);  
		artk.applyProjectionMatrix();  
		artk.applyModelMatrix(i);  
  
		// Draw a line from the center out  
		ofNoFill();  
		ofSetLineWidth(5);  
		ofSetHexColor(0xffffff);  
		glBegin(GL_LINES);  
		glVertex3f(0, 0, 0);  
		glVertex3f(0, 0, 50);  
		glEnd();  
  
		// Draw a stack of rectangles by offseting on the z axis  
		ofNoFill();  
		ofEnableSmoothing();  
		ofSetColor(255, 255, 0, 50);  
		for(int i=0; i<10; i++) {  
			ofRect(-25, -25, 50, 50);  
			ofTranslate(0, 0, i*1);  
		}  
	}  
  

it seems that ofxARToolkitPlus and ofxVolumetrics were both directly manipulating the view matrices which was causing a conflict. I found that the projection matrix set from ofxARtoolkitPlus ended up upside down when used by ofxVolumetrics, so this fixes it without affecting the rest of the drawing code. It is a hack, but it works.