Photon Quantum 3.0.0

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

References a Polygin shape by the AssetRef<T> of its Quantum.PolygonCollider asset. More...

Public Member Functions

override Int32 GetHashCode ()
 Overrides the hash code generation of this type. More...
 
void SetPolygonCollider (PolygonCollider collider)
 Sets a polygon collider meta data to PolygonShape More...
 

Static Public Member Functions

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

Static Public Attributes

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

Properties

AssetRef< PolygonColliderAssetRef [get, set]
 Returns a PolygonCollider asset reference. More...
 
FP BroadRadius [get]
 The smallest radius of a circle centered at the polygon Centroid that encloses the polygon. More...
 
FPVector2 Centroid [get]
 The point representing the geometric center of a shape or object. More...
 

Detailed Description

References a Polygin shape by the AssetRef<T> of its Quantum.PolygonCollider asset.

Member Function Documentation

◆ SetPolygonCollider()

void Quantum.Shape2D.PolygonShape.SetPolygonCollider ( PolygonCollider  collider)
inline

Sets a polygon collider meta data to PolygonShape

Parameters
collider

◆ Serialize()

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

Serializes a PolygonShape into an instance of IDeterministicFrameSerializer.

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

◆ GetHashCode()

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

The size of the struct in bytes.

Property Documentation

◆ AssetRef

AssetRef<PolygonCollider> Quantum.Shape2D.PolygonShape.AssetRef
getset

Returns a PolygonCollider asset reference.

◆ BroadRadius

FP Quantum.Shape2D.PolygonShape.BroadRadius
get

The smallest radius of a circle centered at the polygon Centroid that encloses the polygon.

◆ Centroid

FPVector2 Quantum.Shape2D.PolygonShape.Centroid
get

The point representing the geometric center of a shape or object.