Ejemplo n.º 1
0
	virtual void drawImplementation(osg::State& state,const osg::Drawable* drawable) const 
	{
		static osg::TexMat *tm= new osg::TexMat();
		osg::Matrix mvm(state.getModelViewMatrix());
		osg::Quat q;
		q.set(mvm);
//		state.getorcre
		tm->setMatrix(osg::Matrix::rotate( q.inverse() ));
		state.applyTextureAttribute(1,tm);
//		drawable->getOrCreateStateSet()->
		drawable->drawImplementation(state);
	}
Ejemplo n.º 2
0
int main(int argc, char *argv[])
{
  int n;
  int i, j;
  static double *A, *x, *y;
  
  
  //  Make sure a matrix size is specified
  if (argv[1] == NULL)
  {
    printf("USAGE: %s [side of matrix] [optional|size of block]\n", argv[0]);
    exit(1);
  }
  
  if ((n = atoi(argv[1])) < 0){
    exit(1);
  }
  
  A = (double *) _mm_malloc (n * n * sizeof (double), page);
  x = (double *) _mm_malloc (n * sizeof (double), page);
  y = (double *) _mm_malloc (n * sizeof (double), page);
  
  _ini1(A,n ,n);
  _ini1(x,n ,1);
  _ini1(y,n ,1);
  
  
  
#ifndef COLD_CACHE
for(i=0; i<2 ; i++)
#endif
  mvm(n,A,x,y);
  
  _mm_free(A);
  _mm_free(x);
  _mm_free(y);

  


  
  return 0;
}