forked from srv/pointcloud_web_viewer
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
65 lines (52 loc) · 1.44 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?php
/*
*---------------------------------------------------------------
* CONFIGURATION
*---------------------------------------------------------------
*
* Different variables to be configured
*/
// The directory where your pointclouds are saved
define("DATAFOLDER", "data");
// The filenames of the pointclouds
define("PCFILE", "pc.csv");
define("PCINFO", "info.csv");
define("PCIMG", "img.png");
define("MESHVERTICESFILE", "mesh_vertices.csv");
define("MESHFACESFILE", "mesh_faces.csv");
// Can be development or production
define("ENVIRONMENT", "production");
// The development url
define("DEVELURL", "http://localhost/2016-watertight-meshes-v01/");
// The production url
define("PRODURL", "http://robotics.jacobs-university.de/datasets/2016-watertight-meshes-v01/");
/*
*---------------------------------------------------------------
* URL PARSER
*---------------------------------------------------------------
*
* Parses the url and load the correct page.
*/
// Parse the url
include('app/helpers/url.php');
$pathInfo = parsePath();
// Load pages
if (sizeof($pathInfo['call_parts']) > 0) {
$page = $pathInfo['call_parts'][0];
switch ($page) {
case 'view':
$pcFolder = $pathInfo['call_parts'][1];
include('app/views/viewer.php');
break;
case '404':
include('app/views/404.php');
break;
default:
include('app/views/home.php');
break;
}
}
else {
include('app/views/home.php');
}
?>