Photon Quantum 3.0.0

Classes | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Quantum.Shape2DConfig Class Reference

The base settings for building a Shape2D. More...

Classes

struct  CompoundShapeData2D
 The settings of each shape in the compound of shapes list. More...
 

Public Member Functions

Shape2D CreateShape (FrameBase f)
 Creates a Shape2D using the all the data set in the Shape2DConfig. More...
 

Static Public Member Functions

static bool Copy (Shape2DConfig from, Shape2DConfig to)
 Copies all the shape config values to anothere shape config. More...
 

Public Attributes

FPVector2 BoxExtents
 The vector that represents the extents of the box in each axis. More...
 
FP CapsuleExtent => CapsuleSize.Y / FP._2 - CapsuleRadius
 The capsule extent is the distance from the center of the capsule to some of the spheres' centers. More...
 
FP CapsuleRadius => CapsuleSize.X / FP._2
 The capsule radius is half the size of the capsule size on the X-Axis. More...
 
FPVector2 CapsuleSize
 The capsule size is a vector two. The x-axis is the diameter of the capsule and the y-axis is the size of the capsule from the top end to the bottom end. More...
 
FP CircleRadius
 The radius of the circle. More...
 
CompoundShapeData2D[] CompoundShapes
 The configuration array of each shape in the compound that will be allocated. More...
 
FP EdgeExtent
 The length of the edge from the center to the right or left end. More...
 
Boolean IsPersistent = true
 This flag means the buffer of shapes is allocated in the memory. It will be free when the component is removed from the entity. More...
 
AssetRef< PolygonColliderPolygonCollider
 The asset reference to a Quantum.PolygonCollider. More...
 
FPVector2 PositionOffset
 The position offset of the shape. More...
 
FP RotationOffset
 The rotation offset of the shape. More...
 
Shape2DType ShapeType
 The type of the shape. More...
 
UInt16 UserTag
 The user tag to identify the compound shape during the collision event. More...
 

Detailed Description

The base settings for building a Shape2D.

Member Function Documentation

◆ CreateShape()

Shape2D Quantum.Shape2DConfig.CreateShape ( FrameBase  f)
inline

Creates a Shape2D using the all the data set in the Shape2DConfig.

Parameters
fThe current frame.

◆ Copy()

static bool Quantum.Shape2DConfig.Copy ( Shape2DConfig  from,
Shape2DConfig  to 
)
inlinestatic

Copies all the shape config values to anothere shape config.

Parameters
fromThe shape config that will be copied.
toThe shape config that will receive the other values.
Returns
Returns true if the first argument is different from null.

Member Data Documentation

◆ ShapeType

Shape2DType Quantum.Shape2DConfig.ShapeType

The type of the shape.

◆ PolygonCollider

AssetRef<PolygonCollider> Quantum.Shape2DConfig.PolygonCollider

The asset reference to a Quantum.PolygonCollider.

◆ CircleRadius

FP Quantum.Shape2DConfig.CircleRadius

The radius of the circle.

◆ CapsuleSize

FPVector2 Quantum.Shape2DConfig.CapsuleSize

The capsule size is a vector two. The x-axis is the diameter of the capsule and the y-axis is the size of the capsule from the top end to the bottom end.

◆ EdgeExtent

FP Quantum.Shape2DConfig.EdgeExtent

The length of the edge from the center to the right or left end.

◆ BoxExtents

FPVector2 Quantum.Shape2DConfig.BoxExtents

The vector that represents the extents of the box in each axis.

◆ PositionOffset

FPVector2 Quantum.Shape2DConfig.PositionOffset

The position offset of the shape.

◆ RotationOffset

FP Quantum.Shape2DConfig.RotationOffset

The rotation offset of the shape.

◆ UserTag

UInt16 Quantum.Shape2DConfig.UserTag

The user tag to identify the compound shape during the collision event.

◆ IsPersistent

Boolean Quantum.Shape2DConfig.IsPersistent = true

This flag means the buffer of shapes is allocated in the memory. It will be free when the component is removed from the entity.

Only persistent compound shapes are supported on the editor.

◆ CompoundShapes

CompoundShapeData2D [] Quantum.Shape2DConfig.CompoundShapes

The configuration array of each shape in the compound that will be allocated.

◆ CapsuleRadius

FP Quantum.Shape2DConfig.CapsuleRadius => CapsuleSize.X / FP._2

The capsule radius is half the size of the capsule size on the X-Axis.

◆ CapsuleExtent

FP Quantum.Shape2DConfig.CapsuleExtent => CapsuleSize.Y / FP._2 - CapsuleRadius

The capsule extent is the distance from the center of the capsule to some of the spheres' centers.