1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-18 08:54:15 +01:00

AndroidGCS OSG: Add stub for rotating model

This commit is contained in:
James Cotton 2012-08-21 10:30:20 -05:00
parent 905a81844c
commit 616f488c6c
4 changed files with 11 additions and 2 deletions

View File

@ -215,3 +215,6 @@ osg::Vec4f OsgMainApp::getClearColor(){
osg::notify(osg::ALWAYS)<<"Getting Clear Color"<<std::endl;
return _viewer->getCamera()->getClearColor();
}
void OsgMainApp::setRPY(float x, float y, float z){
}

View File

@ -176,6 +176,9 @@ public:
void setClearColor(osg::Vec4f color);
osg::Vec4f getClearColor();
//Manipulating the view
void setRPY(float x, float y, float z);
};

View File

@ -22,6 +22,7 @@ extern "C" {
JNIEXPORT void JNICALL Java_org_openpilot_osg_osgNativeLib_loadObject(JNIEnv * env, jobject obj, jstring address);
JNIEXPORT void JNICALL Java_org_openpilot_osg_osgNativeLib_unLoadObject(JNIEnv * env, jobject obj, jint number);
JNIEXPORT jobjectArray JNICALL Java_org_openpilot_osg_osgNativeLib_getObjectNames(JNIEnv * env, jobject obj);
JNIEXPORT void JNICALL Java_org_openpilot_osg_osgNativeLib_setRPY(JNIEnv * env, jobject obj, jfloat roll, jfloat pitch, jfloat yaw);
};
JNIEXPORT void JNICALL Java_org_openpilot_osg_osgNativeLib_init(JNIEnv * env, jobject obj, jint width, jint height){
@ -111,3 +112,7 @@ JNIEXPORT jobjectArray JNICALL Java_org_openpilot_osg_osgNativeLib_getObjectName
return fileNames;
}
JNIEXPORT void JNICALL Java_org_openpilot_osg_osgNativeLib_setRPY(JNIEnv * env, jobject obj, jfloat roll, jfloat pitch, jfloat yaw){
mainApp.setRPY(roll,pitch,yaw);
}

View File

@ -81,8 +81,6 @@ public class osgViewer extends Activity implements View.OnTouchListener, View.On
String address = Environment.getExternalStorageDirectory().getPath() + "/Models/cow.osg";
Log.d(TAG, "Address: " + address);
osgNativeLib.loadObject(address);
//address.getText().toString());
}
@Override protected void onPause() {
super.onPause();