インフォ FAQ
言語 環境比較
 
Index
 
  Processing 1.0 _ALPHAリファレンスは開発途中である。
もしエラーやコメントがあれば、reas at groupc.netへメールして下さい。
Name  

screenX()

   
Examples  
void loop() { 
  float x = mouseX; 
  float y = mouseY; 
  float z = -100; 
 
  //一時的にP5を3D描写するやりかた 
  translate(0, 0, 0); 
  
  stroke(0); 
  float theX = screenX(x, y, z); 
  // 3Dポジションに合った2Dの線を描く 
  line(theX, 0, theX, height);    
  
  stroke(255); 
  // 3Dで線を描く 
  line(x, y-10, z, x, y+10, z);  
 
  // 反対に2Dで線を描く
  line(x, 0, x, height); 
}  
Description  

3次元のX, Y, Z の位置をとり、X値を(2次元の)スクリーン上に現わす場所へかえす。

 

   
Syntax  
var = screenX(x, y, z)
   
Parameters  
var   浮動少数点数: 正当な変数名

x   整数か浮動少数点数: マッピングされる3D x 座標

y   整数か浮動少数点数: マッピングされる3D y 座標

z   整数か浮動少数点数: マッピングされる3D z 座標
   
Returns   浮動少数点数
   
Usage   Web & Application
   
Related   screenY()
screenZ()
   
© 2004- 2001 Massachusetts Institute of Technology and Interaction Design Institute Ivrea
Processing is an open project initiated by Ben Fry and Casey Reas