OffScreenCanvas3D.java
Go to the documentation of this file.
1 // -*- indent-tabs-mode: nil; tab-width: 4; -*-
2 /*
3  * Copyright (c) 2008, AIST, the University of Tokyo and General Robotix Inc.
4  * All rights reserved. This program is made available under the terms of the
5  * Eclipse Public License v1.0 which accompanies this distribution, and is
6  * available at http://www.eclipse.org/legal/epl-v10.html
7  * Contributors:
8  * General Robotix Inc.
9  * National Institute of Advanced Industrial Science and Technology (AIST)
10  */
11 package com.generalrobotix.ui.view.vsensor;
12 
13 // Java2 SDK
14 import java.awt.GraphicsConfiguration;
15 
16 // Java3D
17 import javax.media.j3d.*;
18 
25 @SuppressWarnings("serial")
26 public final class OffScreenCanvas3D extends Canvas3DI
27 {
37  GraphicsConfiguration graphicsConfiguration,
38  Raster raster,
39  int width,
40  int height,
41  int rasterType)
42  {
43  super(graphicsConfiguration, true, raster, width, height, rasterType);
44  //System.out.println("OffScreenCanvas3D::OffScreenCanvas3D()");
45 
46  if (rasterType_ == Raster.RASTER_COLOR
47  || rasterType_ == Raster.RASTER_COLOR_DEPTH){
48  setOffScreenBuffer(raster_.getImage());
49  } else {
50  setOffScreenBuffer(new ImageComponent2D(ImageComponent.FORMAT_RGB,
51  width, height));
52  }
53 
54  Screen3D s3d = getScreen3D();
55  s3d.setSize(width, height);
56  s3d.setPhysicalScreenWidth(width);
57  s3d.setPhysicalScreenHeight(height);
58  }
59 
60  public void renderOnce(){
61  super.renderOnce();
62  renderOffScreenBuffer();
63  waitForOffScreenRendering();
64  }
65 }
png_infop png_uint_32 * width
Definition: png.h:2309
png_infop png_uint_32 png_uint_32 * height
Definition: png.h:2309
OffScreenCanvas3D(GraphicsConfiguration graphicsConfiguration, Raster raster, int width, int height, int rasterType)
Constructor.


openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Sat Apr 13 2019 02:14:24