Package com.luciad.view.lightspeed
Class TLspStereoDeviceBuilder
java.lang.Object
com.luciad.view.lightspeed.TLspStereoDeviceBuilder
Builder to create a
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.
- Since:
- 2016.1
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the resulting stereoscopic device.eyeSeparation
(double aEyeSeparation) Specifies the distance between the eyes of the user.focalLength
(double aFocalLength) Specifies the focal length in meters, this should be the distance between the user and the screen.static TLspStereoDeviceBuilder
-
Method Details
-
newBuilder
-
eyeSeparation
Specifies the distance between the eyes of the user. For the best 3D experience this should be measured for each user. The default value is 0.065m.- Parameters:
aEyeSeparation
- the eye separation in meters- Returns:
this
-
focalLength
Specifies the focal length in meters, this should be the distance between the user and the screen. The default value is 1m.- Parameters:
aFocalLength
- the focal length.- Returns:
this
-
build
Builds the resulting stereoscopic device.- Returns:
- the resulting stereoscopic device
-