Class FixedWidthViewSizer
- java.lang.Object
-
- com.google.ar.sceneform.rendering.FixedWidthViewSizer
-
- All Implemented Interfaces:
ViewSizer
public class FixedWidthViewSizer extends java.lang.Object implements ViewSizer
Controls the size of aViewRenderablein aSceneby defining how wide it should be in meters. The height will change to match the aspect ratio of the view.
-
-
Constructor Summary
Constructors Constructor Description FixedWidthViewSizer(float widthMeters)Constructor for creating a sizer for controlling the size of aViewRenderableby defining a fixed width.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Vector3getSize(android.view.View view)Calculates the desired size of the view in theScene.floatgetWidth()Returns the width in meters used for controlling the size of aViewRenderable.
-
-
-
Constructor Detail
-
FixedWidthViewSizer
public FixedWidthViewSizer(float widthMeters)
Constructor for creating a sizer for controlling the size of aViewRenderableby defining a fixed width.- Parameters:
widthMeters- a number greater than zero representing the width in meters.
-
-
Method Detail
-
getWidth
public float getWidth()
Returns the width in meters used for controlling the size of aViewRenderable.
-
-