Class CylinderLayerData
Subclass of LayerData that defines a cylindrical area of the display that will be rendered with some assigned texture by the current ILayerProvider. The cylinder is centered at the transform location.
Inherited Members
Namespace: Unity.XR.CompositionLayers.Layers
Assembly: solution.dll
Syntax
[Serializable]
public class CylinderLayerData : LayerData
Properties
ApplyTransformScale
Whether or not to apply the transform scale properties to the layer. When true, the scale of the transform will be applied to the length of the arc, height, and radius respectively.
Declaration
public bool ApplyTransformScale { get; set; }
Property Value
Type | Description |
---|---|
bool |
AspectRatio
The ratio of the visible cylinder section width / height.
Declaration
public float AspectRatio { get; set; }
Property Value
Type | Description |
---|---|
float |
CentralAngle
The angle of the visible section of the cylinder, based at 0 radians, in the range of [0, 2Pi).
Declaration
public float CentralAngle { get; set; }
Property Value
Type | Description |
---|---|
float |
CentralAngleInDegrees
The angle of the visible section of the cylinder, based at 0 radians, in the range of [0, 360).
Declaration
public float CentralAngleInDegrees { get; set; }
Property Value
Type | Description |
---|---|
float |
MaintainAspectRatio
Option to make the aspect ration stay constant.
Declaration
public bool MaintainAspectRatio { get; set; }
Property Value
Type | Description |
---|---|
bool |
Radius
Defines the radius of the cylindrical layer centered at the transform location.
Declaration
public float Radius { get; set; }
Property Value
Type | Description |
---|---|
float |
Methods
CalculateAspectRatioFromHeight(float)
Return aspect ratio when changing height.
Declaration
public float CalculateAspectRatioFromHeight(float height)
Parameters
Type | Name | Description |
---|---|---|
float | height | cylinder layer height |
Returns
Type | Description |
---|---|
float | Return re-calculated aspect ratio. |
CalculateRadiusFromHeight(float)
Return radius when changing height.
Declaration
public float CalculateRadiusFromHeight(float height)
Parameters
Type | Name | Description |
---|---|---|
float | height | cylinder layer height |
Returns
Type | Description |
---|---|
float | Return re-calculated radius. |
CopyFrom(LayerData)
Used to copy values from another layer data instance
Declaration
public override void CopyFrom(LayerData layerData)
Parameters
Type | Name | Description |
---|---|---|
LayerData | layerData | Layer data to copy from |
Overrides
GetHeight()
Return height value of the cylinder layer.
Declaration
public float GetHeight()
Returns
Type | Description |
---|---|
float | cylinder layer height value. |
GetScaledSize(Vector3)
Return re-calculated parameters based on whether or not apply the transform scale properties.
Declaration
public Vector3 GetScaledSize(Vector3 scale)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | scale | transform scale |
Returns
Type | Description |
---|---|
Vector3 | Return re-calculated cylinder params. |