Photon Quantum 3.0.0

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

Defines a 2D box in its local space. In order to create a Shape2D of type Shape2DType.Box, use Shape2D.CreateBox.

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 BoxShape into an instance of IDeterministicFrameSerializer. More...
 

Static Public Attributes

const int SIZE = FP.SIZE + FPVector2.SIZE
 The size of the struct in bytes. More...
 

Properties

FP BroadRadius [get]
 The smallest radius of a circle centered at the box centroid that encloses the box. More...
 
FPVector2 Extents [get, set]
 Vector that defines the distance from the box centroid to the furthest point in the positive direction of each axis. More...
 

Detailed Description

Defines a 2D box in its local space. In order to create a Shape2D of type Shape2DType.Box, use Shape2D.CreateBox.

See also
Shape2D, Shape2DType

Member Function Documentation

◆ Serialize()

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

Serializes a BoxShape into an instance of IDeterministicFrameSerializer.

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

◆ GetHashCode()

override Int32 Quantum.Shape2D.BoxShape.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.BoxShape.SIZE = FP.SIZE + FPVector2.SIZE
static

The size of the struct in bytes.

Property Documentation

◆ BroadRadius

FP Quantum.Shape2D.BoxShape.BroadRadius
get

The smallest radius of a circle centered at the box centroid that encloses the box.

◆ Extents

FPVector2 Quantum.Shape2D.BoxShape.Extents
getset

Vector that defines the distance from the box centroid to the furthest point in the positive direction of each axis.