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