├── app
├── .gitignore
├── src
│ └── main
│ │ ├── assets
│ │ ├── .gitignore
│ │ └── shaders
│ │ │ ├── cubeMVP.fsh
│ │ │ └── cubeMVP.vsh
│ │ ├── res
│ │ ├── values
│ │ │ ├── strings.xml
│ │ │ ├── colors.xml
│ │ │ └── styles.xml
│ │ ├── mipmap-hdpi
│ │ │ └── ic_launcher.png
│ │ ├── mipmap-mdpi
│ │ │ └── ic_launcher.png
│ │ ├── mipmap-xhdpi
│ │ │ └── ic_launcher.png
│ │ ├── mipmap-xxhdpi
│ │ │ └── ic_launcher.png
│ │ ├── mipmap-xxxhdpi
│ │ │ └── ic_launcher.png
│ │ └── layout
│ │ │ └── cube_layout.xml
│ │ ├── externals
│ │ └── glm-0.9.7.5
│ │ │ ├── .gitignore
│ │ │ ├── glm
│ │ │ ├── detail
│ │ │ │ ├── intrinsic_exponential.inl
│ │ │ │ ├── intrinsic_trigonometric.inl
│ │ │ │ ├── type_vec.inl
│ │ │ │ ├── type_mat.inl
│ │ │ │ ├── type_vec4_avx.inl
│ │ │ │ ├── type_vec4_avx2.inl
│ │ │ │ ├── precision.hpp
│ │ │ │ ├── intrinsic_trigonometric.hpp
│ │ │ │ ├── intrinsic_vector_relational.hpp
│ │ │ │ ├── intrinsic_integer.hpp
│ │ │ │ ├── type_half.hpp
│ │ │ │ ├── _fixes.hpp
│ │ │ │ ├── intrinsic_geometric.hpp
│ │ │ │ ├── intrinsic_matrix.hpp
│ │ │ │ ├── intrinsic_common.hpp
│ │ │ │ ├── type_vec4_sse2.inl
│ │ │ │ └── intrinsic_exponential.hpp
│ │ │ ├── CMakeLists.txt
│ │ │ ├── gtc
│ │ │ │ ├── vec1.inl
│ │ │ │ ├── type_precision.inl
│ │ │ │ └── integer.inl
│ │ │ ├── gtx
│ │ │ │ ├── raw_data.inl
│ │ │ │ ├── type_aligned.inl
│ │ │ │ ├── std_based_type.inl
│ │ │ │ ├── number_precision.inl
│ │ │ │ ├── projection.inl
│ │ │ │ ├── perpendicular.inl
│ │ │ │ ├── mixed_product.inl
│ │ │ │ ├── normal.inl
│ │ │ │ ├── optimum_pow.inl
│ │ │ │ ├── log_base.inl
│ │ │ │ ├── normalize_dot.inl
│ │ │ │ ├── transform.inl
│ │ │ │ ├── handed_coordinate_space.inl
│ │ │ │ ├── orthonormalize.inl
│ │ │ │ ├── scalar_relational.hpp
│ │ │ │ ├── matrix_cross_product.inl
│ │ │ │ ├── projection.hpp
│ │ │ │ ├── polar_coordinates.inl
│ │ │ │ ├── mixed_product.hpp
│ │ │ │ ├── extend.hpp
│ │ │ │ ├── normal.hpp
│ │ │ │ ├── perpendicular.hpp
│ │ │ │ ├── gradient_paint.inl
│ │ │ │ ├── extend.inl
│ │ │ │ ├── log_base.hpp
│ │ │ │ ├── raw_data.hpp
│ │ │ │ ├── matrix_cross_product.hpp
│ │ │ │ ├── orthonormalize.hpp
│ │ │ │ ├── polar_coordinates.hpp
│ │ │ │ ├── closest_point.hpp
│ │ │ │ ├── optimum_pow.hpp
│ │ │ │ ├── matrix_decompose.hpp
│ │ │ │ ├── closest_point.inl
│ │ │ │ ├── component_wise.inl
│ │ │ │ ├── wrap.hpp
│ │ │ │ ├── string_cast.hpp
│ │ │ │ ├── gradient_paint.hpp
│ │ │ │ ├── handed_coordinate_space.hpp
│ │ │ │ ├── normalize_dot.hpp
│ │ │ │ └── scalar_relational.inl
│ │ │ ├── vec2.hpp
│ │ │ ├── vec3.hpp
│ │ │ ├── vec4.hpp
│ │ │ ├── common.hpp
│ │ │ ├── integer.hpp
│ │ │ ├── matrix.hpp
│ │ │ ├── packing.hpp
│ │ │ ├── geometric.hpp
│ │ │ ├── exponential.hpp
│ │ │ ├── trigonometric.hpp
│ │ │ └── vector_relational.hpp
│ │ │ └── copying.txt
│ │ ├── AndroidManifest.xml
│ │ ├── jni
│ │ ├── nativeCode
│ │ │ ├── common
│ │ │ │ ├── myGLM.h
│ │ │ │ ├── misc.h
│ │ │ │ ├── myGLFunctions.h
│ │ │ │ ├── myShader.h
│ │ │ │ ├── myLogger.h
│ │ │ │ ├── misc.cpp
│ │ │ │ ├── myJNIHelper.h
│ │ │ │ ├── myGLCamera.h
│ │ │ │ └── myGLFunctions.cpp
│ │ │ └── cube
│ │ │ │ └── myCube.h
│ │ └── jniCalls
│ │ │ ├── myGLRenderer.cpp
│ │ │ └── cubeActivity.cpp
│ │ └── java
│ │ └── com
│ │ └── anandmuralidhar
│ │ └── cubeandroid
│ │ ├── MyGLSurfaceView.java
│ │ ├── MyGLRenderer.java
│ │ └── CubeActivity.java
├── proguard-rules.pro
└── build.gradle
├── ndk_helper
├── .gitignore
├── src
│ └── main
│ │ └── AndroidManifest.xml
├── proguard-rules.pro
└── build.gradle
├── native_app_glue
├── .gitignore
├── src
│ └── main
│ │ └── AndroidManifest.xml
├── proguard-rules.pro
└── build.gradle
├── settings.gradle
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── .gitignore
├── README.md
└── gradlew.bat
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/app/src/main/assets/.gitignore:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/ndk_helper/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/native_app_glue/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app', ':ndk_helper', ':native_app_glue'
2 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | CubeAndroid
3 |
4 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/anandmuralidhar24/CubeAndroid/HEAD/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/anandmuralidhar24/CubeAndroid/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/anandmuralidhar24/CubeAndroid/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/anandmuralidhar24/CubeAndroid/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/anandmuralidhar24/CubeAndroid/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/anandmuralidhar24/CubeAndroid/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/ndk_helper/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/native_app_glue/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Mon Dec 28 10:00:20 PST 2015
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/cube_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
10 |
11 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | #built application files
2 | *.apk
3 | *.ap_
4 |
5 | # files for the dex VM
6 | *.dex
7 |
8 | # Java class files
9 | *.class
10 |
11 | # generated files
12 | bin/
13 | gen/
14 |
15 | # Local configuration file (sdk path, etc)
16 | local.properties
17 |
18 | # Windows thumbnail db
19 | Thumbs.db
20 |
21 | # OSX files
22 | .DS_Store
23 |
24 | # Eclipse project files
25 | .classpath
26 | .project
27 |
28 | # Android Studio
29 | *.iml
30 | .idea
31 | #.idea/workspace.xml - remove # and delete .idea if it better suit your needs.
32 | .gradle
33 | gradle.properties
34 | build
35 |
36 | libs
37 | obj
38 | drawable-temp
39 | import-summary.txt
40 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled Object files
2 | *.slo
3 | *.lo
4 | *.o
5 | *.obj
6 |
7 | # Precompiled Headers
8 | *.gch
9 | *.pch
10 |
11 | # Compiled Dynamic libraries
12 | *.so
13 | *.dylib
14 | *.dll
15 |
16 | # Fortran module files
17 | *.mod
18 |
19 | # Compiled Static libraries
20 | *.lai
21 | *.la
22 | *.a
23 | *.lib
24 |
25 | # Executables
26 | *.exe
27 | *.out
28 | *.app
29 |
30 | # CMake
31 | CMakeCache.txt
32 | CMakeFiles
33 | Makefile
34 | cmake_install.cmake
35 | install_manifest.txt
36 | *.cmake
37 | # ^ May need to add future .cmake files as exceptions
38 |
39 | # Test logs
40 | Testing/*
41 |
42 | # Test input
43 | test/gtc/*.dds
44 |
45 | # Project Files
46 | *.cbp
47 | *.user
48 |
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /home/anand/Android/Sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/ndk_helper/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /home/anand/Android/Sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/native_app_glue/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /home/anand/Android/Sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/app/src/main/assets/shaders/cubeMVP.fsh:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2016 Anand Muralidhar
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | precision mediump float; // required in GLSL 100
18 |
19 | varying vec3 fragmentColor; // this is interpolated across vertices
20 |
21 | void main()
22 | {
23 | gl_FragColor.xyz = fragmentColor;
24 | }
25 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
11 |
12 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/app/src/main/jni/nativeCode/common/myGLM.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2016 Anand Muralidhar
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 |
18 | #ifndef MYGLM_H
19 | #define MYGLM_H
20 |
21 | #define GLM_FORCE_RADIANS
22 | #include
23 | #include
24 | #include
25 | #include
26 |
27 | #endif //MYGLM_H
28 |
--------------------------------------------------------------------------------
/app/src/main/jni/nativeCode/common/misc.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2016 Anand Muralidhar
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #ifndef MISC_H
18 | #define MISC_H
19 |
20 | #include
21 | #include
22 | #include "myLogger.h"
23 | #include "myGLM.h"
24 |
25 | std::string GetFileName(std::string fileName);
26 | void PrintGLMMat4(glm::mat4 testMat);
27 |
28 | #endif //MISC_H
29 |
--------------------------------------------------------------------------------
/app/src/main/assets/shaders/cubeMVP.vsh:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2016 Anand Muralidhar
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | attribute vec3 vertexPosition;
18 | attribute vec3 vertexColor;
19 | varying vec3 fragmentColor; // this is 'sent' to the fragment shader
20 | uniform mat4 mvpMat;
21 |
22 | void main()
23 | {
24 | gl_Position = mvpMat * vec4(vertexPosition, 1.0);
25 | fragmentColor = vertexColor;
26 | }
27 |
--------------------------------------------------------------------------------
/app/src/main/jni/nativeCode/common/myGLFunctions.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2016 Anand Muralidhar
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #ifndef MY_GL_FUNCTIONS_H
18 | #define MY_GL_FUNCTIONS_H
19 |
20 | #include
21 | #include
22 | #include "gl3stub.h"
23 | #include
24 | #include
25 |
26 | void MyGLInits();
27 | void CheckGLError(std::string functionName);
28 |
29 | #endif //MY_GL_FUNCTIONS_H
30 |
--------------------------------------------------------------------------------
/app/src/main/jni/nativeCode/common/myShader.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2016 Anand Muralidhar
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #ifndef MY_SHADER_H
18 | #define MY_SHADER_H
19 | #include "myGLFunctions.h"
20 | #include "myLogger.h"
21 | #include
22 |
23 | GLuint LoadShaders(std::string vertexShaderCode, std::string fragmentShaderCode);
24 | GLuint GetAttributeLocation(GLuint programID, std::string variableName);
25 | GLint GetUniformLocation(GLuint programID, std::string uniformName);
26 |
27 | #endif //MY_SHADER_H
28 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | CubeAndroid
2 | ===============
3 | In this project, we explore an important concept in OpenGL ES; the **Model**-**View**-**Projection** or **MVP** matrix. We will understand:
4 | - The three matrices that comprise a **MVP** matrix
5 | - How to use the OpenGL Mathematics (GLM) library to generate the **MVP** matrix.
6 | - How to move a colored cube with touch gestures.
7 |
8 | A blog describing this project:
9 | http://www.anandmuralidhar.com/blog/android/mvp-glm-touch
10 |
11 | License
12 | -------
13 |
14 | Copyright 2016 Anand Muralidhar
15 |
16 | Licensed to the Apache Software Foundation (ASF) under one or more contributor
17 | license agreements. See the NOTICE file distributed with this work for
18 | additional information regarding copyright ownership. The ASF licenses this
19 | file to you under the Apache License, Version 2.0 (the "License"); you may not
20 | use this file except in compliance with the License. You may obtain a copy of
21 | the License at
22 |
23 | http://www.apache.org/licenses/LICENSE-2.0
24 |
25 | Unless required by applicable law or agreed to in writing, software
26 | distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
27 | WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
28 | License for the specific language governing permissions and limitations under
29 | the License.
--------------------------------------------------------------------------------
/native_app_glue/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.model.library'
2 |
3 | def ndkDir = System.getenv("ANDROID_NDK_HOME")
4 | def propertiesFile = project.rootProject.file('local.properties')
5 | if (propertiesFile.exists()) {
6 | Properties properties = new Properties()
7 | properties.load(propertiesFile.newDataInputStream())
8 | ndkDir = properties.getProperty('ndk.dir')
9 | }
10 |
11 | model {
12 | android {
13 | compileSdkVersion = 23
14 | buildToolsVersion = '23.0.2'
15 | defaultConfig.with {
16 | minSdkVersion.apiLevel = 9
17 | targetSdkVersion.apiLevel = 23
18 | versionCode = 1
19 | versionName = '0.0.1'
20 | }
21 | ndk {
22 | moduleName = 'native_app_glue'
23 | ldLibs.addAll(['log', 'android'])
24 | ldFlags.add('-c')
25 | }
26 | sources {
27 | main {
28 | jni {
29 | source {
30 | srcDir "${ndkDir}/sources/android/native_app_glue"
31 | }
32 | exportedHeaders {
33 | srcDir "${ndkDir}/sources/android/native_app_glue"
34 | }
35 | }
36 | }
37 | }
38 | }
39 | }
40 | dependencies {
41 | compile 'com.android.support:appcompat-v7:23.+'
42 | }
43 |
--------------------------------------------------------------------------------
/app/src/main/jni/nativeCode/common/myLogger.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2016 Anand Muralidhar
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #ifndef My_LOGGER_H
18 | #define My_LOGGER_H
19 |
20 | #include
21 |
22 | #define LOG_TAG "CubeAndroid"
23 | #define MyLOGD(...) __android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)
24 | #define MyLOGE(...) __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__)
25 | #define MyLOGV(...) __android_log_print(ANDROID_LOG_VERBOSE, LOG_TAG,__VA_ARGS__)
26 | #define MyLOGI(...) __android_log_print(ANDROID_LOG_INFO , LOG_TAG,__VA_ARGS__)
27 | #define MyLOGW(...) __android_log_print(ANDROID_LOG_WARN , LOG_TAG,__VA_ARGS__)
28 | #define MyLOGF(...) __android_log_print(ANDROID_LOG_FATAL , LOG_TAG,__VA_ARGS__)
29 | #define MyLOGSIMPLE(...)
30 |
31 | #endif //My_LOGGER_H
32 |
--------------------------------------------------------------------------------
/ndk_helper/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.model.library'
2 |
3 | def ndkDir = System.getenv("ANDROID_NDK_HOME")
4 | def propertiesFile = project.rootProject.file('local.properties')
5 | if (propertiesFile.exists()) {
6 | Properties properties = new Properties()
7 | properties.load(propertiesFile.newDataInputStream())
8 | ndkDir = properties.getProperty('ndk.dir')
9 | }
10 |
11 | model {
12 | android {
13 | compileSdkVersion = 23
14 | buildToolsVersion = '23.0.2'
15 | defaultConfig.with {
16 | minSdkVersion.apiLevel = 9
17 | targetSdkVersion.apiLevel = 23
18 | versionCode = 1
19 | versionName = '0.0.1'
20 | }
21 | ndk {
22 | moduleName = 'ndk_helper'
23 | stl = 'gnustl_static'
24 | ldLibs.addAll(['log', 'android', 'EGL', 'GLESv2'])
25 | ldFlags.add('-c')
26 | }
27 | sources {
28 | main {
29 | jni {
30 | source {
31 | srcDir "${ndkDir}/sources/android/ndk_helper"
32 | }
33 | exportedHeaders {
34 | srcDir "${ndkDir}/sources/android/ndk_helper"
35 | }
36 | dependencies {
37 | project ':native_app_glue' linkage 'static'
38 | }
39 | }
40 | }
41 | }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/detail/intrinsic_exponential.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | /// THE SOFTWARE.
22 | ///
23 | /// @ref core
24 | /// @file glm/detail/intrinsic_exponential.inl
25 | /// @date 2011-06-15 / 2011-06-15
26 | /// @author Christophe Riccio
27 | ///////////////////////////////////////////////////////////////////////////////////
28 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/detail/intrinsic_trigonometric.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | /// THE SOFTWARE.
22 | ///
23 | /// @ref core
24 | /// @file glm/detail/intrinsic_trigonometric.inl
25 | /// @date 2011-06-15 / 2011-06-15
26 | /// @author Christophe Riccio
27 | ///////////////////////////////////////////////////////////////////////////////////
28 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | set(NAME glm_dummy)
2 |
3 | file(GLOB ROOT_SOURCE *.cpp)
4 | file(GLOB ROOT_INLINE *.inl)
5 | file(GLOB ROOT_HEADER *.hpp)
6 | file(GLOB ROOT_TEXT ../*.txt)
7 | file(GLOB ROOT_MD ../*.md)
8 | file(GLOB ROOT_NAT ../util/glm.natvis)
9 |
10 | file(GLOB_RECURSE CORE_SOURCE ./detail/*.cpp)
11 | file(GLOB_RECURSE CORE_INLINE ./detail/*.inl)
12 | file(GLOB_RECURSE CORE_HEADER ./detail/*.hpp)
13 |
14 | file(GLOB_RECURSE GTC_SOURCE ./gtc/*.cpp)
15 | file(GLOB_RECURSE GTC_INLINE ./gtc/*.inl)
16 | file(GLOB_RECURSE GTC_HEADER ./gtc/*.hpp)
17 |
18 | file(GLOB_RECURSE GTX_SOURCE ./gtx/*.cpp)
19 | file(GLOB_RECURSE GTX_INLINE ./gtx/*.inl)
20 | file(GLOB_RECURSE GTX_HEADER ./gtx/*.hpp)
21 |
22 | source_group("Text Files" FILES ${ROOT_TEXT} ${ROOT_MD})
23 | source_group("Core Files" FILES ${CORE_SOURCE})
24 | source_group("Core Files" FILES ${CORE_INLINE})
25 | source_group("Core Files" FILES ${CORE_HEADER})
26 | source_group("GTC Files" FILES ${GTC_SOURCE})
27 | source_group("GTC Files" FILES ${GTC_INLINE})
28 | source_group("GTC Files" FILES ${GTC_HEADER})
29 | source_group("GTX Files" FILES ${GTX_SOURCE})
30 | source_group("GTX Files" FILES ${GTX_INLINE})
31 | source_group("GTX Files" FILES ${GTX_HEADER})
32 |
33 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..)
34 |
35 | if(GLM_TEST_ENABLE)
36 | add_executable(${NAME} ${ROOT_TEXT} ${ROOT_MD} ${ROOT_NAT}
37 | ${ROOT_SOURCE} ${ROOT_INLINE} ${ROOT_HEADER}
38 | ${CORE_SOURCE} ${CORE_INLINE} ${CORE_HEADER}
39 | ${GTC_SOURCE} ${GTC_INLINE} ${GTC_HEADER}
40 | ${GTX_SOURCE} ${GTX_INLINE} ${GTX_HEADER})
41 | endif(GLM_TEST_ENABLE)
42 |
43 | #add_library(glm STATIC glm.cpp)
44 | #add_library(glm_shared SHARED glm.cpp)
45 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/gtc/vec1.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// Restrictions:
16 | /// By making use of the Software for military purposes, you choose to make
17 | /// a Bunny unhappy.
18 | ///
19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | /// THE SOFTWARE.
26 | ///
27 | /// @ref gtc_vec1
28 | /// @file glm/gtc/vec1.inl
29 | /// @date 2013-03-16 / 2013-03-16
30 | /// @author Christophe Riccio
31 | ///////////////////////////////////////////////////////////////////////////////////
32 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/detail/type_vec.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// Restrictions:
16 | /// By making use of the Software for military purposes, you choose to make
17 | /// a Bunny unhappy.
18 | ///
19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | /// THE SOFTWARE.
26 | ///
27 | /// @ref core
28 | /// @file glm/detail/type_vec.inl
29 | /// @date 2011-06-15 / 2011-06-15
30 | /// @author Christophe Riccio
31 | ///////////////////////////////////////////////////////////////////////////////////
32 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/gtx/raw_data.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// Restrictions:
16 | /// By making use of the Software for military purposes, you choose to make
17 | /// a Bunny unhappy.
18 | ///
19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | /// THE SOFTWARE.
26 | ///
27 | /// @ref gtx_raw_data
28 | /// @file glm/gtx/raw_data.inl
29 | /// @date 2008-11-19 / 2011-06-07
30 | /// @author Christophe Riccio
31 | ///////////////////////////////////////////////////////////////////////////////////
32 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/detail/type_mat.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// Restrictions:
16 | /// By making use of the Software for military purposes, you choose to make
17 | /// a Bunny unhappy.
18 | ///
19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | /// THE SOFTWARE.
26 | ///
27 | /// @ref core
28 | /// @file glm/detail/type_mat.inl
29 | /// @date 2011-06-15 / 2011-06-15
30 | /// @author Christophe Riccio
31 | ///////////////////////////////////////////////////////////////////////////////////
32 |
33 |
--------------------------------------------------------------------------------
/app/src/main/jni/nativeCode/common/misc.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2016 Anand Muralidhar
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #include "misc.h"
18 |
19 | /**
20 | * Strip out the path and return just the filename
21 | */
22 | std::string GetFileName(std::string fileName) {
23 |
24 | // assume filename is of the form "/."
25 | std::string::size_type slashIndex = fileName.find_last_of("/");
26 |
27 | std::string onlyName;
28 | if (slashIndex == std::string::npos) {
29 | onlyName = fileName.substr(0, std::string::npos);
30 | } else {
31 | onlyName = fileName.substr(slashIndex + 1, std::string::npos);
32 | }
33 |
34 | return onlyName;
35 | }
36 |
37 | /**
38 | * Print the contents of a Glm 4x4 matrix
39 | */
40 | void PrintGLMMat4(glm::mat4 testMat) {
41 |
42 | MyLOGD("%f %f %f %f", testMat[0][0],testMat[1][0],testMat[2][0],testMat[3][0]);
43 | MyLOGD("%f %f %f %f", testMat[0][1],testMat[1][1],testMat[2][1],testMat[3][1]);
44 | MyLOGD("%f %f %f %f", testMat[0][2],testMat[1][2],testMat[2][2],testMat[3][2]);
45 | MyLOGD("%f %f %f %f", testMat[0][3],testMat[1][3],testMat[2][3],testMat[3][3]);
46 |
47 | }
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/vec2.hpp:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// Restrictions:
16 | /// By making use of the Software for military purposes, you choose to make
17 | /// a Bunny unhappy.
18 | ///
19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | /// THE SOFTWARE.
26 | ///
27 | /// @ref core
28 | /// @file glm/vec2.hpp
29 | /// @date 2013-12-24 / 2013-12-24
30 | /// @author Christophe Riccio
31 | ///////////////////////////////////////////////////////////////////////////////////
32 |
33 | #pragma once
34 |
35 | #include "detail/type_vec2.hpp"
36 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/vec3.hpp:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// Restrictions:
16 | /// By making use of the Software for military purposes, you choose to make
17 | /// a Bunny unhappy.
18 | ///
19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | /// THE SOFTWARE.
26 | ///
27 | /// @ref core
28 | /// @file glm/vec3.hpp
29 | /// @date 2013-12-24 / 2013-12-24
30 | /// @author Christophe Riccio
31 | ///////////////////////////////////////////////////////////////////////////////////
32 |
33 | #pragma once
34 |
35 | #include "detail/type_vec3.hpp"
36 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/vec4.hpp:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// Restrictions:
16 | /// By making use of the Software for military purposes, you choose to make
17 | /// a Bunny unhappy.
18 | ///
19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | /// THE SOFTWARE.
26 | ///
27 | /// @ref core
28 | /// @file glm/vec4.hpp
29 | /// @date 2013-12-24 / 2013-12-24
30 | /// @author Christophe Riccio
31 | ///////////////////////////////////////////////////////////////////////////////////
32 |
33 | #pragma once
34 |
35 | #include "detail/type_vec4.hpp"
36 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/common.hpp:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// Restrictions:
16 | /// By making use of the Software for military purposes, you choose to make
17 | /// a Bunny unhappy.
18 | ///
19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | /// THE SOFTWARE.
26 | ///
27 | /// @ref core
28 | /// @file glm/common.hpp
29 | /// @date 2013-12-24 / 2013-12-24
30 | /// @author Christophe Riccio
31 | ///////////////////////////////////////////////////////////////////////////////////
32 |
33 | #pragma once
34 |
35 | #include "detail/func_common.hpp"
36 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/gtc/type_precision.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// Restrictions:
16 | /// By making use of the Software for military purposes, you choose to make
17 | /// a Bunny unhappy.
18 | ///
19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | /// THE SOFTWARE.
26 | ///
27 | /// @ref gtc_swizzle
28 | /// @file glm/gtc/swizzle.inl
29 | /// @date 2009-06-14 / 2011-06-15
30 | /// @author Christophe Riccio
31 | ///////////////////////////////////////////////////////////////////////////////////
32 |
33 | namespace glm
34 | {
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/integer.hpp:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// Restrictions:
16 | /// By making use of the Software for military purposes, you choose to make
17 | /// a Bunny unhappy.
18 | ///
19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | /// THE SOFTWARE.
26 | ///
27 | /// @ref core
28 | /// @file glm/integer.hpp
29 | /// @date 2013-12-24 / 2013-12-24
30 | /// @author Christophe Riccio
31 | ///////////////////////////////////////////////////////////////////////////////////
32 |
33 | #pragma once
34 |
35 | #include "detail/func_integer.hpp"
36 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/matrix.hpp:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// Restrictions:
16 | /// By making use of the Software for military purposes, you choose to make
17 | /// a Bunny unhappy.
18 | ///
19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | /// THE SOFTWARE.
26 | ///
27 | /// @ref core
28 | /// @file glm/matrix.hpp
29 | /// @date 2013-12-24 / 2013-12-24
30 | /// @author Christophe Riccio
31 | ///////////////////////////////////////////////////////////////////////////////////
32 |
33 | #pragma once
34 |
35 | #include "detail/func_matrix.hpp"
36 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/packing.hpp:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// Restrictions:
16 | /// By making use of the Software for military purposes, you choose to make
17 | /// a Bunny unhappy.
18 | ///
19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | /// THE SOFTWARE.
26 | ///
27 | /// @ref core
28 | /// @file glm/packing.hpp
29 | /// @date 2013-12-24 / 2013-12-24
30 | /// @author Christophe Riccio
31 | ///////////////////////////////////////////////////////////////////////////////////
32 |
33 | #pragma once
34 |
35 | #include "detail/func_packing.hpp"
36 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/geometric.hpp:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// Restrictions:
16 | /// By making use of the Software for military purposes, you choose to make
17 | /// a Bunny unhappy.
18 | ///
19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | /// THE SOFTWARE.
26 | ///
27 | /// @ref core
28 | /// @file glm/geometric.hpp
29 | /// @date 2013-12-24 / 2013-12-24
30 | /// @author Christophe Riccio
31 | ///////////////////////////////////////////////////////////////////////////////////
32 |
33 | #pragma once
34 |
35 | #include "detail/func_geometric.hpp"
36 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/gtx/type_aligned.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// Restrictions:
16 | /// By making use of the Software for military purposes, you choose to make
17 | /// a Bunny unhappy.
18 | ///
19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | /// THE SOFTWARE.
26 | ///
27 | /// @ref gtc_type_aligned
28 | /// @file glm/gtc/type_aligned.inl
29 | /// @date 2014-11-23 / 2014-11-23
30 | /// @author Christophe Riccio
31 | ///////////////////////////////////////////////////////////////////////////////////
32 |
33 | namespace glm
34 | {
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/gtx/std_based_type.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// Restrictions:
16 | /// By making use of the Software for military purposes, you choose to make
17 | /// a Bunny unhappy.
18 | ///
19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | /// THE SOFTWARE.
26 | ///
27 | /// @ref gtx_std_based_type
28 | /// @file glm/gtx/std_based_type.inl
29 | /// @date 2008-06-08 / 2011-06-07
30 | /// @author Christophe Riccio
31 | ///////////////////////////////////////////////////////////////////////////////////
32 |
33 | namespace glm
34 | {
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/exponential.hpp:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// Restrictions:
16 | /// By making use of the Software for military purposes, you choose to make
17 | /// a Bunny unhappy.
18 | ///
19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | /// THE SOFTWARE.
26 | ///
27 | /// @ref core
28 | /// @file glm/exponential.hpp
29 | /// @date 2013-12-24 / 2013-12-24
30 | /// @author Christophe Riccio
31 | ///////////////////////////////////////////////////////////////////////////////////
32 |
33 | #pragma once
34 |
35 | #include "detail/func_exponential.hpp"
36 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/gtx/number_precision.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// Restrictions:
16 | /// By making use of the Software for military purposes, you choose to make
17 | /// a Bunny unhappy.
18 | ///
19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | /// THE SOFTWARE.
26 | ///
27 | /// @ref gtx_number_precision
28 | /// @file glm/gtx/number_precision.inl
29 | /// @date 2007-05-10 / 2011-06-07
30 | /// @author Christophe Riccio
31 | ///////////////////////////////////////////////////////////////////////////////////
32 |
33 | namespace glm
34 | {
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/trigonometric.hpp:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// Restrictions:
16 | /// By making use of the Software for military purposes, you choose to make
17 | /// a Bunny unhappy.
18 | ///
19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | /// THE SOFTWARE.
26 | ///
27 | /// @ref core
28 | /// @file glm/trigonometric.hpp
29 | /// @date 2013-12-24 / 2013-12-24
30 | /// @author Christophe Riccio
31 | ///////////////////////////////////////////////////////////////////////////////////
32 |
33 | #pragma once
34 |
35 | #include "detail/func_trigonometric.hpp"
36 |
--------------------------------------------------------------------------------
/app/src/main/jni/nativeCode/common/myJNIHelper.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2016 Anand Muralidhar
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #ifndef MY_JNI_HELPER_H
18 | #define MY_JNI_HELPER_H
19 |
20 | #include "myLogger.h"
21 | #include
22 | #include
23 | #include
24 | #include
25 | #include
26 |
27 | #ifdef __cplusplus
28 | extern "C" {
29 | #endif
30 |
31 | class MyJNIHelper {
32 |
33 | private:
34 | mutable pthread_mutex_t threadMutex;
35 | std::string apkInternalPath;
36 | AAssetManager *apkAssetManager;
37 |
38 | public:
39 | MyJNIHelper(JNIEnv *env, jobject obj, jobject assetManager, jstring pathToInternalDir);
40 |
41 | ~MyJNIHelper();
42 |
43 | void Init(JNIEnv *env, jobject obj, jobject assetManager, jstring pathToInternalDir);
44 |
45 | bool ExtractAssetReturnFilename(std::string assetName, std::string &filename,
46 | bool checkIfFileIsAvailable = false);
47 |
48 | bool ReadFileFromAssetsToBuffer(const char *filename, std::vector *bufferRef);
49 | };
50 |
51 | extern MyJNIHelper *gHelperObject;
52 |
53 | #ifdef __cplusplus
54 | }
55 | #endif
56 |
57 | #endif // #define MY_JNI_HELPER_H
58 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/vector_relational.hpp:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// Restrictions:
16 | /// By making use of the Software for military purposes, you choose to make
17 | /// a Bunny unhappy.
18 | ///
19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | /// THE SOFTWARE.
26 | ///
27 | /// @ref core
28 | /// @file glm/vector_relational.hpp
29 | /// @date 2013-12-24 / 2013-12-24
30 | /// @author Christophe Riccio
31 | ///////////////////////////////////////////////////////////////////////////////////
32 |
33 | #pragma once
34 |
35 | #include "detail/func_vector_relational.hpp"
36 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/detail/type_vec4_avx.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// Restrictions:
16 | /// By making use of the Software for military purposes, you choose to make
17 | /// a Bunny unhappy.
18 | ///
19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | /// THE SOFTWARE.
26 | ///
27 | /// @ref core
28 | /// @file glm/detail/type_tvec4_avx.inl
29 | /// @date 2014-12-01 / 2014-12-01
30 | /// @author Christophe Riccio
31 | ///////////////////////////////////////////////////////////////////////////////////
32 |
33 | namespace glm{
34 | namespace detail
35 | {
36 |
37 | }//namespace detail
38 |
39 |
40 |
41 | }//namespace glm
42 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/detail/type_vec4_avx2.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// Restrictions:
16 | /// By making use of the Software for military purposes, you choose to make
17 | /// a Bunny unhappy.
18 | ///
19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | /// THE SOFTWARE.
26 | ///
27 | /// @ref core
28 | /// @file glm/detail/type_tvec4_avx2.inl
29 | /// @date 2014-12-01 / 2014-12-01
30 | /// @author Christophe Riccio
31 | ///////////////////////////////////////////////////////////////////////////////////
32 |
33 | namespace glm{
34 | namespace detail
35 | {
36 |
37 | }//namespace detail
38 |
39 |
40 |
41 | }//namespace glm
42 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/detail/precision.hpp:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// Restrictions:
16 | /// By making use of the Software for military purposes, you choose to make
17 | /// a Bunny unhappy.
18 | ///
19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | /// THE SOFTWARE.
26 | ///
27 | /// @ref core
28 | /// @file glm/detail/precision.hpp
29 | /// @date 2013-04-01 / 2013-04-01
30 | /// @author Christophe Riccio
31 | ///////////////////////////////////////////////////////////////////////////////////
32 |
33 | #pragma once
34 |
35 | namespace glm
36 | {
37 | enum precision
38 | {
39 | highp,
40 | mediump,
41 | lowp,
42 | simd,
43 | defaultp = highp
44 | };
45 | }//namespace glm
46 |
--------------------------------------------------------------------------------
/app/src/main/java/com/anandmuralidhar/cubeandroid/MyGLSurfaceView.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2016 Anand Muralidhar
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.anandmuralidhar.cubeandroid;
18 |
19 | import android.content.Context;
20 | import android.opengl.GLSurfaceView;
21 | import android.util.AttributeSet;
22 | import android.util.Log;
23 | import android.view.SurfaceHolder;
24 |
25 | class MyGLSurfaceView extends GLSurfaceView {
26 |
27 | private MyGLRenderer mRenderer;
28 |
29 | public MyGLSurfaceView(Context context, AttributeSet attrs) {
30 | super(context, attrs);
31 |
32 | try {
33 | // Create GLES context. Even though we are specifying OpenGL ES 2, it will try to
34 | // create the highest possible context on a phone
35 | setEGLContextClientVersion(2);
36 |
37 | // set our custom Renderer for drawing on the created SurfaceView
38 | mRenderer = new MyGLRenderer();
39 | setRenderer(mRenderer);
40 |
41 | // calls onDrawFrame(...) continuously
42 | setRenderMode(GLSurfaceView.RENDERMODE_CONTINUOUSLY);
43 |
44 | } catch (Exception e) {
45 |
46 | // Trouble, something's wrong!
47 | Log.e("MyGLSurfaceView", "Unable to create GLES context!", e);
48 |
49 | }
50 |
51 | }
52 |
53 | }
54 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/detail/intrinsic_trigonometric.hpp:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | /// THE SOFTWARE.
22 | ///
23 | /// @ref core
24 | /// @file glm/detail/intrinsic_trigonometric.hpp
25 | /// @date 2009-06-09 / 2011-06-15
26 | /// @author Christophe Riccio
27 | ///////////////////////////////////////////////////////////////////////////////////
28 |
29 | #pragma once
30 |
31 | #include "setup.hpp"
32 |
33 | #if(!(GLM_ARCH & GLM_ARCH_SSE2))
34 | # error "SSE2 instructions not supported or enabled"
35 | #else
36 |
37 | namespace glm{
38 | namespace detail
39 | {
40 |
41 | }//namespace detail
42 | }//namespace glm
43 |
44 | #include "intrinsic_trigonometric.inl"
45 |
46 | #endif//GLM_ARCH
47 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/detail/intrinsic_vector_relational.hpp:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | /// THE SOFTWARE.
22 | ///
23 | /// @ref core
24 | /// @file glm/detail/intrinsic_vector_relational.hpp
25 | /// @date 2009-06-09 / 2011-06-15
26 | /// @author Christophe Riccio
27 | ///////////////////////////////////////////////////////////////////////////////////
28 |
29 | #pragma once
30 |
31 | #include "setup.hpp"
32 |
33 | #if(!(GLM_ARCH & GLM_ARCH_SSE2))
34 | # error "SSE2 instructions not supported or enabled"
35 | #else
36 |
37 | namespace glm{
38 | namespace detail
39 | {
40 |
41 | }//namespace detail
42 | }//namespace glm
43 |
44 | #include "intrinsic_vector_relational.inl"
45 |
46 | #endif//GLM_ARCH
47 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/gtx/projection.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// Restrictions:
16 | /// By making use of the Software for military purposes, you choose to make
17 | /// a Bunny unhappy.
18 | ///
19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | /// THE SOFTWARE.
26 | ///
27 | /// @ref gtx_projection
28 | /// @file glm/gtx/projection.inl
29 | /// @date 2005-12-21 / 2011-06-07
30 | /// @author Christophe Riccio
31 | ///////////////////////////////////////////////////////////////////////////////////
32 |
33 | namespace glm
34 | {
35 | template
36 | GLM_FUNC_QUALIFIER vecType proj(vecType const & x, vecType const & Normal)
37 | {
38 | return glm::dot(x, Normal) / glm::dot(Normal, Normal) * Normal;
39 | }
40 | }//namespace glm
41 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/gtx/perpendicular.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// Restrictions:
16 | /// By making use of the Software for military purposes, you choose to make
17 | /// a Bunny unhappy.
18 | ///
19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | /// THE SOFTWARE.
26 | ///
27 | /// @ref gtx_perpendicular
28 | /// @file glm/gtx/perpendicular.inl
29 | /// @date 2005-12-21 / 2011-06-07
30 | /// @author Christophe Riccio
31 | ///////////////////////////////////////////////////////////////////////////////////
32 |
33 | namespace glm
34 | {
35 | template
36 | GLM_FUNC_QUALIFIER vecType perp
37 | (
38 | vecType const & x,
39 | vecType const & Normal
40 | )
41 | {
42 | return x - proj(x, Normal);
43 | }
44 | }//namespace glm
45 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/gtx/mixed_product.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// Restrictions:
16 | /// By making use of the Software for military purposes, you choose to make
17 | /// a Bunny unhappy.
18 | ///
19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | /// THE SOFTWARE.
26 | ///
27 | /// @ref gtx_mixed_product
28 | /// @file glm/gtx/mixed_product.inl
29 | /// @date 2007-04-03 / 2008-09-17
30 | /// @author Christophe Riccio
31 | ///////////////////////////////////////////////////////////////////////////////////
32 |
33 | namespace glm
34 | {
35 | template
36 | GLM_FUNC_QUALIFIER T mixedProduct
37 | (
38 | tvec3 const & v1,
39 | tvec3 const & v2,
40 | tvec3 const & v3
41 | )
42 | {
43 | return dot(cross(v1, v2), v3);
44 | }
45 | }//namespace glm
46 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/gtx/normal.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// Restrictions:
16 | /// By making use of the Software for military purposes, you choose to make
17 | /// a Bunny unhappy.
18 | ///
19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | /// THE SOFTWARE.
26 | ///
27 | /// @ref gtx_normal
28 | /// @file glm/gtx/normal.inl
29 | /// @date 2005-12-21 / 2011-06-07
30 | /// @author Christophe Riccio
31 | ///////////////////////////////////////////////////////////////////////////////////
32 |
33 | namespace glm
34 | {
35 | template
36 | GLM_FUNC_QUALIFIER tvec3 triangleNormal
37 | (
38 | tvec3 const & p1,
39 | tvec3 const & p2,
40 | tvec3 const & p3
41 | )
42 | {
43 | return normalize(cross(p1 - p2, p1 - p3));
44 | }
45 | }//namespace glm
46 |
--------------------------------------------------------------------------------
/app/src/main/jni/nativeCode/cube/myCube.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2016 Anand Muralidhar
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #ifndef MYCUBE_H
18 | #define MYCUBE_H
19 |
20 | #include "myLogger.h"
21 | #include "myGLFunctions.h"
22 | #include "myGLCamera.h"
23 | #include
24 | #include
25 | #include
26 | #include
27 |
28 |
29 | class MyCube {
30 | public:
31 | MyCube();
32 | ~MyCube();
33 | void PerformGLInits();
34 | void Render();
35 | void SetViewport(int width, int height);
36 | bool IsInitsDone(){return initsDone;}
37 | void DoubleTapAction();
38 | void ScrollAction(float distanceX, float distanceY, float positionX, float positionY);
39 | void ScaleAction(float scaleFactor);
40 | void MoveAction(float distanceX, float distanceY);
41 | int GetScreenWidth() const { return screenWidth; }
42 | int GetScreenHeight() const { return screenHeight; }
43 |
44 | private:
45 | void RenderCube();
46 |
47 | bool initsDone;
48 | int screenWidth, screenHeight;
49 |
50 | std::vector modelDefaultPosition;
51 | MyGLCamera * myGLCamera;
52 |
53 | GLuint vertexBuffer, colorBuffer; // vertex buffer for triangle's vertices, colors
54 | GLuint vertexAttribute, colorAttribute; // attributes for shader variables
55 | GLuint shaderProgramID;
56 | GLint MVPLocation; // location of MVP in the shader
57 | };
58 |
59 | #endif //MYCUBE_H
60 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/detail/intrinsic_integer.hpp:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | /// THE SOFTWARE.
22 | ///
23 | /// @ref core
24 | /// @file glm/detail/intrinsic_integer.hpp
25 | /// @date 2009-05-11 / 2011-06-15
26 | /// @author Christophe Riccio
27 | ///////////////////////////////////////////////////////////////////////////////////
28 |
29 | #pragma once
30 |
31 | #include "glm/glm.hpp"
32 |
33 | #if(!(GLM_ARCH & GLM_ARCH_SSE2))
34 | # error "SSE2 instructions not supported or enabled"
35 | #else
36 |
37 | namespace glm{
38 | namespace detail
39 | {
40 | __m128i _mm_bit_interleave_si128(__m128i x);
41 | __m128i _mm_bit_interleave_si128(__m128i x, __m128i y);
42 |
43 | }//namespace detail
44 | }//namespace glm
45 |
46 | #include "intrinsic_integer.inl"
47 |
48 | #endif//GLM_ARCH
49 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/detail/type_half.hpp:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// Restrictions:
16 | /// By making use of the Software for military purposes, you choose to make
17 | /// a Bunny unhappy.
18 | ///
19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | /// THE SOFTWARE.
26 | ///
27 | /// @ref core
28 | /// @file glm/detail/type_half.hpp
29 | /// @date 2008-08-17 / 2011-09-20
30 | /// @author Christophe Riccio
31 | ///////////////////////////////////////////////////////////////////////////////////
32 |
33 | #pragma once
34 |
35 | #include "setup.hpp"
36 |
37 | namespace glm{
38 | namespace detail
39 | {
40 | typedef short hdata;
41 |
42 | GLM_FUNC_DECL float toFloat32(hdata value);
43 | GLM_FUNC_DECL hdata toFloat16(float const & value);
44 |
45 | }//namespace detail
46 | }//namespace glm
47 |
48 | #include "type_half.inl"
49 |
--------------------------------------------------------------------------------
/app/src/main/jni/jniCalls/myGLRenderer.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2016 Anand Muralidhar
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #include
18 | #include "myCube.h"
19 |
20 |
21 | #ifdef __cplusplus
22 | extern "C" {
23 | #endif
24 |
25 | extern MyCube *gCubeObject;
26 |
27 | JNIEXPORT void JNICALL
28 | Java_com_anandmuralidhar_cubeandroid_MyGLRenderer_DrawFrameNative(JNIEnv *env,
29 | jobject instance) {
30 |
31 | if (gCubeObject == NULL) {
32 | return;
33 | }
34 | gCubeObject->Render();
35 |
36 | }
37 |
38 | JNIEXPORT void JNICALL
39 | Java_com_anandmuralidhar_cubeandroid_MyGLRenderer_SurfaceCreatedNative(JNIEnv *env,
40 | jobject instance) {
41 |
42 | if (gCubeObject == NULL) {
43 | return;
44 | }
45 | gCubeObject->PerformGLInits();
46 |
47 | }
48 |
49 | JNIEXPORT void JNICALL
50 | Java_com_anandmuralidhar_cubeandroid_MyGLRenderer_SurfaceChangedNative(JNIEnv *env,
51 | jobject instance,
52 | jint width,
53 | jint height) {
54 |
55 | if (gCubeObject == NULL) {
56 | return;
57 | }
58 | gCubeObject->SetViewport(width, height);
59 |
60 | }
61 |
62 | #ifdef __cplusplus
63 | }
64 | #endif
65 |
66 |
--------------------------------------------------------------------------------
/app/src/main/java/com/anandmuralidhar/cubeandroid/MyGLRenderer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2016 Anand Muralidhar
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.anandmuralidhar.cubeandroid;
18 |
19 | import android.opengl.GLSurfaceView;
20 | import android.util.Log;
21 |
22 | import javax.microedition.khronos.egl.EGLConfig;
23 | import javax.microedition.khronos.opengles.GL10;
24 |
25 | class MyGLRenderer implements GLSurfaceView.Renderer {
26 |
27 | private native void DrawFrameNative();
28 | private native void SurfaceCreatedNative();
29 | private native void SurfaceChangedNative(int width, int height);
30 |
31 |
32 | public void onSurfaceCreated(GL10 gl, EGLConfig config) {
33 |
34 | // called when the surface is created or recreated
35 | // create (or recreate) native objects that are required for rendering
36 | Log.d("MyGLRenderer", "onSurfaceCreated");
37 | SurfaceCreatedNative();
38 |
39 | }
40 |
41 | public void onDrawFrame(GL10 unused) {
42 |
43 | // called to draw the current frame
44 | // call the rendering functions in native
45 | DrawFrameNative();
46 |
47 | }
48 |
49 | public void onSurfaceChanged(GL10 unused, int width, int height) {
50 |
51 | // called after surface is created and GLES surface changes size
52 | // this can typically happen if device orientation changes
53 | // we need to set GLES viewport to handle the change in size
54 | Log.d("MyGLRenderer", "onSurfaceChanged");
55 | SurfaceChangedNative(width, height);
56 |
57 | }
58 |
59 | }
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/gtx/optimum_pow.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// Restrictions:
16 | /// By making use of the Software for military purposes, you choose to make
17 | /// a Bunny unhappy.
18 | ///
19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | /// THE SOFTWARE.
26 | ///
27 | /// @ref gtx_optimum_pow
28 | /// @file glm/gtx/optimum_pow.inl
29 | /// @date 2005-12-21 / 2011-06-07
30 | /// @author Christophe Riccio
31 | ///////////////////////////////////////////////////////////////////////////////////
32 |
33 | namespace glm
34 | {
35 | template
36 | GLM_FUNC_QUALIFIER genType pow2(genType const & x)
37 | {
38 | return x * x;
39 | }
40 |
41 | template
42 | GLM_FUNC_QUALIFIER genType pow3(genType const & x)
43 | {
44 | return x * x * x;
45 | }
46 |
47 | template
48 | GLM_FUNC_QUALIFIER genType pow4(genType const & x)
49 | {
50 | return (x * x) * (x * x);
51 | }
52 | }//namespace glm
53 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/gtx/log_base.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// Restrictions:
16 | /// By making use of the Software for military purposes, you choose to make
17 | /// a Bunny unhappy.
18 | ///
19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | /// THE SOFTWARE.
26 | ///
27 | /// @ref gtx_log_base
28 | /// @file glm/gtx/log_base.inl
29 | /// @date 2008-10-24 / 2014-11-25
30 | /// @author Christophe Riccio
31 | ///////////////////////////////////////////////////////////////////////////////////
32 |
33 | namespace glm
34 | {
35 | template
36 | GLM_FUNC_QUALIFIER genType log(genType const & x, genType const & base)
37 | {
38 | assert(x != genType(0));
39 | return glm::log(x) / glm::log(base);
40 | }
41 |
42 | template class vecType>
43 | GLM_FUNC_QUALIFIER vecType log(vecType const & x, vecType const & base)
44 | {
45 | return glm::log(x) / glm::log(base);
46 | }
47 | }//namespace glm
48 |
--------------------------------------------------------------------------------
/app/src/main/jni/jniCalls/cubeActivity.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2016 Anand Muralidhar
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #include
18 | #include "myCube.h"
19 | #include "myJNIHelper.h"
20 |
21 | #ifdef __cplusplus
22 | extern "C" {
23 | #endif
24 |
25 | // global pointer is used in JNI calls to reference to same object of type Cube
26 | MyCube *gCubeObject =NULL;
27 |
28 | // global pointer to instance of MyJNIHelper that is used to read from assets
29 | MyJNIHelper * gHelperObject=NULL;
30 |
31 | /**
32 | * Create the persistent native object and also initialize the single helper object
33 | */
34 | JNIEXPORT void JNICALL
35 | Java_com_anandmuralidhar_cubeandroid_CubeActivity_CreateObjectNative(JNIEnv *env,
36 | jobject instance,
37 | jobject assetManager,
38 | jstring pathToInternalDir) {
39 |
40 | gHelperObject = new MyJNIHelper(env, instance, assetManager, pathToInternalDir);
41 | gCubeObject = new MyCube();
42 | }
43 |
44 | JNIEXPORT void JNICALL
45 | Java_com_anandmuralidhar_cubeandroid_CubeActivity_DeleteObjectNative(JNIEnv *env,
46 | jobject instance) {
47 | if (gCubeObject != NULL) {
48 | delete gCubeObject;
49 | }
50 | gCubeObject = NULL;
51 |
52 | if (gHelperObject != NULL) {
53 | delete gHelperObject;
54 | }
55 | gHelperObject = NULL;
56 | }
57 |
58 | #ifdef __cplusplus
59 | }
60 | #endif
61 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/detail/_fixes.hpp:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// Restrictions:
16 | /// By making use of the Software for military purposes, you choose to make
17 | /// a Bunny unhappy.
18 | ///
19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | /// THE SOFTWARE.
26 | ///
27 | /// @ref core
28 | /// @file glm/detail/_fixes.hpp
29 | /// @date 2011-02-21 / 2011-11-22
30 | /// @author Christophe Riccio
31 | ///////////////////////////////////////////////////////////////////////////////////
32 |
33 | #include
34 |
35 | //! Workaround for compatibility with other libraries
36 | #ifdef max
37 | #undef max
38 | #endif
39 |
40 | //! Workaround for compatibility with other libraries
41 | #ifdef min
42 | #undef min
43 | #endif
44 |
45 | //! Workaround for Android
46 | #ifdef isnan
47 | #undef isnan
48 | #endif
49 |
50 | //! Workaround for Android
51 | #ifdef isinf
52 | #undef isinf
53 | #endif
54 |
55 | //! Workaround for Chrone Native Client
56 | #ifdef log2
57 | #undef log2
58 | #endif
59 |
60 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | import org.apache.tools.ant.taskdefs.condition.Os
2 |
3 | apply plugin: 'com.android.model.application'
4 |
5 | model {
6 | android {
7 |
8 | // 23 = Android Marshmallow
9 | compileSdkVersion = 23
10 | buildToolsVersion = '23.0.2'
11 |
12 | defaultConfig {
13 | applicationId "com.anandmuralidhar.cubeandroid"
14 | // assuming that device had Android KitKat (19) or above
15 | minSdkVersion.apiLevel = 19
16 | targetSdkVersion.apiLevel = 22
17 |
18 | // versionCode and versionName are relevant if you release the app on Google Play
19 | versionCode 1
20 | versionName "1.0"
21 | }
22 |
23 | ndk {
24 | platformVersion = 19
25 | moduleName = 'CubeNative' // this creates libCubeNative.so and should be loaded in Java
26 | stl = 'gnustl_static'
27 |
28 | // specify the path to jni code
29 | cppFlags.addAll(['-I' + file('src/main/jni/nativeCode/cube'),
30 | '-I' + file('src/main/jni/nativeCode/common'),
31 | '-I' + file('src/main/externals/glm-0.9.7.5')])
32 |
33 | cppFlags.addAll(['-std=c++11', '-Wall', '-fno-exceptions', '-fno-rtti'])
34 | ldLibs.addAll(['android', 'log', 'EGL', 'GLESv2', "stdc++"])
35 | }
36 |
37 | sources {
38 | main {
39 | jni {
40 | dependencies {
41 | // we use some functions from ndk_helper to simplify native tasks
42 | project ':ndk_helper' linkage 'static'
43 | project ':native_app_glue' linkage 'static'
44 | }
45 | source {
46 | srcDirs 'src/main/jni'
47 | }
48 | }
49 | jniLibs {}
50 | }
51 | }
52 |
53 | buildTypes {
54 | release {
55 | minifyEnabled = false
56 | proguardFiles.add(file('proguard-rules.txt'))
57 | }
58 | }
59 |
60 | }
61 | }
62 |
63 | dependencies {
64 | compile 'com.android.support:appcompat-v7:23.4.0'
65 | }
66 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/gtx/normalize_dot.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// Restrictions:
16 | /// By making use of the Software for military purposes, you choose to make
17 | /// a Bunny unhappy.
18 | ///
19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | /// THE SOFTWARE.
26 | ///
27 | /// @ref gtx_normalize_dot
28 | /// @file glm/gtx/normalize_dot.inl
29 | /// @date 2007-09-28 / 2008-10-07
30 | /// @author Christophe Riccio
31 | //////////////////////////////////////////////////////////////////////////////////
32 |
33 | namespace glm
34 | {
35 | template class vecType>
36 | GLM_FUNC_QUALIFIER T normalizeDot(vecType const & x, vecType const & y)
37 | {
38 | return glm::dot(x, y) * glm::inversesqrt(glm::dot(x, x) * glm::dot(y, y));
39 | }
40 |
41 | template class vecType>
42 | GLM_FUNC_QUALIFIER T fastNormalizeDot(vecType const & x, vecType const & y)
43 | {
44 | return glm::dot(x, y) * glm::fastInverseSqrt(glm::dot(x, x) * glm::dot(y, y));
45 | }
46 | }//namespace glm
47 |
--------------------------------------------------------------------------------
/app/src/main/jni/nativeCode/common/myGLCamera.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2016 Anand Muralidhar
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 |
18 | #ifndef GLCAMERA_H
19 | #define GLCAMERA_H
20 |
21 | #include
22 | #include "misc.h"
23 |
24 | // sensitivity coefficients for translating gestures to model's movements
25 | #define SCALE_TO_Z_TRANSLATION 20
26 | #define TRANSLATION_TO_ANGLE 5
27 | #define XY_TRANSLATION_FACTOR 10
28 |
29 | class MyGLCamera {
30 | public:
31 | MyGLCamera(
32 | float FOV = 45, // in degrees
33 | float zPosition = 10, // camera's location on Z axis
34 | float nearPlaneDistance = 1.0f, // as large as possible
35 | float farPlaneDistance = 2000.0f // as small as possible
36 | );
37 | void SetModelPosition(std::vector modelPosition);
38 | void SetAspectRatio(float aspect);
39 | glm::mat4 GetMVP(){ return mvpMat; }
40 | void RotateModel(float distanceX, float distanceY, float endPositionX, float endPositionY);
41 | void ScaleModel(float scaleFactor);
42 | void TranslateModel(float distanceX, float distanceY);
43 |
44 | private:
45 | void ComputeMVPMatrix();
46 |
47 | float FOV;
48 | float nearPlaneDistance, farPlaneDistance;
49 |
50 | glm::mat4 projectionViewMat;
51 | glm::mat4 rotateMat, translateMat;
52 | glm::mat4 modelMat;
53 | glm::mat4 viewMat;
54 | glm::mat4 mvpMat; // ModelViewProjection: obtained by multiplying Projection, View, & Model
55 |
56 | // six degrees-of-freedom of the model contained in a quaternion and x-y-z coordinates
57 | glm::quat modelQuaternion;
58 | float deltaX, deltaY, deltaZ;
59 | };
60 |
61 | #endif //GLCAMERA_H
62 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/gtx/transform.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// Restrictions:
16 | /// By making use of the Software for military purposes, you choose to make
17 | /// a Bunny unhappy.
18 | ///
19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | /// THE SOFTWARE.
26 | ///
27 | /// @ref gtx_transform
28 | /// @file glm/gtx/transform.inl
29 | /// @date 2005-12-21 / 2011-06-07
30 | /// @author Christophe Riccio
31 | ///////////////////////////////////////////////////////////////////////////////////
32 |
33 | namespace glm
34 | {
35 | template
36 | GLM_FUNC_QUALIFIER tmat4x4 translate(
37 | tvec3 const & v)
38 | {
39 | return translate(
40 | tmat4x4(1.0f), v);
41 | }
42 |
43 | template
44 | GLM_FUNC_QUALIFIER tmat4x4 rotate(
45 | T angle,
46 | tvec3 const & v)
47 | {
48 | return rotate(
49 | tmat4x4(1), angle, v);
50 | }
51 |
52 | template
53 | GLM_FUNC_QUALIFIER tmat4x4 scale(
54 | tvec3 const & v)
55 | {
56 | return scale(
57 | tmat4x4(1.0f), v);
58 | }
59 |
60 | }//namespace glm
61 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/gtx/handed_coordinate_space.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// Restrictions:
16 | /// By making use of the Software for military purposes, you choose to make
17 | /// a Bunny unhappy.
18 | ///
19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | /// THE SOFTWARE.
26 | ///
27 | /// @ref gtx_handed_coordinate_space
28 | /// @file glm/gtx/handed_coordinate_space.inl
29 | /// @date 2005-12-21 / 2009-02-19
30 | /// @author Christophe Riccio
31 | ///////////////////////////////////////////////////////////////////////////////////////////////////
32 |
33 | namespace glm
34 | {
35 | template
36 | GLM_FUNC_QUALIFIER bool rightHanded
37 | (
38 | tvec3 const & tangent,
39 | tvec3 const & binormal,
40 | tvec3 const & normal
41 | )
42 | {
43 | return dot(cross(normal, tangent), binormal) > T(0);
44 | }
45 |
46 | template
47 | GLM_FUNC_QUALIFIER bool leftHanded
48 | (
49 | tvec3 const & tangent,
50 | tvec3 const & binormal,
51 | tvec3 const & normal
52 | )
53 | {
54 | return dot(cross(normal, tangent), binormal) < T(0);
55 | }
56 | }//namespace glm
57 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/gtx/orthonormalize.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// Restrictions:
16 | /// By making use of the Software for military purposes, you choose to make
17 | /// a Bunny unhappy.
18 | ///
19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | /// THE SOFTWARE.
26 | ///
27 | /// @ref gtx_orthonormalize
28 | /// @file glm/gtx/orthonormalize.inl
29 | /// @date 2005-12-21 / 2011-06-07
30 | /// @author Christophe Riccio
31 | ///////////////////////////////////////////////////////////////////////////////////
32 |
33 | namespace glm
34 | {
35 | template
36 | GLM_FUNC_QUALIFIER tmat3x3 orthonormalize(tmat3x3 const & m)
37 | {
38 | tmat3x3 r = m;
39 |
40 | r[0] = normalize(r[0]);
41 |
42 | T d0 = dot(r[0], r[1]);
43 | r[1] -= r[0] * d0;
44 | r[1] = normalize(r[1]);
45 |
46 | T d1 = dot(r[1], r[2]);
47 | d0 = dot(r[0], r[2]);
48 | r[2] -= r[0] * d0 + r[1] * d1;
49 | r[2] = normalize(r[2]);
50 |
51 | return r;
52 | }
53 |
54 | template
55 | GLM_FUNC_QUALIFIER tvec3 orthonormalize(tvec3 const & x, tvec3 const & y)
56 | {
57 | return normalize(x - y * dot(y, x));
58 | }
59 | }//namespace glm
60 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/gtx/scalar_relational.hpp:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// Restrictions:
16 | /// By making use of the Software for military purposes, you choose to make
17 | /// a Bunny unhappy.
18 | ///
19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | /// THE SOFTWARE.
26 | ///
27 | /// @ref gtx_scalar_relational
28 | /// @file glm/gtx/scalar_relational.hpp
29 | /// @date 2013-02-04 / 2013-02-04
30 | /// @author Christophe Riccio
31 | ///
32 | /// @see core (dependence)
33 | ///
34 | /// @defgroup gtx_scalar_relational GLM_GTX_scalar_relational
35 | /// @ingroup gtx
36 | ///
37 | /// @brief Extend a position from a source to a position at a defined length.
38 | ///
39 | /// need to be included to use these functionalities.
40 | ///////////////////////////////////////////////////////////////////////////////////
41 |
42 | #pragma once
43 |
44 | // Dependency:
45 | #include "../glm.hpp"
46 |
47 | #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
48 | # pragma message("GLM: GLM_GTX_extend extension included")
49 | #endif
50 |
51 | namespace glm
52 | {
53 | /// @addtogroup gtx_scalar_relational
54 | /// @{
55 |
56 |
57 |
58 | /// @}
59 | }//namespace glm
60 |
61 | #include "scalar_relational.inl"
62 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/gtx/matrix_cross_product.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// Restrictions:
16 | /// By making use of the Software for military purposes, you choose to make
17 | /// a Bunny unhappy.
18 | ///
19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | /// THE SOFTWARE.
26 | ///
27 | /// @ref gtx_matrix_cross_product
28 | /// @file glm/gtx/matrix_cross_product.inl
29 | /// @date 2005-12-21 / 2005-12-21
30 | /// @author Christophe Riccio
31 | ///////////////////////////////////////////////////////////////////////////////////
32 |
33 | namespace glm
34 | {
35 | template
36 | GLM_FUNC_QUALIFIER tmat3x3 matrixCross3
37 | (
38 | tvec3 const & x
39 | )
40 | {
41 | tmat3x3 Result(T(0));
42 | Result[0][1] = x.z;
43 | Result[1][0] = -x.z;
44 | Result[0][2] = -x.y;
45 | Result[2][0] = x.y;
46 | Result[1][2] = x.x;
47 | Result[2][1] = -x.x;
48 | return Result;
49 | }
50 |
51 | template
52 | GLM_FUNC_QUALIFIER tmat4x4 matrixCross4
53 | (
54 | tvec3 const & x
55 | )
56 | {
57 | tmat4x4 Result(T(0));
58 | Result[0][1] = x.z;
59 | Result[1][0] = -x.z;
60 | Result[0][2] = -x.y;
61 | Result[2][0] = x.y;
62 | Result[1][2] = x.x;
63 | Result[2][1] = -x.x;
64 | return Result;
65 | }
66 |
67 | }//namespace glm
68 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/gtx/projection.hpp:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// Restrictions:
16 | /// By making use of the Software for military purposes, you choose to make
17 | /// a Bunny unhappy.
18 | ///
19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | /// THE SOFTWARE.
26 | ///
27 | /// @ref gtx_projection
28 | /// @file glm/gtx/projection.hpp
29 | /// @date 2005-12-21 / 2011-06-07
30 | /// @author Christophe Riccio
31 | ///
32 | /// @see core (dependence)
33 | ///
34 | /// @defgroup gtx_projection GLM_GTX_projection
35 | /// @ingroup gtx
36 | ///
37 | /// @brief Projection of a vector to other one
38 | ///
39 | /// need to be included to use these functionalities.
40 | ///////////////////////////////////////////////////////////////////////////////////
41 |
42 | #pragma once
43 |
44 | // Dependency:
45 | #include "../geometric.hpp"
46 |
47 | #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
48 | # pragma message("GLM: GLM_GTX_projection extension included")
49 | #endif
50 |
51 | namespace glm
52 | {
53 | /// @addtogroup gtx_projection
54 | /// @{
55 |
56 | /// Projects x on Normal.
57 | ///
58 | /// @see gtx_projection
59 | template
60 | GLM_FUNC_DECL vecType proj(vecType const & x, vecType const & Normal);
61 |
62 | /// @}
63 | }//namespace glm
64 |
65 | #include "projection.inl"
66 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/detail/intrinsic_geometric.hpp:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | /// THE SOFTWARE.
22 | ///
23 | /// @ref core
24 | /// @file glm/detail/intrinsic_geometric.hpp
25 | /// @date 2009-05-08 / 2011-06-15
26 | /// @author Christophe Riccio
27 | ///////////////////////////////////////////////////////////////////////////////////
28 |
29 | #pragma once
30 |
31 | #include "setup.hpp"
32 |
33 | #if(!(GLM_ARCH & GLM_ARCH_SSE2))
34 | # error "SSE2 instructions not supported or enabled"
35 | #else
36 |
37 | #include "intrinsic_common.hpp"
38 |
39 | namespace glm{
40 | namespace detail
41 | {
42 | //length
43 | __m128 sse_len_ps(__m128 x);
44 |
45 | //distance
46 | __m128 sse_dst_ps(__m128 p0, __m128 p1);
47 |
48 | //dot
49 | __m128 sse_dot_ps(__m128 v1, __m128 v2);
50 |
51 | // SSE1
52 | __m128 sse_dot_ss(__m128 v1, __m128 v2);
53 |
54 | //cross
55 | __m128 sse_xpd_ps(__m128 v1, __m128 v2);
56 |
57 | //normalize
58 | __m128 sse_nrm_ps(__m128 v);
59 |
60 | //faceforward
61 | __m128 sse_ffd_ps(__m128 N, __m128 I, __m128 Nref);
62 |
63 | //reflect
64 | __m128 sse_rfe_ps(__m128 I, __m128 N);
65 |
66 | //refract
67 | __m128 sse_rfa_ps(__m128 I, __m128 N, __m128 eta);
68 |
69 | }//namespace detail
70 | }//namespace glm
71 |
72 | #include "intrinsic_geometric.inl"
73 |
74 | #endif//GLM_ARCH
75 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/gtx/polar_coordinates.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// Restrictions:
16 | /// By making use of the Software for military purposes, you choose to make
17 | /// a Bunny unhappy.
18 | ///
19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | /// THE SOFTWARE.
26 | ///
27 | /// @ref gtx_polar_coordinates
28 | /// @file glm/gtx/polar_coordinates.inl
29 | /// @date 2007-03-06 / 2011-06-07
30 | /// @author Christophe Riccio
31 | ///////////////////////////////////////////////////////////////////////////////////
32 |
33 | namespace glm
34 | {
35 | template
36 | GLM_FUNC_QUALIFIER tvec3 polar
37 | (
38 | tvec3 const & euclidean
39 | )
40 | {
41 | T const Length(length(euclidean));
42 | tvec3 const tmp(euclidean / Length);
43 | T const xz_dist(sqrt(tmp.x * tmp.x + tmp.z * tmp.z));
44 |
45 | return tvec3(
46 | atan(xz_dist, tmp.y), // latitude
47 | atan(tmp.x, tmp.z), // longitude
48 | xz_dist); // xz distance
49 | }
50 |
51 | template
52 | GLM_FUNC_QUALIFIER tvec3 euclidean
53 | (
54 | tvec2 const & polar
55 | )
56 | {
57 | T const latitude(polar.x);
58 | T const longitude(polar.y);
59 |
60 | return tvec3(
61 | cos(latitude) * sin(longitude),
62 | sin(latitude),
63 | cos(latitude) * cos(longitude));
64 | }
65 |
66 | }//namespace glm
67 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/detail/intrinsic_matrix.hpp:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | /// THE SOFTWARE.
22 | ///
23 | /// @ref core
24 | /// @file glm/detail/intrinsic_common.hpp
25 | /// @date 2009-06-05 / 2011-06-15
26 | /// @author Christophe Riccio
27 | ///////////////////////////////////////////////////////////////////////////////////
28 |
29 | #pragma once
30 |
31 | #include "setup.hpp"
32 |
33 | #if(!(GLM_ARCH & GLM_ARCH_SSE2))
34 | # error "SSE2 instructions not supported or enabled"
35 | #else
36 |
37 | #include "intrinsic_geometric.hpp"
38 |
39 | namespace glm{
40 | namespace detail
41 | {
42 | void sse_add_ps(__m128 in1[4], __m128 in2[4], __m128 out[4]);
43 |
44 | void sse_sub_ps(__m128 in1[4], __m128 in2[4], __m128 out[4]);
45 |
46 | __m128 sse_mul_ps(__m128 m[4], __m128 v);
47 |
48 | __m128 sse_mul_ps(__m128 v, __m128 m[4]);
49 |
50 | void sse_mul_ps(__m128 const in1[4], __m128 const in2[4], __m128 out[4]);
51 |
52 | void sse_transpose_ps(__m128 const in[4], __m128 out[4]);
53 |
54 | void sse_inverse_ps(__m128 const in[4], __m128 out[4]);
55 |
56 | void sse_rotate_ps(__m128 const in[4], float Angle, float const v[3], __m128 out[4]);
57 |
58 | __m128 sse_det_ps(__m128 const m[4]);
59 |
60 | __m128 sse_slow_det_ps(__m128 const m[4]);
61 |
62 | }//namespace detail
63 | }//namespace glm
64 |
65 | #include "intrinsic_matrix.inl"
66 |
67 | #endif//GLM_ARCH
68 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/gtx/mixed_product.hpp:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// Restrictions:
16 | /// By making use of the Software for military purposes, you choose to make
17 | /// a Bunny unhappy.
18 | ///
19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | /// THE SOFTWARE.
26 | ///
27 | /// @ref gtx_mixed_product
28 | /// @file glm/gtx/mixed_product.hpp
29 | /// @date 2007-04-03 / 2011-06-07
30 | /// @author Christophe Riccio
31 | ///
32 | /// @see core (dependence)
33 | ///
34 | /// @defgroup gtx_mixed_product GLM_GTX_mixed_producte
35 | /// @ingroup gtx
36 | ///
37 | /// @brief Mixed product of 3 vectors.
38 | ///
39 | /// need to be included to use these functionalities.
40 | ///////////////////////////////////////////////////////////////////////////////////
41 |
42 | #pragma once
43 |
44 | // Dependency:
45 | #include "../glm.hpp"
46 |
47 | #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
48 | # pragma message("GLM: GLM_GTX_mixed_product extension included")
49 | #endif
50 |
51 | namespace glm
52 | {
53 | /// @addtogroup gtx_mixed_product
54 | /// @{
55 |
56 | /// @brief Mixed product of 3 vectors (from GLM_GTX_mixed_product extension)
57 | template
58 | GLM_FUNC_DECL T mixedProduct(
59 | tvec3 const & v1,
60 | tvec3 const & v2,
61 | tvec3 const & v3);
62 |
63 | /// @}
64 | }// namespace glm
65 |
66 | #include "mixed_product.inl"
67 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/gtx/extend.hpp:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// Restrictions:
16 | /// By making use of the Software for military purposes, you choose to make
17 | /// a Bunny unhappy.
18 | ///
19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | /// THE SOFTWARE.
26 | ///
27 | /// @ref gtx_extend
28 | /// @file glm/gtx/extend.hpp
29 | /// @date 2006-01-07 / 2011-06-07
30 | /// @author Christophe Riccio
31 | ///
32 | /// @see core (dependence)
33 | ///
34 | /// @defgroup gtx_extend GLM_GTX_extend
35 | /// @ingroup gtx
36 | ///
37 | /// @brief Extend a position from a source to a position at a defined length.
38 | ///
39 | /// need to be included to use these functionalities.
40 | ///////////////////////////////////////////////////////////////////////////////////
41 |
42 | #pragma once
43 |
44 | // Dependency:
45 | #include "../glm.hpp"
46 |
47 | #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
48 | # pragma message("GLM: GLM_GTX_extend extension included")
49 | #endif
50 |
51 | namespace glm
52 | {
53 | /// @addtogroup gtx_extend
54 | /// @{
55 |
56 | /// Extends of Length the Origin position using the (Source - Origin) direction.
57 | /// @see gtx_extend
58 | template
59 | GLM_FUNC_DECL genType extend(
60 | genType const & Origin,
61 | genType const & Source,
62 | typename genType::value_type const Length);
63 |
64 | /// @}
65 | }//namespace glm
66 |
67 | #include "extend.inl"
68 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/gtx/normal.hpp:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// Restrictions:
16 | /// By making use of the Software for military purposes, you choose to make
17 | /// a Bunny unhappy.
18 | ///
19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | /// THE SOFTWARE.
26 | ///
27 | /// @ref gtx_normal
28 | /// @file glm/gtx/normal.hpp
29 | /// @date 2005-12-21 / 2011-06-07
30 | /// @author Christophe Riccio
31 | ///
32 | /// @see core (dependence)
33 | /// @see gtx_extented_min_max (dependence)
34 | ///
35 | /// @defgroup gtx_normal GLM_GTX_normal
36 | /// @ingroup gtx
37 | ///
38 | /// @brief Compute the normal of a triangle.
39 | ///
40 | /// need to be included to use these functionalities.
41 | ///////////////////////////////////////////////////////////////////////////////////
42 |
43 | #pragma once
44 |
45 | // Dependency:
46 | #include "../glm.hpp"
47 |
48 | #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
49 | # pragma message("GLM: GLM_GTX_normal extension included")
50 | #endif
51 |
52 | namespace glm
53 | {
54 | /// @addtogroup gtx_normal
55 | /// @{
56 |
57 | //! Computes triangle normal from triangle points.
58 | //! From GLM_GTX_normal extension.
59 | template
60 | GLM_FUNC_DECL tvec3 triangleNormal(
61 | tvec3 const & p1,
62 | tvec3 const & p2,
63 | tvec3 const & p3);
64 |
65 | /// @}
66 | }//namespace glm
67 |
68 | #include "normal.inl"
69 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/gtx/perpendicular.hpp:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// Restrictions:
16 | /// By making use of the Software for military purposes, you choose to make
17 | /// a Bunny unhappy.
18 | ///
19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | /// THE SOFTWARE.
26 | ///
27 | /// @ref gtx_perpendicular
28 | /// @file glm/gtx/perpendicular.hpp
29 | /// @date 2005-12-21 / 2011-06-07
30 | /// @author Christophe Riccio
31 | ///
32 | /// @see core (dependence)
33 | /// @see gtx_projection (dependence)
34 | ///
35 | /// @defgroup gtx_perpendicular GLM_GTX_perpendicular
36 | /// @ingroup gtx
37 | ///
38 | /// @brief Perpendicular of a vector from other one
39 | ///
40 | /// need to be included to use these functionalities.
41 | ///////////////////////////////////////////////////////////////////////////////////
42 |
43 | #pragma once
44 |
45 | // Dependency:
46 | #include "../glm.hpp"
47 | #include "../gtx/projection.hpp"
48 |
49 | #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
50 | # pragma message("GLM: GLM_GTX_perpendicular extension included")
51 | #endif
52 |
53 | namespace glm
54 | {
55 | /// @addtogroup gtx_perpendicular
56 | /// @{
57 |
58 | //! Projects x a perpendicular axis of Normal.
59 | //! From GLM_GTX_perpendicular extension.
60 | template
61 | GLM_FUNC_DECL vecType perp(
62 | vecType const & x,
63 | vecType const & Normal);
64 |
65 | /// @}
66 | }//namespace glm
67 |
68 | #include "perpendicular.inl"
69 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/app/src/main/jni/nativeCode/common/myGLFunctions.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2016 Anand Muralidhar
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #include "myGLFunctions.h"
18 | #include
19 | #include "myLogger.h"
20 |
21 | /**
22 | * Basic initializations for GL.
23 | */
24 | void MyGLInits() {
25 |
26 | // Black background
27 | glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
28 |
29 | // Enable depth test
30 | glEnable(GL_DEPTH_TEST);
31 | // Accept fragment if it closer to the camera than the former one
32 | glDepthFunc(GL_LEQUAL);
33 |
34 | MyLOGI("OpenGL %s, GLSL %s", glGetString(GL_VERSION), glGetString(GL_SHADING_LANGUAGE_VERSION));
35 |
36 | // check if the device supports GLES 3 or GLES 2
37 | const char* versionStr = (const char*)glGetString(GL_VERSION);
38 | if (strstr(versionStr, "OpenGL ES 3.") && gl3stubInit()) {
39 | MyLOGD("Device supports GLES 3");
40 | } else {
41 | MyLOGD("Device supports GLES 2");
42 | }
43 |
44 | CheckGLError("MyGLInits");
45 | }
46 |
47 | /**
48 | * Checks for OpenGL errors.
49 | */
50 | void CheckGLError(std::string funcName){
51 |
52 | GLenum err = glGetError();
53 | if (err == GL_NO_ERROR) {
54 | return;
55 | } else {
56 | MyLOGF("[FAIL GL] %s", funcName.c_str());
57 | }
58 |
59 | switch(err) {
60 |
61 | case GL_INVALID_ENUM:
62 | MyLOGE("GL_INVALID_ENUM: GLenum argument out of range");
63 | break;
64 |
65 | case GL_INVALID_VALUE:
66 | MyLOGE("GL_INVALID_VALUE: numeric argument out of range");
67 | break;
68 |
69 | case GL_INVALID_OPERATION:
70 | MyLOGE("GL_INVALID_OPERATION: operation illegal in current state");
71 | break;
72 |
73 | case GL_INVALID_FRAMEBUFFER_OPERATION:
74 | MyLOGE("GL_INVALID_FRAMEBUFFER_OPERATION: framebuffer object is not complete");
75 | break;
76 |
77 | case GL_OUT_OF_MEMORY:
78 | MyLOGE( "GL_OUT_OF_MEMORY: not enough memory left to execute command");
79 | break;
80 |
81 | default:
82 | MyLOGE("unlisted error");
83 | break;
84 | }
85 | }
86 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/gtx/gradient_paint.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// Restrictions:
16 | /// By making use of the Software for military purposes, you choose to make
17 | /// a Bunny unhappy.
18 | ///
19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | /// THE SOFTWARE.
26 | ///
27 | /// @ref gtx_gradient_paint
28 | /// @file glm/gtx/gradient_paint.inl
29 | /// @date 2009-03-06 / 2013-04-09
30 | /// @author Christophe Riccio
31 | ///////////////////////////////////////////////////////////////////////////////////////////////////
32 |
33 | namespace glm
34 | {
35 | template
36 | GLM_FUNC_QUALIFIER T radialGradient
37 | (
38 | tvec2 const & Center,
39 | T const & Radius,
40 | tvec2 const & Focal,
41 | tvec2 const & Position
42 | )
43 | {
44 | tvec2 F = Focal - Center;
45 | tvec2 D = Position - Focal;
46 | T Radius2 = pow2(Radius);
47 | T Fx2 = pow2(F.x);
48 | T Fy2 = pow2(F.y);
49 |
50 | T Numerator = (D.x * F.x + D.y * F.y) + sqrt(Radius2 * (pow2(D.x) + pow2(D.y)) - pow2(D.x * F.y - D.y * F.x));
51 | T Denominator = Radius2 - (Fx2 + Fy2);
52 | return Numerator / Denominator;
53 | }
54 |
55 | template
56 | GLM_FUNC_QUALIFIER T linearGradient
57 | (
58 | tvec2 const & Point0,
59 | tvec2 const & Point1,
60 | tvec2 const & Position
61 | )
62 | {
63 | tvec2 Dist = Point1 - Point0;
64 | return (Dist.x * (Position.x - Point0.x) + Dist.y * (Position.y - Point0.y)) / glm::dot(Dist, Dist);
65 | }
66 | }//namespace glm
67 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/gtx/extend.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// Restrictions:
16 | /// By making use of the Software for military purposes, you choose to make
17 | /// a Bunny unhappy.
18 | ///
19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | /// THE SOFTWARE.
26 | ///
27 | /// @ref gtx_extend
28 | /// @file glm/gtx/extend.inl
29 | /// @date 2006-01-07 / 2011-06-07
30 | /// @author Christophe Riccio
31 | ///////////////////////////////////////////////////////////////////////////////////////////////////
32 |
33 | namespace glm
34 | {
35 | template
36 | GLM_FUNC_QUALIFIER genType extend
37 | (
38 | genType const & Origin,
39 | genType const & Source,
40 | genType const & Distance
41 | )
42 | {
43 | return Origin + (Source - Origin) * Distance;
44 | }
45 |
46 | template
47 | GLM_FUNC_QUALIFIER tvec2 extend
48 | (
49 | tvec2 const & Origin,
50 | tvec2 const & Source,
51 | T const & Distance
52 | )
53 | {
54 | return Origin + (Source - Origin) * Distance;
55 | }
56 |
57 | template
58 | GLM_FUNC_QUALIFIER tvec3 extend
59 | (
60 | tvec3 const & Origin,
61 | tvec3 const & Source,
62 | T const & Distance
63 | )
64 | {
65 | return Origin + (Source - Origin) * Distance;
66 | }
67 |
68 | template
69 | GLM_FUNC_QUALIFIER tvec4 extend
70 | (
71 | tvec4 const & Origin,
72 | tvec4 const & Source,
73 | T const & Distance
74 | )
75 | {
76 | return Origin + (Source - Origin) * Distance;
77 | }
78 | }//namespace glm
79 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/gtx/log_base.hpp:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// Restrictions:
16 | /// By making use of the Software for military purposes, you choose to make
17 | /// a Bunny unhappy.
18 | ///
19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | /// THE SOFTWARE.
26 | ///
27 | /// @ref gtx_log_base
28 | /// @file glm/gtx/log_base.hpp
29 | /// @date 2008-10-24 / 2011-06-07
30 | /// @author Christophe Riccio
31 | ///
32 | /// @see core (dependence)
33 | ///
34 | /// @defgroup gtx_log_base GLM_GTX_log_base
35 | /// @ingroup gtx
36 | ///
37 | /// @brief Logarithm for any base. base can be a vector or a scalar.
38 | ///
39 | /// need to be included to use these functionalities.
40 | ///////////////////////////////////////////////////////////////////////////////////
41 |
42 | #pragma once
43 |
44 | // Dependency:
45 | #include "../glm.hpp"
46 |
47 | #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
48 | # pragma message("GLM: GLM_GTX_log_base extension included")
49 | #endif
50 |
51 | namespace glm
52 | {
53 | /// @addtogroup gtx_log_base
54 | /// @{
55 |
56 | /// Logarithm for any base.
57 | /// From GLM_GTX_log_base.
58 | template
59 | GLM_FUNC_DECL genType log(
60 | genType const & x,
61 | genType const & base);
62 |
63 | /// Logarithm for any base.
64 | /// From GLM_GTX_log_base.
65 | template class vecType>
66 | GLM_FUNC_DECL vecType sign(
67 | vecType const & x,
68 | vecType const & base);
69 |
70 | /// @}
71 | }//namespace glm
72 |
73 | #include "log_base.inl"
74 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/gtx/raw_data.hpp:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// Restrictions:
16 | /// By making use of the Software for military purposes, you choose to make
17 | /// a Bunny unhappy.
18 | ///
19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | /// THE SOFTWARE.
26 | ///
27 | /// @ref gtx_raw_data
28 | /// @file glm/gtx/raw_data.hpp
29 | /// @date 2008-11-19 / 2011-06-07
30 | /// @author Christophe Riccio
31 | ///
32 | /// @see core (dependence)
33 | ///
34 | /// @defgroup gtx_raw_data GLM_GTX_raw_data
35 | /// @ingroup gtx
36 | ///
37 | /// @brief Projection of a vector to other one
38 | ///
39 | /// need to be included to use these functionalities.
40 | ///////////////////////////////////////////////////////////////////////////////////
41 |
42 | #pragma once
43 |
44 | // Dependencies
45 | #include "../detail/setup.hpp"
46 | #include "../detail/type_int.hpp"
47 |
48 | #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
49 | # pragma message("GLM: GLM_GTX_raw_data extension included")
50 | #endif
51 |
52 | namespace glm
53 | {
54 | /// @addtogroup gtx_raw_data
55 | /// @{
56 |
57 | //! Type for byte numbers.
58 | //! From GLM_GTX_raw_data extension.
59 | typedef detail::uint8 byte;
60 |
61 | //! Type for word numbers.
62 | //! From GLM_GTX_raw_data extension.
63 | typedef detail::uint16 word;
64 |
65 | //! Type for dword numbers.
66 | //! From GLM_GTX_raw_data extension.
67 | typedef detail::uint32 dword;
68 |
69 | //! Type for qword numbers.
70 | //! From GLM_GTX_raw_data extension.
71 | typedef detail::uint64 qword;
72 |
73 | /// @}
74 | }// namespace glm
75 |
76 | #include "raw_data.inl"
77 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/detail/intrinsic_common.hpp:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | /// THE SOFTWARE.
22 | ///
23 | /// @ref core
24 | /// @file glm/detail/intrinsic_common.hpp
25 | /// @date 2009-05-11 / 2011-06-15
26 | /// @author Christophe Riccio
27 | ///////////////////////////////////////////////////////////////////////////////////
28 |
29 | #pragma once
30 |
31 | #include "setup.hpp"
32 |
33 | #if(!(GLM_ARCH & GLM_ARCH_SSE2))
34 | # error "SSE2 instructions not supported or enabled"
35 | #else
36 |
37 | namespace glm{
38 | namespace detail
39 | {
40 | __m128 sse_abs_ps(__m128 x);
41 |
42 | __m128 sse_sgn_ps(__m128 x);
43 |
44 | //floor
45 | __m128 sse_flr_ps(__m128 v);
46 |
47 | //trunc
48 | __m128 sse_trc_ps(__m128 v);
49 |
50 | //round
51 | __m128 sse_nd_ps(__m128 v);
52 |
53 | //roundEven
54 | __m128 sse_rde_ps(__m128 v);
55 |
56 | __m128 sse_rnd_ps(__m128 x);
57 |
58 | __m128 sse_ceil_ps(__m128 v);
59 |
60 | __m128 sse_frc_ps(__m128 x);
61 |
62 | __m128 sse_mod_ps(__m128 x, __m128 y);
63 |
64 | __m128 sse_modf_ps(__m128 x, __m128i & i);
65 |
66 | //GLM_FUNC_QUALIFIER __m128 sse_min_ps(__m128 x, __m128 y)
67 |
68 | //GLM_FUNC_QUALIFIER __m128 sse_max_ps(__m128 x, __m128 y)
69 |
70 | __m128 sse_clp_ps(__m128 v, __m128 minVal, __m128 maxVal);
71 |
72 | __m128 sse_mix_ps(__m128 v1, __m128 v2, __m128 a);
73 |
74 | __m128 sse_stp_ps(__m128 edge, __m128 x);
75 |
76 | __m128 sse_ssp_ps(__m128 edge0, __m128 edge1, __m128 x);
77 |
78 | __m128 sse_nan_ps(__m128 x);
79 |
80 | __m128 sse_inf_ps(__m128 x);
81 |
82 | }//namespace detail
83 | }//namespace glm
84 |
85 | #include "intrinsic_common.inl"
86 |
87 | #endif//GLM_ARCH
88 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/gtc/integer.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// Restrictions:
16 | /// By making use of the Software for military purposes, you choose to make
17 | /// a Bunny unhappy.
18 | ///
19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | /// THE SOFTWARE.
26 | ///
27 | /// @ref gtc_integer
28 | /// @file glm/gtc/integer.inl
29 | /// @date 2014-11-17 / 2014-11-17
30 | /// @author Christophe Riccio
31 | ///////////////////////////////////////////////////////////////////////////////////
32 |
33 | namespace glm{
34 | namespace detail
35 | {
36 | template class vecType>
37 | struct compute_log2
38 | {
39 | GLM_FUNC_QUALIFIER static vecType call(vecType const & vec)
40 | {
41 | //Equivalent to return findMSB(vec); but save one function call in ASM with VC
42 | //return findMSB(vec);
43 | return vecType(detail::compute_findMSB_vec::call(vec));
44 | }
45 | };
46 |
47 | # if GLM_HAS_BITSCAN_WINDOWS
48 | template
49 | struct compute_log2
50 | {
51 | GLM_FUNC_QUALIFIER static tvec4 call(tvec4 const & vec)
52 | {
53 | tvec4 Result(glm::uninitialize);
54 |
55 | _BitScanReverse(reinterpret_cast(&Result.x), vec.x);
56 | _BitScanReverse(reinterpret_cast(&Result.y), vec.y);
57 | _BitScanReverse(reinterpret_cast(&Result.z), vec.z);
58 | _BitScanReverse(reinterpret_cast(&Result.w), vec.w);
59 |
60 | return Result;
61 | }
62 | };
63 | # endif//GLM_HAS_BITSCAN_WINDOWS
64 | }//namespace detail
65 | }//namespace glm
66 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/gtx/matrix_cross_product.hpp:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// Restrictions:
16 | /// By making use of the Software for military purposes, you choose to make
17 | /// a Bunny unhappy.
18 | ///
19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | /// THE SOFTWARE.
26 | ///
27 | /// @ref gtx_matrix_cross_product
28 | /// @file glm/gtx/matrix_cross_product.hpp
29 | /// @date 2005-12-21 / 2011-06-07
30 | /// @author Christophe Riccio
31 | ///
32 | /// @see core (dependence)
33 | /// @see gtx_extented_min_max (dependence)
34 | ///
35 | /// @defgroup gtx_matrix_cross_product GLM_GTX_matrix_cross_product
36 | /// @ingroup gtx
37 | ///
38 | /// @brief Build cross product matrices
39 | ///
40 | /// need to be included to use these functionalities.
41 | ///////////////////////////////////////////////////////////////////////////////////
42 |
43 | #pragma once
44 |
45 | // Dependency:
46 | #include "../glm.hpp"
47 |
48 | #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
49 | # pragma message("GLM: GLM_GTX_matrix_cross_product extension included")
50 | #endif
51 |
52 | namespace glm
53 | {
54 | /// @addtogroup gtx_matrix_cross_product
55 | /// @{
56 |
57 | //! Build a cross product matrix.
58 | //! From GLM_GTX_matrix_cross_product extension.
59 | template
60 | GLM_FUNC_DECL tmat3x3 matrixCross3(
61 | tvec3 const & x);
62 |
63 | //! Build a cross product matrix.
64 | //! From GLM_GTX_matrix_cross_product extension.
65 | template
66 | GLM_FUNC_DECL tmat4x4 matrixCross4(
67 | tvec3 const & x);
68 |
69 | /// @}
70 | }//namespace glm
71 |
72 | #include "matrix_cross_product.inl"
73 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/gtx/orthonormalize.hpp:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// Restrictions:
16 | /// By making use of the Software for military purposes, you choose to make
17 | /// a Bunny unhappy.
18 | ///
19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | /// THE SOFTWARE.
26 | ///
27 | /// @ref gtx_orthonormalize
28 | /// @file glm/gtx/orthonormalize.hpp
29 | /// @date 2005-12-21 / 2011-06-07
30 | /// @author Christophe Riccio
31 | ///
32 | /// @see core (dependence)
33 | /// @see gtx_extented_min_max (dependence)
34 | ///
35 | /// @defgroup gtx_orthonormalize GLM_GTX_orthonormalize
36 | /// @ingroup gtx
37 | ///
38 | /// @brief Orthonormalize matrices.
39 | ///
40 | /// need to be included to use these functionalities.
41 | ///////////////////////////////////////////////////////////////////////////////////
42 |
43 | #pragma once
44 |
45 | // Dependency:
46 | #include "../vec3.hpp"
47 | #include "../mat3x3.hpp"
48 | #include "../geometric.hpp"
49 |
50 | #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
51 | # pragma message("GLM: GLM_GTX_orthonormalize extension included")
52 | #endif
53 |
54 | namespace glm
55 | {
56 | /// @addtogroup gtx_orthonormalize
57 | /// @{
58 |
59 | /// Returns the orthonormalized matrix of m.
60 | ///
61 | /// @see gtx_orthonormalize
62 | template
63 | GLM_FUNC_DECL tmat3x3 orthonormalize(tmat3x3 const & m);
64 |
65 | /// Orthonormalizes x according y.
66 | ///
67 | /// @see gtx_orthonormalize
68 | template
69 | GLM_FUNC_DECL tvec3 orthonormalize(tvec3 const & x, tvec3 const & y);
70 |
71 | /// @}
72 | }//namespace glm
73 |
74 | #include "orthonormalize.inl"
75 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/gtx/polar_coordinates.hpp:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// Restrictions:
16 | /// By making use of the Software for military purposes, you choose to make
17 | /// a Bunny unhappy.
18 | ///
19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | /// THE SOFTWARE.
26 | ///
27 | /// @ref gtx_polar_coordinates
28 | /// @file glm/gtx/polar_coordinates.hpp
29 | /// @date 2007-03-06 / 2011-06-07
30 | /// @author Christophe Riccio
31 | ///
32 | /// @see core (dependence)
33 | ///
34 | /// @defgroup gtx_polar_coordinates GLM_GTX_polar_coordinates
35 | /// @ingroup gtx
36 | ///
37 | /// @brief Conversion from Euclidean space to polar space and revert.
38 | ///
39 | /// need to be included to use these functionalities.
40 | ///////////////////////////////////////////////////////////////////////////////////
41 |
42 | #pragma once
43 |
44 | // Dependency:
45 | #include "../glm.hpp"
46 |
47 | #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
48 | # pragma message("GLM: GLM_GTX_polar_coordinates extension included")
49 | #endif
50 |
51 | namespace glm
52 | {
53 | /// @addtogroup gtx_polar_coordinates
54 | /// @{
55 |
56 | /// Convert Euclidean to Polar coordinates, x is the xz distance, y, the latitude and z the longitude.
57 | ///
58 | /// @see gtx_polar_coordinates
59 | template
60 | GLM_FUNC_DECL tvec3 polar(
61 | tvec3 const & euclidean);
62 |
63 | /// Convert Polar to Euclidean coordinates.
64 | ///
65 | /// @see gtx_polar_coordinates
66 | template
67 | GLM_FUNC_DECL tvec3 euclidean(
68 | tvec2 const & polar);
69 |
70 | /// @}
71 | }//namespace glm
72 |
73 | #include "polar_coordinates.inl"
74 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/gtx/closest_point.hpp:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// Restrictions:
16 | /// By making use of the Software for military purposes, you choose to make
17 | /// a Bunny unhappy.
18 | ///
19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | /// THE SOFTWARE.
26 | ///
27 | /// @ref gtx_closest_point
28 | /// @file glm/gtx/closest_point.hpp
29 | /// @date 2005-12-30 / 2011-06-07
30 | /// @author Christophe Riccio
31 | ///
32 | /// @see core (dependence)
33 | ///
34 | /// @defgroup gtx_closest_point GLM_GTX_closest_point
35 | /// @ingroup gtx
36 | ///
37 | /// @brief Find the point on a straight line which is the closet of a point.
38 | ///
39 | /// need to be included to use these functionalities.
40 | ///////////////////////////////////////////////////////////////////////////////////
41 |
42 | #pragma once
43 |
44 | // Dependency:
45 | #include "../glm.hpp"
46 |
47 | #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
48 | # pragma message("GLM: GLM_GTX_closest_point extension included")
49 | #endif
50 |
51 | namespace glm
52 | {
53 | /// @addtogroup gtx_closest_point
54 | /// @{
55 |
56 | /// Find the point on a straight line which is the closet of a point.
57 | /// @see gtx_closest_point
58 | template
59 | GLM_FUNC_DECL tvec3 closestPointOnLine(
60 | tvec3 const & point,
61 | tvec3 const & a,
62 | tvec3 const & b);
63 |
64 | /// 2d lines work as well
65 | template
66 | GLM_FUNC_DECL tvec2 closestPointOnLine(
67 | tvec2 const & point,
68 | tvec2 const & a,
69 | tvec2 const & b);
70 |
71 | /// @}
72 | }// namespace glm
73 |
74 | #include "closest_point.inl"
75 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/gtx/optimum_pow.hpp:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// Restrictions:
16 | /// By making use of the Software for military purposes, you choose to make
17 | /// a Bunny unhappy.
18 | ///
19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | /// THE SOFTWARE.
26 | ///
27 | /// @ref gtx_optimum_pow
28 | /// @file glm/gtx/optimum_pow.hpp
29 | /// @date 2005-12-21 / 2011-06-07
30 | /// @author Christophe Riccio
31 | ///
32 | /// @see core (dependence)
33 | ///
34 | /// @defgroup gtx_optimum_pow GLM_GTX_optimum_pow
35 | /// @ingroup gtx
36 | ///
37 | /// @brief Integer exponentiation of power functions.
38 | ///
39 | /// need to be included to use these functionalities.
40 | ///////////////////////////////////////////////////////////////////////////////////
41 |
42 | #pragma once
43 |
44 | // Dependency:
45 | #include "../glm.hpp"
46 |
47 | #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
48 | # pragma message("GLM: GLM_GTX_optimum_pow extension included")
49 | #endif
50 |
51 | namespace glm{
52 | namespace gtx
53 | {
54 | /// @addtogroup gtx_optimum_pow
55 | /// @{
56 |
57 | /// Returns x raised to the power of 2.
58 | ///
59 | /// @see gtx_optimum_pow
60 | template
61 | GLM_FUNC_DECL genType pow2(genType const & x);
62 |
63 | /// Returns x raised to the power of 3.
64 | ///
65 | /// @see gtx_optimum_pow
66 | template
67 | GLM_FUNC_DECL genType pow3(genType const & x);
68 |
69 | /// Returns x raised to the power of 4.
70 | ///
71 | /// @see gtx_optimum_pow
72 | template
73 | GLM_FUNC_DECL genType pow4(genType const & x);
74 |
75 | /// @}
76 | }//namespace gtx
77 | }//namespace glm
78 |
79 | #include "optimum_pow.inl"
80 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/gtx/matrix_decompose.hpp:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// Restrictions:
16 | /// By making use of the Software for military purposes, you choose to make
17 | /// a Bunny unhappy.
18 | ///
19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | /// THE SOFTWARE.
26 | ///
27 | /// @ref gtx_matrix_decompose
28 | /// @file glm/gtx/matrix_decompose.hpp
29 | /// @date 2014-08-29 / 2014-08-29
30 | /// @author Christophe Riccio
31 | ///
32 | /// @see core (dependence)
33 | ///
34 | /// @defgroup gtx_matrix_decompose GLM_GTX_matrix_decompose
35 | /// @ingroup gtx
36 | ///
37 | /// @brief Decomposes a model matrix to translations, rotation and scale components
38 | ///
39 | /// need to be included to use these functionalities.
40 | ///////////////////////////////////////////////////////////////////////////////////
41 |
42 | #pragma once
43 |
44 | // Dependencies
45 | #include "../mat4x4.hpp"
46 | #include "../vec3.hpp"
47 | #include "../vec4.hpp"
48 | #include "../gtc/quaternion.hpp"
49 | #include "../gtc/matrix_transform.hpp"
50 |
51 | #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
52 | # pragma message("GLM: GLM_GTX_matrix_decompose extension included")
53 | #endif
54 |
55 | namespace glm
56 | {
57 | /// @addtogroup gtx_matrix_decompose
58 | /// @{
59 |
60 | /// Decomposes a model matrix to translations, rotation and scale components
61 | /// @see gtx_matrix_decompose
62 | template
63 | GLM_FUNC_DECL bool decompose(
64 | tmat4x4 const & modelMatrix,
65 | tvec3 & scale, tquat & orientation, tvec3 & translation, tvec3 & skew, tvec4 & perspective);
66 |
67 | /// @}
68 | }//namespace glm
69 |
70 | #include "matrix_decompose.inl"
71 |
--------------------------------------------------------------------------------
/app/src/main/java/com/anandmuralidhar/cubeandroid/CubeActivity.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2016 Anand Muralidhar
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.anandmuralidhar.cubeandroid;
18 |
19 | import android.app.Activity;
20 | import android.content.res.AssetManager;
21 | import android.opengl.GLSurfaceView;
22 | import android.os.Bundle;
23 |
24 | public class CubeActivity extends Activity{
25 | private GLSurfaceView mGLView = null;
26 | private native void CreateObjectNative(AssetManager assetManager, String pathToInternalDir);
27 | private native void DeleteObjectNative();
28 | GestureClass mGestureObject;
29 |
30 | @Override
31 | public void onCreate(Bundle savedInstanceState) {
32 | super.onCreate(savedInstanceState);
33 |
34 | AssetManager assetManager = getAssets();
35 | String pathToInternalDir = getFilesDir().getAbsolutePath();
36 |
37 | // call the native constructors to create an object
38 | CreateObjectNative(assetManager, pathToInternalDir);
39 |
40 | // layout has only two components, a GLSurfaceView and a TextView
41 | setContentView(R.layout.cube_layout);
42 | mGLView = (MyGLSurfaceView) findViewById (R.id.gl_surface_view);
43 |
44 | // mGestureObject will handle touch gestures on the screen
45 | mGestureObject = new GestureClass(this);
46 | mGLView.setOnTouchListener(mGestureObject.TwoFingerGestureListener);
47 | }
48 |
49 | @Override
50 | protected void onResume() {
51 |
52 | super.onResume();
53 |
54 | // Android suggests that we call onResume on GLSurfaceView
55 | if (mGLView != null) {
56 | mGLView.onResume();
57 | }
58 |
59 | }
60 |
61 | @Override
62 | protected void onPause() {
63 |
64 | super.onPause();
65 |
66 | // Android suggests that we call onPause on GLSurfaceView
67 | if(mGLView != null) {
68 | mGLView.onPause();
69 | }
70 | }
71 |
72 | @Override
73 | protected void onDestroy() {
74 |
75 | super.onDestroy();
76 |
77 | // We are exiting the activity, let's delete the native objects
78 | DeleteObjectNative();
79 |
80 | }
81 |
82 |
83 | /**
84 | * load libCubeNative.so since it has all the native functions
85 | */
86 | static {
87 | System.loadLibrary("CubeNative");
88 | }
89 | }
90 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/gtx/closest_point.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// Restrictions:
16 | /// By making use of the Software for military purposes, you choose to make
17 | /// a Bunny unhappy.
18 | ///
19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | /// THE SOFTWARE.
26 | ///
27 | /// @ref gtx_closest_point
28 | /// @file glm/gtx/closest_point.inl
29 | /// @date 2005-12-30 / 2011-06-07
30 | /// @author Christophe Riccio
31 | ///////////////////////////////////////////////////////////////////////////////////////////////////
32 |
33 | namespace glm
34 | {
35 | template
36 | GLM_FUNC_QUALIFIER tvec3 closestPointOnLine
37 | (
38 | tvec3 const & point,
39 | tvec3 const & a,
40 | tvec3 const & b
41 | )
42 | {
43 | T LineLength = distance(a, b);
44 | tvec3 Vector = point - a;
45 | tvec3 LineDirection = (b - a) / LineLength;
46 |
47 | // Project Vector to LineDirection to get the distance of point from a
48 | T Distance = dot(Vector, LineDirection);
49 |
50 | if(Distance <= T(0)) return a;
51 | if(Distance >= LineLength) return b;
52 | return a + LineDirection * Distance;
53 | }
54 |
55 | template
56 | GLM_FUNC_QUALIFIER tvec2 closestPointOnLine
57 | (
58 | tvec2 const & point,
59 | tvec2 const & a,
60 | tvec2 const & b
61 | )
62 | {
63 | T LineLength = distance(a, b);
64 | tvec2 Vector = point - a;
65 | tvec2 LineDirection = (b - a) / LineLength;
66 |
67 | // Project Vector to LineDirection to get the distance of point from a
68 | T Distance = dot(Vector, LineDirection);
69 |
70 | if(Distance <= T(0)) return a;
71 | if(Distance >= LineLength) return b;
72 | return a + LineDirection * Distance;
73 | }
74 |
75 | }//namespace glm
76 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/detail/type_vec4_sse2.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// Restrictions:
16 | /// By making use of the Software for military purposes, you choose to make
17 | /// a Bunny unhappy.
18 | ///
19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | /// THE SOFTWARE.
26 | ///
27 | /// @ref core
28 | /// @file glm/detail/type_tvec4_sse2.inl
29 | /// @date 2014-12-01 / 2014-12-01
30 | /// @author Christophe Riccio
31 | ///////////////////////////////////////////////////////////////////////////////////
32 |
33 | namespace glm{
34 |
35 | # if !GLM_HAS_DEFAULTED_FUNCTIONS
36 | template <>
37 | GLM_FUNC_QUALIFIER tvec4::tvec4()
38 | # ifndef GLM_FORCE_NO_CTOR_INIT
39 | : data(_mm_setzero_ps())
40 | # endif
41 | {}
42 | # endif//!GLM_HAS_DEFAULTED_FUNCTIONS
43 |
44 | template <>
45 | GLM_FUNC_QUALIFIER tvec4::tvec4(float s) :
46 | data(_mm_set1_ps(s))
47 | {}
48 |
49 | template <>
50 | GLM_FUNC_QUALIFIER tvec4::tvec4(float a, float b, float c, float d) :
51 | data(_mm_set_ps(d, c, b, a))
52 | {}
53 |
54 | template <>
55 | template
56 | GLM_FUNC_QUALIFIER tvec4 & tvec4::operator+=(U scalar)
57 | {
58 | this->data = _mm_add_ps(this->data, _mm_set_ps1(static_cast(scalar)));
59 | return *this;
60 | }
61 |
62 | template <>
63 | template <>
64 | GLM_FUNC_QUALIFIER tvec4 & tvec4::operator+=(float scalar)
65 | {
66 | this->data = _mm_add_ps(this->data, _mm_set_ps1(scalar));
67 | return *this;
68 | }
69 |
70 | template <>
71 | template
72 | GLM_FUNC_QUALIFIER tvec4 & tvec4::operator+=(tvec1 const & v)
73 | {
74 | this->data = _mm_add_ps(this->data, _mm_set_ps1(static_cast(v.x)));
75 | return *this;
76 | }
77 | }//namespace glm
78 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/gtx/component_wise.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// Restrictions:
16 | /// By making use of the Software for military purposes, you choose to make
17 | /// a Bunny unhappy.
18 | ///
19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | /// THE SOFTWARE.
26 | ///
27 | /// @ref gtx_component_wise
28 | /// @file glm/gtx/component_wise.inl
29 | /// @date 2007-05-21 / 2011-06-07
30 | /// @author Christophe Riccio
31 | ///////////////////////////////////////////////////////////////////////////////////////////////////
32 |
33 | namespace glm
34 | {
35 | template class vecType>
36 | GLM_FUNC_QUALIFIER T compAdd(vecType const & v)
37 | {
38 | T result(0);
39 | for(detail::component_count_t i = 0; i < detail::component_count(v); ++i)
40 | result += v[i];
41 | return result;
42 | }
43 |
44 | template class vecType>
45 | GLM_FUNC_QUALIFIER T compMul(vecType const & v)
46 | {
47 | T result(1);
48 | for(detail::component_count_t i = 0; i < detail::component_count(v); ++i)
49 | result *= v[i];
50 | return result;
51 | }
52 |
53 | template class vecType>
54 | GLM_FUNC_QUALIFIER T compMin(vecType const & v)
55 | {
56 | T result(v[0]);
57 | for(detail::component_count_t i = 1; i < detail::component_count(v); ++i)
58 | result = min(result, v[i]);
59 | return result;
60 | }
61 |
62 | template class vecType>
63 | GLM_FUNC_QUALIFIER T compMax(vecType const & v)
64 | {
65 | T result(v[0]);
66 | for(detail::component_count_t i = 1; i < detail::component_count(v); ++i)
67 | result = max(result, v[i]);
68 | return result;
69 | }
70 | }//namespace glm
71 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/gtx/wrap.hpp:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// Restrictions:
16 | /// By making use of the Software for military purposes, you choose to make
17 | /// a Bunny unhappy.
18 | ///
19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | /// THE SOFTWARE.
26 | ///
27 | /// @ref gtx_wrap
28 | /// @file glm/gtx/wrap.hpp
29 | /// @date 2009-11-25 / 2011-06-07
30 | /// @author Christophe Riccio
31 | ///
32 | /// @see core (dependence)
33 | ///
34 | /// @defgroup gtx_wrap GLM_GTX_wrap
35 | /// @ingroup gtx
36 | ///
37 | /// @brief Wrapping mode of texture coordinates.
38 | ///
39 | /// need to be included to use these functionalities.
40 | ///////////////////////////////////////////////////////////////////////////////////
41 |
42 | #pragma once
43 |
44 | // Dependency:
45 | #include "../glm.hpp"
46 |
47 | #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
48 | # pragma message("GLM: GLM_GTX_wrap extension included")
49 | #endif
50 |
51 | namespace glm
52 | {
53 | /// @addtogroup gtx_wrap
54 | /// @{
55 |
56 | /// Simulate GL_CLAMP OpenGL wrap mode
57 | /// @see gtx_wrap extension.
58 | template
59 | GLM_FUNC_DECL genType clamp(genType const & Texcoord);
60 |
61 | /// Simulate GL_REPEAT OpenGL wrap mode
62 | /// @see gtx_wrap extension.
63 | template
64 | GLM_FUNC_DECL genType repeat(genType const & Texcoord);
65 |
66 | /// Simulate GL_MIRRORED_REPEAT OpenGL wrap mode
67 | /// @see gtx_wrap extension.
68 | template
69 | GLM_FUNC_DECL genType mirrorClamp(genType const & Texcoord);
70 |
71 | /// Simulate GL_MIRROR_REPEAT OpenGL wrap mode
72 | /// @see gtx_wrap extension.
73 | template
74 | GLM_FUNC_DECL genType mirrorRepeat(genType const & Texcoord);
75 |
76 | /// @}
77 | }// namespace glm
78 |
79 | #include "wrap.inl"
80 |
--------------------------------------------------------------------------------
/app/src/main/externals/glm-0.9.7.5/glm/gtx/string_cast.hpp:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////
2 | /// OpenGL Mathematics (glm.g-truc.net)
3 | ///
4 | /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 | /// of this software and associated documentation files (the "Software"), to deal
7 | /// in the Software without restriction, including without limitation the rights
8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | /// copies of the Software, and to permit persons to whom the Software is
10 | /// furnished to do so, subject to the following conditions:
11 | ///
12 | /// The above copyright notice and this permission notice shall be included in
13 | /// all copies or substantial portions of the Software.
14 | ///
15 | /// Restrictions:
16 | /// By making use of the Software for military purposes, you choose to make
17 | /// a Bunny unhappy.
18 | ///
19 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 | /// THE SOFTWARE.
26 | ///
27 | /// @ref gtx_string_cast
28 | /// @file glm/gtx/string_cast.hpp
29 | /// @date 2008-04-26 / 2014-05-10
30 | /// @author Christophe Riccio
31 | ///
32 | /// @see core (dependence)
33 | /// @see gtc_half_float (dependence)
34 | /// @see gtx_integer (dependence)
35 | /// @see gtx_quaternion (dependence)
36 | ///
37 | /// @defgroup gtx_string_cast GLM_GTX_string_cast
38 | /// @ingroup gtx
39 | ///
40 | /// @brief Setup strings for GLM type values
41 | ///
42 | /// need to be included to use these functionalities.
43 | /// This extension is not supported with CUDA
44 | ///////////////////////////////////////////////////////////////////////////////////
45 |
46 | #pragma once
47 |
48 | // Dependency:
49 | #include "../glm.hpp"
50 | #include "../gtc/type_precision.hpp"
51 | #include "../gtc/quaternion.hpp"
52 | #include "../gtx/dual_quaternion.hpp"
53 | #include