| 30 |
|
|
| 31 |
|
|
| 32 |
import processing.core.*; |
import processing.core.*; |
| 33 |
|
import processing.opengl.*; |
| 34 |
import jp.nyatla.nyartoolkit.core.*; |
import jp.nyatla.nyartoolkit.core.*; |
| 35 |
import jp.nyatla.nyartoolkit.core.types.matrix.NyARDoubleMatrix44; |
import jp.nyatla.nyartoolkit.core.types.matrix.NyARDoubleMatrix44; |
| 36 |
|
|
| 55 |
* バージョン文字列です。 |
* バージョン文字列です。 |
| 56 |
* NyAR4psgのバージョン情報を示します。 |
* NyAR4psgのバージョン情報を示します。 |
| 57 |
*/ |
*/ |
| 58 |
public final static String VERSION = "NyAR4psg/1.2.1;"+NyARVersion.VERSION_STRING; |
public final static String VERSION = "NyAR4psg/1.3.1;"+NyARVersion.VERSION_STRING; |
| 59 |
/** 参照するAppletのインスタンスです。*/ |
/** 参照するAppletのインスタンスです。*/ |
| 60 |
protected PApplet _ref_papplet; |
protected PApplet _ref_papplet; |
| 61 |
/** バックグラウンド用のModelviewMatrixです。*/ |
/** バックグラウンド用のModelviewMatrixです。*/ |
| 150 |
* <div>この関数は、次のコードと等価です。</div> |
* <div>この関数は、次のコードと等価です。</div> |
| 151 |
* <hr/> |
* <hr/> |
| 152 |
* :<br/> |
* :<br/> |
| 153 |
|
* //for 1.x<br/> |
| 154 |
* ortho(-i_width/2, i_width/2,-i_height/2,i_height/2,near,far+1);<br/> |
* ortho(-i_width/2, i_width/2,-i_height/2,i_height/2,near,far+1);<br/> |
| 155 |
|
* //for 2.x<br/> |
| 156 |
|
* ortho(0,i_width,0,i_height,near,far+1);<br/> |
| 157 |
* :<br/> |
* :<br/> |
| 158 |
* <hr/> |
* <hr/> |
| 159 |
* @param i_width |
* @param i_width |
| 163 |
*/ |
*/ |
| 164 |
public void setBackgroundOrtho(int i_width,int i_height) |
public void setBackgroundOrtho(int i_width,int i_height) |
| 165 |
{ |
{ |
| 166 |
float half_w=i_width/2; |
this._ref_papplet.ortho(0,i_width,0,i_height,this._clip_near,this._clip_far+1); |
|
float half_h=i_height/2; |
|
|
this._ref_papplet.ortho(-half_w, half_w,-half_h,half_h,this._clip_near,this._clip_far+1); |
|
| 167 |
} |
} |
| 168 |
/** |
/** |
| 169 |
* この関数は、ARToolKit準拠のProjectionMatrixをProcessingにセットします。 |
* この関数は、ARToolKit準拠のProjectionMatrixをProcessingにセットします。 |