public class TLspStereoDeviceBuilder extends Object
TLspStereoscopicDevice
, which can be used to create
a stereoscopic 3D view, (see TLspViewBuilder.buildStereoscopicView(TLspStereoscopicDevice)
).
The view returned by the view builder can be cast to ILspAWTView
.
public ILspAWTView createView() {
TLspStereoscopicDevice stereoDevice = TLspStereoDeviceBuilder.newBuilder().build();
ILspAWTView view = (ILspAWTView) TLspViewBuilder.newBuilder().buildStereoscopicView(stereoDevice);
return view;
}
A stereoscopic Lightspeed view will have a frame rate that is half of that of a regular Lightspeed view. This is because to achieve the 3D stereoscopic effect each frame has to be rendered twice, once for each eye.
Note: A stereoscopic 3D view requires a GPU that supports quad buffering. For most GPUs this must be enabled in the driver settings. A warning will be logged if your GPU does not support quad buffering.
Modifier and Type | Method and Description |
---|---|
TLspStereoscopicDevice |
build()
Builds the resulting stereoscopic device.
|
TLspStereoDeviceBuilder |
eyeSeparation(double aEyeSeparation)
Specifies the distance between the eyes of the user.
|
TLspStereoDeviceBuilder |
focalLength(double aFocalLength)
Specifies the focal length in meters, this should be the distance between the user and the screen.
|
static TLspStereoDeviceBuilder |
newBuilder() |
public static TLspStereoDeviceBuilder newBuilder()
public TLspStereoDeviceBuilder eyeSeparation(double aEyeSeparation)
aEyeSeparation
- the eye separation in metersthis
public TLspStereoDeviceBuilder focalLength(double aFocalLength)
aFocalLength
- the focal length.this
public TLspStereoscopicDevice build()