Struct CylinderGeometry
A cylinder geometry.
Implements
Inherited Members
Namespace: Unity.Physics
Assembly: Unity.Physics.dll
Syntax
public struct CylinderGeometry : IEquatable<CylinderGeometry>
Fields
MaxSideCount
The maximum number of sides.
Declaration
public const int MaxSideCount = 32
Field Value
| Type | Description |
|---|---|
| int |
MinSideCount
The minimum number of sides.
Declaration
public const int MinSideCount = 3
Field Value
| Type | Description |
|---|---|
| int |
Properties
BevelRadius
The radius by which to round off the edges of the cylinder. This helps to optimize collision detection performance, by reducing the likelihood of the inner hull being penetrated and incurring expensive collision algorithms.
Declaration
public float BevelRadius { get; set; }
Property Value
| Type | Description |
|---|---|
| float | The bevel radius. |
Center
The center of the cylinder.
Declaration
public float3 Center { get; set; }
Property Value
| Type | Description |
|---|---|
| float3 | The center. |
Height
The height of the cylinder along the local Z axis.
Declaration
public float Height { get; set; }
Property Value
| Type | Description |
|---|---|
| float | The height. |
Orientation
The orientation of the cylinder.
Declaration
public quaternion Orientation { get; set; }
Property Value
| Type | Description |
|---|---|
| quaternion | The orientation. |
Radius
The radius of the cylinder.
Declaration
public float Radius { get; set; }
Property Value
| Type | Description |
|---|---|
| float | The radius. |
SideCount
The number of faces used to represent the rounded part of the cylinder.
Declaration
public int SideCount { get; set; }
Property Value
| Type | Description |
|---|---|
| int | The number of sides. |
Methods
Equals(CylinderGeometry)
Tests if this CylinderGeometry is considered equal to another.
Declaration
public bool Equals(CylinderGeometry other)
Parameters
| Type | Name | Description |
|---|---|---|
| CylinderGeometry | other | The cylinder geometry to compare to this object. |
Returns
| Type | Description |
|---|---|
| bool | True if the objects are considered equal, false if they are not. |
GetHashCode()
Calculates a hash code for this object.
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int | A hash code for this object. |