FixedWidthViewSizer
Stay organized with collections
Save and categorize content based on your preferences.
Page Summary
FixedWidthViewSizer controls the size of a ViewRenderable in a Scene by setting a fixed width in meters, automatically adjusting the height to maintain aspect ratio.
It provides methods to calculate the size of the view in the Scene and to retrieve the defined width.
The constructor takes a float value representing the desired width in meters.
getSize() method calculates and returns a Vector3 representing the view's size in the Scene.
getWidth() method returns the fixed width value set during the FixedWidthViewSizer's construction.
public class
FixedWidthViewSizer
Controls the size of a ViewRenderable in a Scene by
defining how wide it should be in meters. The height 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."],[],["`FixedWidthViewSizer` controls the size of a `ViewRenderable` within a `Scene`. It does this by setting a fixed width (in meters), and the height will adjust to match the view's aspect ratio. The constructor `FixedWidthViewSizer(float widthMeters)` creates a sizer with a defined width. `getSize(View view)` calculates the view's size within the scene, while `getWidth()` returns the fixed width in meters. `setSizer` can be used to apply it.\n"]]