Class PlaneRenderer
- java.lang.Object
-
- pro.streem.ar.sceneform.rendering.PlaneRenderer
-
public class PlaneRenderer extends java.lang.ObjectControl rendering of ARCore planes.Used to visualize detected planes and to control whether Renderables cast shadows on them.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringMATERIAL_COLORFloat3 material parameter to control the RGB tint of the plane.static java.lang.StringMATERIAL_SPOTLIGHT_RADIUSFloat material parameter to control the radius of the spotlight.static java.lang.StringMATERIAL_TEXTUREMaterial parameter that controls what texture is being used when rendering the planes.static java.lang.StringMATERIAL_UV_SCALEFloat2 material parameter to control the X/Y scaling of the texture's UV coordinates.
-
Constructor Summary
Constructors Constructor Description PlaneRenderer(Renderer renderer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.concurrent.CompletableFuture<Material>getMaterial()Returns default material instance used to render the planes.booleanisEnabled()Check if the plane renderer is enabled.booleanisShadowReceiver()Return true if Renderables in the scene cast shadows onto the planes.booleanisVisible()Return true if plane visualization is visible.voidsetEnabled(boolean enabled)Enable/disable the plane renderer.voidsetShadowReceiver(boolean shadowReceiver)Control whether Renderables in the scene should cast shadows onto the planes.voidsetVisible(boolean visible)Control visibility of plane visualization.voidupdate(com.google.ar.core.Frame frame, int viewWidth, int viewHeight)
-
-
-
Field Detail
-
MATERIAL_TEXTURE
public static final java.lang.String MATERIAL_TEXTURE
Material parameter that controls what texture is being used when rendering the planes.- See Also:
- Constant Field Values
-
MATERIAL_UV_SCALE
public static final java.lang.String MATERIAL_UV_SCALE
Float2 material parameter to control the X/Y scaling of the texture's UV coordinates. Can be used to adjust for the texture's aspect ratio and control the frequency of tiling.- See Also:
- Constant Field Values
-
MATERIAL_COLOR
public static final java.lang.String MATERIAL_COLOR
Float3 material parameter to control the RGB tint of the plane.- See Also:
- Constant Field Values
-
MATERIAL_SPOTLIGHT_RADIUS
public static final java.lang.String MATERIAL_SPOTLIGHT_RADIUS
Float material parameter to control the radius of the spotlight.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PlaneRenderer
public PlaneRenderer(Renderer renderer)
-
-
Method Detail
-
setEnabled
public void setEnabled(boolean enabled)
Enable/disable the plane renderer.
-
isEnabled
public boolean isEnabled()
Check if the plane renderer is enabled.
-
setShadowReceiver
public void setShadowReceiver(boolean shadowReceiver)
Control whether Renderables in the scene should cast shadows onto the planes.If false - no planes receive shadows, regardless of the per-plane setting.
-
isShadowReceiver
public boolean isShadowReceiver()
Return true if Renderables in the scene cast shadows onto the planes.
-
setVisible
public void setVisible(boolean visible)
Control visibility of plane visualization.If false - no planes are drawn. Note that shadow visibility is independent of plane visibility.
-
isVisible
public boolean isVisible()
Return true if plane visualization is visible.
-
getMaterial
public java.util.concurrent.CompletableFuture<Material> getMaterial()
Returns default material instance used to render the planes.
-
update
public void update(com.google.ar.core.Frame frame, int viewWidth, int viewHeight)
-
-