// DEVICE
final int maxAngle = 90;
public static Activity activity;
// GPS
LocationManager locationManager;
LocationListener gpsListener;
boolean isGPS;
// SENSOR
SensorManager sensorManager;
Location cLocation;
String provider;
float z,x,y;
float[] sValues;
String pitchState;
// CORE Variable
public static double deviceDegree;
ArrayList<ARViewObject> arViews;
// Projector View
ARProjector arProjector;
FrameLayout mainLayout;
// Temporary Variable
public static ARObject[] arObjects;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
this.activity = this;
this.mainLayout = (FrameLayout) findViewById(R.id.mainLayout);
Window win = getWindow();
win.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
SurfaceView surface =
(SurfaceView) findViewById(R.id.SurfaceView01);
SurfaceHolder holder = surface.getHolder();
// SurfaceView �����ʸ� ���
holder.addCallback(mSurfaceListener);
// �ܺ� ���۸� ����ϵ��� ����
holder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
new AlertDialog.Builder(this)
.setTitle("위치확인 감도")
.setMessage("GPS를 사용하시겠습니까")
.setPositiveButton("예", new AlertDialog.OnClickListener()
{
public void onClick(DialogInterface dialog, int which)
{
isGPS = true;
initialize();
}
})
.setNegativeButton("아니오", new AlertDialog.OnClickListener()
{
public void onClick(DialogInterface dialog, int which)
{
isGPS = false;
initialize();
}
})
.setCancelable(true)
.create()
.show();
}
// ���� �ʱ�ȭ
public void initialize(){
arViews = new ArrayList<ARViewObject>();
arProjector = (ARProjector) findViewById(R.id.projector);
locationInitialize();
demoObjectGenerate();
}
public void demoObjectGenerate() {
ARObject demo1 = new ARObject();
ARLocation demo1Location = new ARLocation();
ARObject demo2 = new ARObject();
ARLocation demo2Location = new ARLocation();
// // S-Oil
demo1Location.latitude = 36.350078;
demo1Location.longitude = 127.300097;
demo1.setArLocation(demo1Location);
demo1.setArName("S-oil 공단 주유소");
demo1.setIconType(0);
// 우림
demo2Location.latitude = 36.349715;
demo2Location.longitude = 127.301062;
demo2.setArLocation(demo2Location);
arObjects = new ARObject[]{ demo1 , demo2 };
}
이 빨간부분에서 demo1를 클릭할시 다른 이미지를 띄우고 싶은데..
일단 demo1을 클릭할라면은 어떻게해야하나요...!!??
클릭하고싶은데..제가하니간은 자꾸 다르게나오네요..ㅠ