Photon Quantum 3.0.0

Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
Quantum.Shape2D.CapsuleShape Struct Reference

Defines a 2D capsule in its local space. In order to create a Shape2D of type Shape2DType.Capsule, use Shape2D.CreateCapsule.

See also
Shape2D, Shape2DType
More...

Public Member Functions

override Int32 GetHashCode ()
 Overrides the hash code generation of this type. More...
 

Static Public Member Functions

static void Serialize (void *ptr, IDeterministicFrameSerializer serializer)
 Serializes a CapsuleShape into an instance of IDeterministicFrameSerializer. More...
 

Public Attributes

FP Diameter => Radius * 2
 Twice the value of the capsule Radius. More...
 
FP Extent
 The distance from the capsule's centroid to the center of the top or bottom semi-sphere.

See also
Height
More...
 
FP Height => (Extent + Radius) * 2
 The distance from the bottommost to the topmost points in the capsule along its elongated axis. More...
 
FP Radius
 The radius of the capsule's top and bottom semi-spheres. More...
 

Static Public Attributes

const int SIZE = FP.SIZE * 3
 The size of the struct in bytes. More...
 

Detailed Description

Defines a 2D capsule in its local space. In order to create a Shape2D of type Shape2DType.Capsule, use Shape2D.CreateCapsule.

See also
Shape2D, Shape2DType

Member Function Documentation

◆ Serialize()

static void Quantum.Shape2D.CapsuleShape.Serialize ( void *  ptr,
IDeterministicFrameSerializer  serializer 
)
inlinestatic

Serializes a CapsuleShape into an instance of IDeterministicFrameSerializer.

Parameters
ptrThe pointer to the CapsuleShape.
serializerThe instance of IDeterministicFrameSerializer.

◆ GetHashCode()

override Int32 Quantum.Shape2D.CapsuleShape.GetHashCode ( )
inline

Overrides the hash code generation of this type.

Returns
A hash code of the current state of this instance.

Member Data Documentation

◆ SIZE

const int Quantum.Shape2D.CapsuleShape.SIZE = FP.SIZE * 3
static

The size of the struct in bytes.

◆ Radius

FP Quantum.Shape2D.CapsuleShape.Radius

The radius of the capsule's top and bottom semi-spheres.

◆ Extent

FP Quantum.Shape2D.CapsuleShape.Extent

The distance from the capsule's centroid to the center of the top or bottom semi-sphere.

See also
Height

◆ Diameter

FP Quantum.Shape2D.CapsuleShape.Diameter => Radius * 2

Twice the value of the capsule Radius.

◆ Height

FP Quantum.Shape2D.CapsuleShape.Height => (Extent + Radius) * 2

The distance from the bottommost to the topmost points in the capsule along its elongated axis.