FixedHeightViewSizer
Stay organized with collections
Save and categorize content based on your preferences.
Page Summary
FixedHeightViewSizer controls the size of a ViewRenderable in a Scene by setting a fixed height in meters, automatically adjusting the width to maintain the view's aspect ratio.
It provides a constructor to create a sizer with a specified height and methods to get the defined height and calculate the size of the view within the Scene.
The getSize method calculates and returns a Vector3 representing the ViewRenderable's dimensions in the Scene, with x being width and y being height.
You can set a FixedHeightViewSizer on a ViewRenderable using the setSizer method during its construction or after it's built.
public class
FixedHeightViewSizer
Controls the size of a ViewRenderable in a Scene by
defining how tall it should be in meters. The width will change to match the aspect ratio of the
view.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-06-26 UTC."],[],["`FixedHeightViewSizer` manages the size of a `ViewRenderable` within a `Scene`. It's initialized with a fixed height (in meters) using the `FixedHeightViewSizer(float heightMeters)` constructor. The `getHeight()` method retrieves this fixed height. The `getSize(View view)` method calculates the `View`'s size in the `Scene`, with width dynamically adjusting to maintain the view's aspect ratio, based on the specified fixed height, returning a `Vector3` object.\n"]]