Photon Quantum 3.0.0

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

The buffers with runtime data for the vertices and normals. They are loaded when the asset is added or replaced. More...

Public Member Functions

 PolygonColliderRuntimeData (FPVector2 *verticesBuffer, FPVector2 *normalsBuffer)
 Sets the pointers to the runtime data of the polygon. More...
 
PolygonColliderRuntimeData Free (Native.Allocator allocator)
 Frees the runtime data in the memory of a polygon's vertices and normal buffers. More...
 

Static Public Member Functions

static PolygonColliderRuntimeData Create (FPVector2[] vertices, FPVector2[] normals, Native.Allocator allocator)
 Initializes the polygon runtime data into creating a buffer for the vertices and normals . More...
 

Public Attributes

bool IsValid => VerticesBuffer != null && NormalsBuffer != null
 Checks if the vertices and normal buffers are valid for usage. More...
 
readonly FPVector2NormalsBuffer
 The pointer to the normals' runtime data. More...
 
readonly FPVector2VerticesBuffer
 The pointer to the vertices' runtime data. More...
 

Detailed Description

The buffers with runtime data for the vertices and normals. They are loaded when the asset is added or replaced.

Constructor & Destructor Documentation

◆ PolygonColliderRuntimeData()

Quantum.PolygonColliderRuntimeData.PolygonColliderRuntimeData ( FPVector2 verticesBuffer,
FPVector2 normalsBuffer 
)
inline

Sets the pointers to the runtime data of the polygon.

Parameters
verticesBufferThe pointer to the vertices' runtime data.
normalsBufferThe pointer to the normals' runtime data.

Member Function Documentation

◆ Create()

static PolygonColliderRuntimeData Quantum.PolygonColliderRuntimeData.Create ( FPVector2[]  vertices,
FPVector2[]  normals,
Native.Allocator  allocator 
)
inlinestatic

Initializes the polygon runtime data into creating a buffer for the vertices and normals .

Parameters
verticesThe managed array of vertices that define the polygon collider
normalsThe managed array of the normals of all polygon sides
allocatorThe allocator to use for managing memory.
Returns
Returns a struct with the buffers for the runtime data of a polygon.

◆ Free()

PolygonColliderRuntimeData Quantum.PolygonColliderRuntimeData.Free ( Native.Allocator  allocator)
inline

Frees the runtime data in the memory of a polygon's vertices and normal buffers.

Parameters
allocatorThe allocator to use for managing memory.
Returns

Member Data Documentation

◆ IsValid

bool Quantum.PolygonColliderRuntimeData.IsValid => VerticesBuffer != null && NormalsBuffer != null

Checks if the vertices and normal buffers are valid for usage.

◆ VerticesBuffer

readonly FPVector2* Quantum.PolygonColliderRuntimeData.VerticesBuffer

The pointer to the vertices' runtime data.

◆ NormalsBuffer

readonly FPVector2* Quantum.PolygonColliderRuntimeData.NormalsBuffer

The pointer to the normals' runtime data.