mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
Added Android builder juicy example
git-svn-id: svn://ultimatepp.org/upp/trunk@8640 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
20ee1a9a47
commit
99222001cf
15 changed files with 439 additions and 0 deletions
33
examples/AndroidMath/Vector.java
Normal file
33
examples/AndroidMath/Vector.java
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
package org.upp.AndroidMath;
|
||||
|
||||
/**
|
||||
* Class witch whole implementaiton is native.
|
||||
*/
|
||||
public class Vector
|
||||
{
|
||||
public Vector(int size)
|
||||
{
|
||||
construct(size);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void finalize()
|
||||
{
|
||||
destroy();
|
||||
}
|
||||
|
||||
// Native stuff - C/C++
|
||||
public native int getSize();
|
||||
public native float get(int id);
|
||||
|
||||
public native void set(int id, float data);
|
||||
|
||||
public native String toString();
|
||||
|
||||
private native void construct(int size);
|
||||
private native void destroy();
|
||||
|
||||
static {
|
||||
System.loadLibrary("AndroidMath");
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue