Implementasi Augmented Reality (AR) Untuk Pembelajaran Jenis Virus dan Bakteri Penyebab Penyakit Pada Manusia Berbasis Android

LISTING PROGRAM

UserInterface

using UnityEngine;
using System.Collections;

public class UserInterface : MonoBehaviour {

public GameObject menuutama;
public GameObject pilihan;
public GameObject jenisvirus;
public GameObject jenisbakteri;
public GameObject influenzavirus;
public GameObject herpessimplexvirus;
public GameObject humanimmunodificiencyvirus;
public GameObject mycobacteriumtuberculosis;
public GameObject vibriocholera;
public GameObject salmonellathyposa;
public GameObject about;


void mulai(){
menuutama.SetActive (true);
about.SetActive (false);
}
public void klikpilihan(int scene){

Universitas Sumatera Utara

Application.LoadLevel (scene);
}
public void klikabout(){
menuutama.SetActive (false);
about.SetActive (true);
}
public void klikvirus(){
pilihan.SetActive (false);
jenisvirus.SetActive (true);
jenisbakteri.SetActive (false);
influenzavirus.SetActive (false);
herpessimplexvirus.SetActive (false);

humanimmunodificiencyvirus.SetActive (false);
mycobacteriumtuberculosis.SetActive (false);
vibriocholera.SetActive (false);
salmonellathyposa.SetActive (false);
}

public void klikbakteri(){
pilihan.SetActive (false);
jenisvirus.SetActive (false);
jenisbakteri.SetActive (true);
influenzavirus.SetActive (false);
herpessimplexvirus.SetActive (false);
humanimmunodificiencyvirus.SetActive (false);
mycobacteriumtuberculosis.SetActive (false);
vibriocholera.SetActive (false);
salmonellathyposa.SetActive (false);

Universitas Sumatera Utara

}


public void klikinfluenza(){
pilihan.SetActive (false);
jenisvirus.SetActive (false);
jenisbakteri.SetActive (false);
influenzavirus.SetActive (true);
herpessimplexvirus.SetActive (false);
humanimmunodificiencyvirus.SetActive (false);
mycobacteriumtuberculosis.SetActive (false);
vibriocholera.SetActive (false);
salmonellathyposa.SetActive (false);
}

public void klikherpes(){
pilihan.SetActive (false);
jenisvirus.SetActive (false);
jenisbakteri.SetActive (false);
influenzavirus.SetActive (false);
herpessimplexvirus.SetActive (true);
humanimmunodificiencyvirus.SetActive (false);

mycobacteriumtuberculosis.SetActive (false);
vibriocholera.SetActive (false);
salmonellathyposa.SetActive (false);
}

public void klikhiv(){
pilihan.SetActive (false);

Universitas Sumatera Utara

jenisvirus.SetActive (false);
jenisbakteri.SetActive (false);
influenzavirus.SetActive (false);
herpessimplexvirus.SetActive (false);
humanimmunodificiencyvirus.SetActive (true);
mycobacteriumtuberculosis.SetActive (false);
vibriocholera.SetActive (false);
salmonellathyposa.SetActive (false);
}


public void kliktbc(){
pilihan.SetActive (false);
jenisvirus.SetActive (false);
jenisbakteri.SetActive (false);
influenzavirus.SetActive (false);
herpessimplexvirus.SetActive (false);
humanimmunodificiencyvirus.SetActive (false);
mycobacteriumtuberculosis.SetActive (true);
vibriocholera.SetActive (false);
salmonellathyposa.SetActive (false);
}

public void klikcholera(){
pilihan.SetActive (false);
jenisvirus.SetActive (false);
jenisbakteri.SetActive (false);
influenzavirus.SetActive (false);
herpessimplexvirus.SetActive (false);

Universitas Sumatera Utara


humanimmunodificiencyvirus.SetActive (false);
mycobacteriumtuberculosis.SetActive (false);
vibriocholera.SetActive (true);
salmonellathyposa.SetActive (false);
}

public void kliktyphosa(){
pilihan.SetActive (false);
jenisvirus.SetActive (false);
jenisbakteri.SetActive (false);
influenzavirus.SetActive (false);
herpessimplexvirus.SetActive (false);
humanimmunodificiencyvirus.SetActive (false);
mycobacteriumtuberculosis.SetActive (false);
vibriocholera.SetActive (false);
salmonellathyposa.SetActive (true);
}

public void kembalipilihan(){

pilihan.SetActive (true);
jenisvirus.SetActive (false);
jenisbakteri.SetActive (false);
influenzavirus.SetActive (false);
herpessimplexvirus.SetActive (false);
humanimmunodificiencyvirus.SetActive (false);
mycobacteriumtuberculosis.SetActive (false);
vibriocholera.SetActive (false);

Universitas Sumatera Utara

salmonellathyposa.SetActive (false);
}
public void menukembali(){
menuutama.SetActive (true);
about.SetActive (false);
}
public void kembalihome(int scene){
Application.LoadLevel (scene);
}


public void keluar(){
Application.Quit ();
}

public void AR(int scene){
Application.LoadLevel (scene);
}
}

Universitas Sumatera Utara

Zoom dan Rotate

Simple Select Transform

using UnityEngine;

// This script allows you to transform the GameObject selected by
SimpleSelect

public class SimpleSelectTransform : SimpleSelect
{
public bool AllowTranslate = true;

public bool AllowRotate = true;

public bool AllowScale = true;

protected virtual void Update()
{
// Make sure we have something selected
if (SelectedGameObject != null)
{
// Make sure the main camera exists
if (Camera.main != null)
{
if (AllowTranslate == true)
{
Translate(SelectedGameObject.transform,
Lean.LeanTouch.DragDelta);


Universitas Sumatera Utara

}

if (AllowRotate == true)
{
Rotate(SelectedGameObject.transform,
Lean.LeanTouch.TwistDegrees);
}

if (AllowScale == true)
{
Scale(SelectedGameObject.transform,
Lean.LeanTouch.PinchScale);
}
}
}
}


public void Translate(Transform transform, Vector2
screenPositionDelta)
{
// Screen position of the transform
var screenPosition =
Camera.main.WorldToScreenPoint(transform.position);

// Add the deltaPosition
screenPosition += (Vector3)screenPositionDelta;

// Convert back to world space
transform.position =
Camera.main.ScreenToWorldPoint(screenPosition);

Universitas Sumatera Utara

}

public void Rotate(Transform transform, float angleDelta)
{
transform.rotation *= Quaternion.Euler(0.0f, 0.0f,
angleDelta);
}

public void Scale(Transform transform, float scale)
{
// Make sure the scale is valid
if (scale > 0.0f)
{
// Grow the local scale by scale
transform.localScale *= scale;
}
}
}

Simple Select

using UnityEngine;

// This script allows you to select a GameObject using any finger, as
long it has a collider
public class SimpleSelect : MonoBehaviour
{
[Tooltip("This stores the layers we want the raycast to hit (make
sure this GameObject's layer is included!)")]

Universitas Sumatera Utara

public LayerMask LayerMask =
UnityEngine.Physics.DefaultRaycastLayers;

[Tooltip("The previously selected GameObject")]
public GameObject SelectedGameObject;

protected virtual void OnEnable()
{
// Hook into the OnFingerTap event
Lean.LeanTouch.OnFingerTap += OnFingerTap;
}

protected virtual void OnDisable()
{
// Unhook from the OnFingerTap event
Lean.LeanTouch.OnFingerTap -= OnFingerTap;
}

public void OnFingerTap(Lean.LeanFinger finger)
{
// Raycast information
var ray = finger.GetRay();
var hit = default(RaycastHit);

// Was this finger pressed down on a collider?
if (Physics.Raycast(ray, out hit, float.PositiveInfinity,
LayerMask) == true)
{

Universitas Sumatera Utara

// Remove the color from the currently selected one?
if (SelectedGameObject != null)
{
ColorGameObject(SelectedGameObject,
Color.white);
}

SelectedGameObject = hit.collider.gameObject;

ColorGameObject(SelectedGameObject, Color.green);
}
}

private static void ColorGameObject(GameObject gameObject, Color
color)
{
// Make sure the GameObject exists
if (gameObject != null)
{
// Get renderer from this GameObject
var renderer = gameObject.GetComponent();

// Make sure the Renderer exists
if (renderer != null)
{
// Get material copy from this renderer
var material = renderer.material;

Universitas Sumatera Utara

// Make sure the material exists
if (material != null)
{
// Set new color
material.color = color;
}
}
}
}
}

Universitas Sumatera Utara

Curriculum Vitae

Data Pribadi

Nama

: Ricki Reynaldo Parbuktian Simanjuntak

Tempat, tanggal Lahir : Medan, 17 Agustus 1992
Jenis Kelamin

: Laki-laki

Umur

: 24 Tahun

Tinggi, berat badan

: 170 cm/73 kg

Agama

: Kristen Protestan

Alamat

: Jl. A.R. Hakim no.103 Medan

Status

: Belum Kawin

Telepon/HP

: 082360076697

Email

: rickireynaldo@gmail.com

Latarbelakang Pendidikan :



2010 sampai dengan 2013

: D3 Jurusan Teknik Informatika Universitas

Sumatera Utara


2007 sampai dengan 2010

: SMA Budi Murni 1 Medan



2004 sampai dengan 2007

: SMP Santa Maria Medan



1998 sampai dengan 2004

: SD Methodist 3 Medan

Universitas Sumatera Utara