Develop and Download Open Source Software

Browse Subversion Repository

Diff of /nyar4psg/trunk/src/src/jp/nyatla/nyar4psg/NyARPsgBaseClass.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 820 by nyatla, Thu Apr 21 17:06:30 2011 UTC revision 821 by nyatla, Thu Apr 21 18:11:30 2011 UTC
# Line 28  Line 28 
28  package jp.nyatla.nyar4psg;  package jp.nyatla.nyar4psg;
29    
30    
31  import javax.media.opengl.GL;  import javax.media.opengl.*;
32    
33  import processing.core.*;  import processing.core.*;
34  import processing.opengl.PGraphicsOpenGL;  import processing.opengl.*;
35    
36  import jp.nyatla.nyartoolkit.*;  import jp.nyatla.nyartoolkit.*;
37  import jp.nyatla.nyartoolkit.core.param.*;  import jp.nyatla.nyartoolkit.core.param.*;
# Line 63  class NyARPsgBaseClass Line 63  class NyARPsgBaseClass
63           * バージョン文字列です。           * バージョン文字列です。
64           * NyAR4psgのバージョン情報を示します。           * NyAR4psgのバージョン情報を示します。
65           */           */
66          public final static String VERSION = "NyAR4psg/0.5.1;NyARToolkit for java/3.0.0+;ARToolKit/2.72.1";          public final static String VERSION = "NyAR4psg/0.9.0;NyARToolkit for java/3.0.0+;ARToolKit/2.72.1";
67          /** ProcessingスタイルのProjectionMatrixです。*/          /** ProcessingスタイルのProjectionMatrixです。*/
68          protected PMatrix3D _ps_projection=new PMatrix3D();          protected PMatrix3D _ps_projection=new PMatrix3D();
69          /** 参照するAppletのインスタンスです。*/          /** 参照するAppletのインスタンスです。*/
# Line 132  class NyARPsgBaseClass Line 132  class NyARPsgBaseClass
132           */               */    
133          public PMatrix3D setPerspective(PMatrix3D i_projection)          public PMatrix3D setPerspective(PMatrix3D i_projection)
134          {          {
135                  if(!(this._ref_papplet.g instanceof PGraphicsOpenGL)){                  if(!(this._ref_papplet.g instanceof PGraphics3D)){
136                          this._ref_papplet.die("NyAR4Psg require PGraphicsOpenGL instance.");                          this._ref_papplet.die("NyAR4Psg require PGraphics3D instance.");
137                  }                  }
138                  PGraphics3D g=(PGraphics3D)this._ref_papplet.g;                  PGraphics3D g=(PGraphics3D)this._ref_papplet.g;
139                  //現在のProjectionMatrixを保存する。                  //現在のProjectionMatrixを保存する。
# Line 141  class NyARPsgBaseClass Line 141  class NyARPsgBaseClass
141                  ret.set(g.projection);                  ret.set(g.projection);
142                  //ProjectionMatrixの設定                  //ProjectionMatrixの設定
143                  g.projection.set(i_projection);                  g.projection.set(i_projection);
144                    //OpenGLの時はちょっと細工
145                  if(this._ref_papplet.g instanceof PGraphicsOpenGL)                  if(this._ref_papplet.g instanceof PGraphicsOpenGL)
146                  {                  {
147                          GL gl=((PGraphicsOpenGL)g).gl;                          GL gl=((PGraphicsOpenGL)g).gl;

Legend:
Removed from v.820  
changed lines
  Added in v.821

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26