Skip to content

Instantly share code, notes, and snippets.

View suzuke's full-sized avatar

suzuke suzuke

  • Taiwan
View GitHub Profile
@suzuke
suzuke / PhysicsHelper.cs
Created May 16, 2019 16:34 — forked from ditzel/PhysicsHelper.cs
Unity Helper for Physic Functions
using UnityEngine;
namespace Ditzelgames
{
public static class PhysicsHelper
{
public static void ApplyForceToReachVelocity(Rigidbody rigidbody, Vector3 velocity, float force = 1, ForceMode mode = ForceMode.Force)
{
if (force == 0 || velocity.magnitude == 0)
@suzuke
suzuke / MyQuaternion.cs
Created December 7, 2018 06:04 — forked from JakubNei/MyQuaternion.cs
A custom completely managed implementation of UnityEngine.Quaternion. Base is decompiled UnityEngine.Quaternion. Doesn't implement methods marked Obsolete. Does implicit coversions to and from UnityEngine.Quaternion
using System;
using UnityEngine.Internal;
using UnityEngine;
using System.Runtime.Serialization;
using System.Xml.Serialization;
/// <summary>
/// Quaternions are used to represent rotations.
/// A custom completely managed implementation of UnityEngine.Quaternion
/// Base is decompiled UnityEngine.Quaternion
@suzuke
suzuke / Möller–Trumbore_intersection_algorithm
Created September 12, 2018 02:21
Möller–Trumbore_intersection_algorithm with fixedpoint
//https://en.wikipedia.org/wiki/M%C3%B6ller%E2%80%93Trumbore_intersection_algorithm
private bool RayIntersectsTriangle(ISupportMappable support, ref TSMatrix orientation, ref TSMatrix invOrientation,
ref TSVector position, ref TSVector origin, ref TSVector direction, out FP fraction, out TSVector normal)
{
FP EPSILON = FP.EN8;
fraction = FP.Zero;
normal = TSVector.zero;
TriangleMeshShape inTriangle = support as TriangleMeshShape;
TSVector[] vertices = inTriangle.Vertices;
//https://en.wikipedia.org/wiki/M%C3%B6ller%E2%80%93Trumbore_intersection_algorithm
private bool RayIntersectsTriangle(ISupportMappable support, ref TSMatrix orientation, ref TSMatrix invOrientation,
ref TSVector position, ref TSVector origin, ref TSVector direction, out FP fraction, out TSVector normal)
{
FP EPSILON = FP.EN8;
fraction = FP.Zero;
normal = TSVector.zero;
TriangleMeshShape inTriangle = support as TriangleMeshShape;
TSVector[] vertices = inTriangle.Vertices;
atch
--- a/hybris/tests/Makefile.am 2018-02-26 23:01:48.490410081 +0800
+++ b/hybris/tests/Makefile.am 2018-02-26 23:00:40.310605653 +0800
@@ -1,7 +1,8 @@
bin_PROGRAMS = \
test_egl \
test_egl_configs \
- test_glesv2
+ test_glesv2 \
+ test_glesv3
--- a/CMakeLists.txt 2018-02-26 00:08:30.150219106 +0800
+++ b/CMakeLists.txt 2018-02-26 00:09:16.474069170 +0800
@@ -96,6 +96,7 @@
# :: Processors
option(ARMV7 "Set to ON if targeting an ARMv7 processor" ${ARMV7})
option(ARM "Set to ON if targeting an ARM processor" ${ARM})
+option(ARM64 "Set to ON if targeting an ARM64 processor" ${ARM64})
option(MIPS "Set to ON if targeting a MIPS processor" ${MIPS})
option(X86 "Set to ON if targeting an X86 processor" ${X86})
option(X86_64 "Set to ON if targeting an X86_64 processor" ${X86_64})
[ 93.269775@3] emulationstatio[3189]: unhandled level 2 translation fault (11) at 0x00000050, esr 0x92000006
[ 93.283475@3] pgd = ffffffc050b66000
[ 93.292952@3] [00000050] *pgd=00000000501e8003, *pmd=0000000000000000
[ 93.306445@3]
[ 93.315946@3] CPU: 3 PID: 3189 Comm: emulationstatio Tainted: G O 3.14.29 #1
[ 93.328027@3] task: ffffffc050c72000 ti: ffffffc061d08000 task.ti: ffffffc061d08000
[ 93.339701@3] PC is at 0x7fa459d230
[ 93.349117@3] LR is at 0x7fa459d1b4
[ 93.358346@3] pc : [<0000007fa459d230>] lr : [<0000007fa459d1b4>] pstate: 20000000
[ 93.369783@3] sp : 0000007fcece2730
@suzuke
suzuke / gist:9434686
Created March 8, 2014 16:43
w_scan with af9013 on NextVOD worked
NextVOD:~/w_scan-20110702# ./w_scan -ft -cTW -Cbig5 -o7 -a1 > /root/channels.conf
w_scan version 20110702 (compiled for DVB API 5.1)
using settings for TAIWAN
DVB aerial
VSB US/CA, DVB-T TW
frontend_type DVB-T, channellist 1
output format vdr-1.7
output charset 'BIG-5'
-_-_-_-_ Getting frontend capabilities-_-_-_-_
Using DVB API 5.1
@suzuke
suzuke / gist:9430457
Created March 8, 2014 13:16
w_scan with af9013 on NextVOD
NextVOD:~/w_scan-20110702# ./w_scan -ft -cTW -Cbig5 -o7 > /root/channels.conf
w_scan version 20110702 (compiled for DVB API 5.1)
using settings for TAIWAN
DVB aerial
VSB US/CA, DVB-T TW
frontend_type DVB-T, channellist 1
output format vdr-1.7
output charset 'BIG-5'
Info: using DVB adapter auto detection.
/dev/dvb/adapter0/frontend0 -> DVB-T "Afatech AF9013 DVB-T": good :-)