• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java RajawaliSurfaceView类的典型用法和代码示例

java 2次浏览

本文整理汇总了Java中org.rajawali3d.surface.RajawaliSurfaceView的典型用法代码示例。如果您正苦于以下问题:Java RajawaliSurfaceView类的具体用法?Java RajawaliSurfaceView怎么用?Java RajawaliSurfaceView使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

RajawaliSurfaceView类属于org.rajawali3d.surface包,在下文中一共展示了RajawaliSurfaceView类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: onCreate

点赞 3

import org.rajawali3d.surface.RajawaliSurfaceView; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    Intent I = new Intent(this, LoginActivity.class);
    startActivity(I);

    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    mSurfaceView = (RajawaliSurfaceView) findViewById(R.id.ar_view);
    mRenderer = new FloorplanRenderer(this);
    mSurfaceView.setSurfaceRenderer(mRenderer);
    mSurfaceView.setOnTouchListener(this);
    // Set ZOrderOnTop to false so the other views don't get hidden by the SurfaceView.
    mSurfaceView.setZOrderOnTop(false);
    mProgressGroup = (ViewGroup) findViewById(R.id.progress_group);
    mPointCloudManager = new TangoPointCloudManager();
    mDoneButton = (Button) findViewById(R.id.done_button);
}
 

开发者ID:tdb-alcorn,
项目名称:defect-party,
代码行数:19,
代码来源:FloorplanActivity.java

示例2: onAttachedToWindow

点赞 3

import org.rajawali3d.surface.RajawaliSurfaceView; //导入依赖的package包/类
@Override
public void onAttachedToWindow() {
	super.onAttachedToWindow();

	mSurfaceView = new RajawaliSurfaceView(this);
	mSurfaceView.setEGLContextClientVersion(Capabilities.getGLESMajorVersion());

	setInteractive(false);
	setFullscreen(true);

	mLayout = new FrameLayout(this);
	mLayout.addView(mSurfaceView);

	setContentView(mLayout);
	
	setRenderer(createRenderer());
}
 

开发者ID:sujitkjha,
项目名称:360-Video-Player-for-Android,
代码行数:18,
代码来源:RajawaliDaydream.java

示例3: setupGLViewAndRenderer

点赞 2

import org.rajawali3d.surface.RajawaliSurfaceView; //导入依赖的package包/类
/**
 * Sets Rajawalisurface view and its renderer. This is ideally called only once in onCreate.
 */
private PointCloudRajawaliRenderer setupGLViewAndRenderer(PointCloudManager pointCloudManager) {
    PointCloudRajawaliRenderer renderer = new PointCloudRajawaliRenderer(this, pointCloudManager);
    RajawaliSurfaceView glView = (RajawaliSurfaceView) findViewById(R.id.gl_surface_view);
    glView.setEGLContextClientVersion(2);
    glView.setSurfaceRenderer(renderer);
    return renderer;
}
 

开发者ID:kupoko,
项目名称:Tiresias,
代码行数:11,
代码来源:PointCloudActivity.java

示例4: setupGLViewAndRenderer

点赞 2

import org.rajawali3d.surface.RajawaliSurfaceView; //导入依赖的package包/类
/**
 * Sets Rajawalisurface view and its renderer. This is ideally called only once in onCreate.
 */
private MotionTrackingRajawaliRenderer setupGLViewAndRenderer(){

    // Configure OpenGL renderer
    MotionTrackingRajawaliRenderer renderer = new MotionTrackingRajawaliRenderer(this);
    // OpenGL view where all of the graphics are drawn
    RajawaliSurfaceView glView = (RajawaliSurfaceView) findViewById(R.id.gl_surface_view);
    glView.setEGLContextClientVersion(2);
    glView.setRenderMode(IRajawaliSurface.RENDERMODE_CONTINUOUSLY);
    glView.setSurfaceRenderer(renderer);
    return renderer;

}
 

开发者ID:kupoko,
项目名称:Tiresias,
代码行数:16,
代码来源:MotionTrackingActivity.java

示例5: setupGLViewAndRenderer

点赞 2

import org.rajawali3d.surface.RajawaliSurfaceView; //导入依赖的package包/类
/**
 * Sets Rajawalisurface view and its renderer. This is ideally called only once in onCreate.
 */
private AreaLearningRajawaliRenderer setupGLViewAndRenderer(){
    // Configure OpenGL renderer
    AreaLearningRajawaliRenderer renderer = new AreaLearningRajawaliRenderer(this);
    // OpenGL view where all of the graphics are drawn
    RajawaliSurfaceView glView = (RajawaliSurfaceView) findViewById(R.id.gl_surface_view);
    glView.setEGLContextClientVersion(2);
    glView.setRenderMode(IRajawaliSurface.RENDERMODE_CONTINUOUSLY);
    glView.setSurfaceRenderer(renderer);
    return renderer;
}
 

开发者ID:kupoko,
项目名称:Tiresias,
代码行数:14,
代码来源:AreaLearningActivity.java

示例6: setupTextViewsAndButtons

点赞 2

import org.rajawali3d.surface.RajawaliSurfaceView; //导入依赖的package包/类
/**
 * Sets Texts views to display statistics of Poses being received. This also sets the buttons
 * used in the UI. Please note that this needs to be called after TangoService and Config
 * objects are initialized since we use them for the SDK related stuff like version number
 * etc.
 */
private void setupTextViewsAndButtons(TangoConfig config, Tango tango, boolean isLearningMode, boolean isLoadAdf){
    mTangoEventTextView = (TextView) findViewById(R.id.tangoevent);

    mAdf2DeviceTranslationTextView = (TextView) findViewById(R.id.adf2devicePose);
    mStart2DeviceTranslationTextView = (TextView) findViewById(R.id.start2devicePose);
    mAdf2StartTranslationTextView = (TextView) findViewById(R.id.adf2startPose);
    mAdf2DeviceQuatTextView = (TextView) findViewById(R.id.adf2deviceQuat);
    mStart2DeviceQuatTextView = (TextView) findViewById(R.id.start2deviceQuat);
    mAdf2StartQuatTextView = (TextView) findViewById(R.id.adf2startQuat);

    mAdf2DevicePoseStatusTextView = (TextView) findViewById(R.id.adf2deviceStatus);
    mStart2DevicePoseStatusTextView = (TextView) findViewById(R.id.start2deviceStatus);
    mAdf2StartPoseStatusTextView = (TextView) findViewById(R.id.adf2startStatus);

    mAdf2DevicePoseCountTextView = (TextView) findViewById(R.id.adf2devicePosecount);
    mStart2DevicePoseCountTextView = (TextView) findViewById(R.id.start2devicePosecount);
    mAdf2StartPoseCountTextView = (TextView) findViewById(R.id.adf2startPosecount);

    mAdf2DevicePoseDeltaTextView = (TextView) findViewById(R.id.adf2deviceDeltatime);
    mStart2DevicePoseDeltaTextView = (TextView) findViewById(R.id.start2deviceDeltatime);
    mAdf2StartPoseDeltaTextView = (TextView) findViewById(R.id.adf2startDeltatime);

    mFirstPersonButton = (Button) findViewById(R.id.first_person_button);
    mThirdPersonButton = (Button) findViewById(R.id.third_person_button);
    mTopDownButton = (Button) findViewById(R.id.top_down_button);

    mTangoServiceVersionTextView = (TextView) findViewById(R.id.version);
    mApplicationVersionTextView = (TextView) findViewById(R.id.appversion);
    mGLView = (RajawaliSurfaceView) findViewById(R.id.gl_surface_view);

    mSaveAdfButton = (Button) findViewById(R.id.saveAdf);
    mUUIDTextView = (TextView) findViewById(R.id.uuid);

    // Set up button click listeners and button state.
    mFirstPersonButton.setOnClickListener(this);
    mThirdPersonButton.setOnClickListener(this);
    mTopDownButton.setOnClickListener(this);
    if (isLearningMode) {
        // Disable save ADF button until Tango relocalizes to the current ADF.
        mSaveAdfButton.setEnabled(false);
        mSaveAdfButton.setOnClickListener(this);
    } else {
        // Hide to save ADF button if leanring mode is off.
        mSaveAdfButton.setVisibility(View.GONE);
    }


    if(isLoadAdf){
        ArrayList<String> fullUUIDList = new ArrayList<String>();
        // Returns a list of ADFs with their UUIDs
        fullUUIDList = tango.listAreaDescriptions();
        if (fullUUIDList.size() == 0) {
            mUUIDTextView.setText(R.string.no_uuid);
        } else {
            mUUIDTextView.setText(getString(R.string.number_of_adfs) + fullUUIDList.size()
                    + getString(R.string.latest_adf_is)
                    + fullUUIDList.get(fullUUIDList.size() - 1));
        }
    }

    mTangoServiceVersionTextView.setText(config.getString("tango_service_library_version"));

    PackageInfo packageInfo;
    try {
        packageInfo = this.getPackageManager().getPackageInfo(this.getPackageName(), 0);
        mApplicationVersionTextView.setText(packageInfo.versionName);
    } catch (NameNotFoundException e) {
        e.printStackTrace();
    }
}
 

开发者ID:kupoko,
项目名称:Tiresias,
代码行数:77,
代码来源:AreaLearningActivity.java

示例7: onCreate

点赞 2

import org.rajawali3d.surface.RajawaliSurfaceView; //导入依赖的package包/类
@Override
  public void onCreate(Bundle savedInstanceState) {
  	Log.i(TAG, "called onCreate");
  	super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);

      ButterKnife.inject(this);

      // Open a custom CameraView with options to adjust resolution
      mOpenCvCameraView = (AdjustableCameraView) findViewById(R.id.fd_activity_surface_view);
      mOpenCvCameraView.setCameraIndex(CameraBridgeViewBase.CAMERA_ID_FRONT);
      mOpenCvCameraView.setCvCameraViewListener(this);
      //mOpenCvCameraView.setOnTouchListener(this);

      // Create OpenGL Surface
      final RajawaliSurfaceView surface = new RajawaliSurfaceView(this);
      surface.setFrameRate(60.0);
      surface.setRenderMode(IRajawaliSurface.RENDERMODE_WHEN_DIRTY);

      // enable transparent background
      surface.setTransparent(true);

      // Add mSurface to your root view
      addContentView(surface, new ActionBar.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT));

      // assign our renderer class for 3D related processing
      // TODO: make this interchangable via fragmets or activity switches
      //mRenderer = new PlanesRenderer(this);
      mRenderer = new CubeRoomRenderer(this);
      surface.setSurfaceRenderer(mRenderer);

  	// Make sure the screen won't dim
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);

      setupRadioGroup();

      SensorManager mSensorManager = (SensorManager) getSystemService(Context.SENSOR_SERVICE);
      mSensorManager.registerListener(
              this,
              mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER),
              SensorManager.SENSOR_DELAY_FASTEST
      );
  }
 

开发者ID:selop,
项目名称:dynamic-perspective-on-android,
代码行数:44,
代码来源:MainActivity.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)