public enum FacetCullingType extends Enum<FacetCullingType>
meshes
.Enum Constant and Description |
---|
BackfaceCulling
Indicates that the back-face of a triangle should not be painted.
|
BasedOnData
Indicates that you know or assume that the data specifies the ideal face culling mode.
|
FrontfaceCulling
Indicates that the front-face of a triangle should not be painted.
|
NoCulling
Indicates that facet should not be culled.
|
Modifier and Type | Method and Description |
---|---|
static FacetCullingType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static FacetCullingType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final FacetCullingType NoCulling
This will paint a mesh with both its back-face and front-face.
public static final FacetCullingType BackfaceCulling
This facet culling type can improve performance over FacetCullingType#NoCulling
, and is recommended if you have data with correctly oriented normals.
Back-face culling can have functional benefits as well. If you have a 3D scan of the interior of a building, you can use backface culling to see the interior while your camera is located on the outside of the mesh.
public static final FacetCullingType FrontfaceCulling
This facet culling type can improve performance over FacetCullingType#NoCulling
.
It is not very common to cull the front-face of the triangles of your dataset, as it will make your dataset invisible from the intended viewing angle.
This facet culling mode can be used in very specialized applications, or in the case when your dataset has inverted normals.
public static final FacetCullingType BasedOnData
If the data does not specify anything, then FacetCullingType#NoCulling
will be used as the fallback mode and both faces will be shown.
Use this face culling mode in these cases:
FacetCullingType#NoCulling
as the default mode unless there is a better option.
If the culling behavior of your data is not as you expected, you can still override with one of the other options.
public static FacetCullingType[] values()
for (FacetCullingType c : FacetCullingType.values()) System.out.println(c);
public static FacetCullingType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null