|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.yobotics.simulationconstructionset.ViewportConfiguration
public class ViewportConfiguration
Title: SimulationConstructionSet
Description: Class for storing camera view configurations for display in a ViewportPanel.
This class can store the position and size information of several cameras as shown in the following example:
view2.addCameraView("camera 1", 0, 0, 1, 2);
view2.addCameraView("camera 2", 1, 0, 3, 2);
view2.addCameraView("robot cam", 0, 2, 2, 1);
The above code adds three cameras named camera 1, camera 2 and robot cam. The next component of each camera is its column and row.
In this example camera's 1 and 2 are both in the same row, row 0, but are separated into columns 0 and 1 respectively.
The final two components, width and height, indicate the number of columns and rows that the camera fills. Camera 1 has a width of 1 and a height of 2.
When placing cameras ensure that no overlap occurs as it will cause unpredictable behavior.
Copyright: Copyright (c) 2000
Company: Yobotics, Inc.
Constructor Summary | |
---|---|
ViewportConfiguration(java.lang.String name)
Creates an empty configuration with the specified name. |
Method Summary | |
---|---|
void |
addCameraView(java.lang.String cameraName,
int col,
int row,
int width,
int height)
Adds a new camera view to this configuration. |
java.lang.String |
getName()
Accessor method for the ViewportConfiguration's name |
java.util.ArrayList<ViewportPanelConfiguration> |
getPanelConfigurations()
Retrieves a list of the stored ViewportPanelConfigurations. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ViewportConfiguration(java.lang.String name)
name
- Name of the configuration.Method Detail |
---|
public java.lang.String getName()
public void addCameraView(java.lang.String cameraName, int col, int row, int width, int height)
cameraName
- Name of the camera to use.col
- Column in which to place the camera.row
- Row in which to place the camera.width
- Width of the camera in number of columns.height
- Height of the camera in number of rows.public java.util.ArrayList<ViewportPanelConfiguration> getPanelConfigurations()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |