public final class Projection
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
Projection.DrawMode
Enforces allowed (sub) mesh draw modes.
|
static class |
Projection.Mesh
A Mesh associated with the projection scene.
|
static class |
Projection.SubMesh
The sub mesh associated with the
Projection.Mesh. |
| Modifier and Type | Field and Description |
|---|---|
static int |
DRAW_MODE_TRIANGLES
Triangle draw mode.
|
static int |
DRAW_MODE_TRIANGLES_FAN
Triangle fan draw mode.
|
static int |
DRAW_MODE_TRIANGLES_STRIP
Triangle strip draw mode.
|
Projection.Mesh |
leftMesh
The Mesh corresponding to the left eye.
|
static int |
POSITION_COORDS_PER_VERTEX
Number of texture coordinates per vertex.
|
Projection.Mesh |
rightMesh
The Mesh corresponding to the right eye.
|
boolean |
singleMesh
Whether the left and right mesh are identical.
|
int |
stereoMode
The stereo mode.
|
static int |
TEXTURE_COORDS_PER_VERTEX
Number of position coordinates per vertex.
|
| Constructor and Description |
|---|
Projection(Projection.Mesh mesh,
int stereoMode)
Creates a Projection with single mesh.
|
Projection(Projection.Mesh leftMesh,
Projection.Mesh rightMesh,
int stereoMode)
Creates a Projection with dual mesh.
|
| Modifier and Type | Method and Description |
|---|---|
static Projection |
createEquirectangular(float radius,
int latitudes,
int longitudes,
float verticalFovDegrees,
float horizontalFovDegrees,
int stereoMode)
Generates an equirectangular projection.
|
static Projection |
createEquirectangular(int stereoMode)
Generates a complete sphere equirectangular projection.
|
public static final int DRAW_MODE_TRIANGLES
public static final int DRAW_MODE_TRIANGLES_STRIP
public static final int DRAW_MODE_TRIANGLES_FAN
public static final int TEXTURE_COORDS_PER_VERTEX
public static final int POSITION_COORDS_PER_VERTEX
public final Projection.Mesh leftMesh
public final Projection.Mesh rightMesh
singleMesh is true then this mesh is
identical to leftMesh.@C.StereoMode public final int stereoMode
public final boolean singleMesh
public Projection(Projection.Mesh mesh, int stereoMode)
mesh - the Mesh for both eyes.stereoMode - A C.StereoMode value.public Projection(Projection.Mesh leftMesh, Projection.Mesh rightMesh, int stereoMode)
Projection(Mesh, int) if there is single mesh
for both eyes.leftMesh - the Mesh corresponding to the left eye.rightMesh - the Mesh corresponding to the right eye.stereoMode - A C.StereoMode value.public static Projection createEquirectangular(@C.StereoMode int stereoMode)
stereoMode - A C.StereoMode value.public static Projection createEquirectangular(float radius, int latitudes, int longitudes, float verticalFovDegrees, float horizontalFovDegrees, @C.StereoMode int stereoMode)
radius - Size of the sphere. Must be > 0.latitudes - Number of rows that make up the sphere. Must be >= 1.longitudes - Number of columns that make up the sphere. Must be >= 1.verticalFovDegrees - Total latitudinal degrees that are covered by the sphere. Must be in
(0, 180].horizontalFovDegrees - Total longitudinal degrees that are covered by the sphere.Must be
in (0, 360].stereoMode - A C.StereoMode value.