title: how to set material contentsTransform?
body: <p>I draw one rect with UIBezierPath and SCNShape,then add set textures use SCNMaterial object on the  SCNShape top surface。In the opneGL ,textures coordinates are based on objects that set textures,but scenekit textures base on  read world coordinates 。 then I calculate the rect size , cos value of X,translate,and scale ,but is angle still not Correct</p>
  
  <pre><code>    CGPoint p0 = [points[0] CGPointValue];
      CGPoint p1 = [points[1] CGPointValue];
      CGPoint p2 = [points[2] CGPointValue];
      CGPoint p3 = [points[3] CGPointValue];
  
      CGFloat oWidth = sqrt((p3.x - p0.x) * (p3.x - p0.x) + (p3.y - p0.y) * (p3.y - p0.y));
      CGFloat oheight = sqrt((p1.x - p0.x) * (p1.x - p0.x) + (p1.y - p0.y) * (p1.y - p0.y));
  
      double angle = 0;
      if(oWidth &gt; oheight){
  
          double cosValue = ((p3.x - p0.x) * (p3.x - p0.x)) / ((p3.x - p0.x) * (p3.x - p0.x) + (p3.y - p0.y) * (p3.y - p0.y));
          angle = acos(sqrt(cosValue));
  
      }else{
  
          double cosValue = ((p1.x - p0.x) * (p1.x - p0.x)) / ((p1.x - p0.x) * (p1.x - p0.x) + (p1.y - p0.y) * (p1.y - p0.y));
          angle = acos(sqrt(cosValue));
  
      }
  </code></pre>
  
  <p>the textures image like that </p>
  
  <p><a href="https://i.stack.imgur.com/nLmoN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nLmoN.png" alt="enter image description here"></a></p>
  
  <p>and the result is 
  <a href="https://i.stack.imgur.com/duHnz.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/duHnz.jpg" alt="enter image description here"></a></p>