mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
.examples improved Android builder example
git-svn-id: svn://ultimatepp.org/upp/trunk@8659 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
a33bb135de
commit
4387f25403
7 changed files with 150 additions and 80 deletions
|
|
@ -1,7 +1,7 @@
|
|||
package org.upp.AndroidMath;
|
||||
|
||||
/**
|
||||
* Class witch whole implementaiton is native.
|
||||
* Class which whole implementaiton is native.
|
||||
*/
|
||||
public class Vector
|
||||
{
|
||||
|
|
@ -10,21 +10,30 @@ public class Vector
|
|||
construct(size);
|
||||
}
|
||||
|
||||
public Vector(Vector vec)
|
||||
{
|
||||
copyConstruct(vec);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void finalize()
|
||||
protected void finalize() throws Throwable
|
||||
{
|
||||
destroy();
|
||||
super.finalize();
|
||||
}
|
||||
|
||||
// Native stuff - C/C++
|
||||
public native int getSize();
|
||||
public native float get(int id);
|
||||
|
||||
public native void set(int id, float data);
|
||||
public native void set(int id, float value);
|
||||
|
||||
public native void multipleByScalar(float scalar);
|
||||
|
||||
public native String toString();
|
||||
|
||||
private native void construct(int size);
|
||||
private native void copyConstruct(Vector vec);
|
||||
private native void destroy();
|
||||
|
||||
static {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue