Struct CapsuleGeometry
A capsule geometry.
Inherited Members
Namespace: Unity.Physics
Syntax
public struct CapsuleGeometry : IEquatable<CapsuleGeometry>
Properties
Radius
The radius of the capsule around the line segment.
Declaration
public float Radius { get; set; }
Property Value
Type | Description |
---|---|
Single | The radius. |
Vertex0
The start position of the capsule's inner line segment.
Declaration
public float3 Vertex0 { get; set; }
Property Value
Type | Description |
---|---|
float3 | The start position of the capsule's inner line segment. |
Vertex1
The end position of the capsule's inner line segment.
Declaration
public float3 Vertex1 { get; set; }
Property Value
Type | Description |
---|---|
float3 | The end position of the capsule's inner line segment. |
Methods
Equals(CapsuleGeometry)
Tests if this CapsuleGeometry is considered equal to another.
Declaration
public bool Equals(CapsuleGeometry other)
Parameters
Type | Name | Description |
---|---|---|
CapsuleGeometry | other | The capsule geometry to compare to this object. |
Returns
Type | Description |
---|---|
Boolean | True if the objects are considered equal, false if they are not. |
Implements
GetCenter()
The center of the capsule.
Declaration
public float3 GetCenter()
Returns
Type | Description |
---|---|
float3 | The center. |
GetHashCode()
Calculates a hash code for this object.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 | A hash code for this object. |
Overrides
GetHeight()
The height of the capsule.
Declaration
public float GetHeight()
Returns
Type | Description |
---|---|
Single | The height. |