Struct CapsuleGeometry
A capsule geometry.
Implements
Inherited Members
Namespace: Unity.Physics
Assembly: Unity.Physics.dll
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 |
---|---|
float | 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 |
---|---|
bool | True if the objects are considered equal, false if they are not. |
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 |
---|---|
int | A hash code for this object. |
Overrides
GetHeight()
The height of the capsule.
Declaration
public float GetHeight()
Returns
Type | Description |
---|---|
float | The height. |