Photon Quantum 3.0.0

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

A component with a shape used to represent 3D physics objects in the physics simulation. You can use flags and layers to setup how the object interacts with other colliders. More...

Inheritance diagram for Quantum.PhysicsCollider3D:
Quantum.IComponent

Static Public Member Functions

static PhysicsCollider3D Create (FrameBase f, Shape3D shape, PhysicsMaterial material=null, bool isTrigger=false, int layer=default)
 Creates a physics collider component with a Shape3D. More...
 
static void Serialize (void *ptr, FrameSerializer serializer)
 Serializes a PhysicsCollider3D into a FrameSerializer. More...
 

Public Attributes

AssetRef< PhysicsMaterial_material
 
Shape3D Shape
 The Shape3D used by the collider. More...
 

Static Public Attributes

const int SIZE = sizeof(Int32) * 2 + AssetRef<PhysicsMaterial>.SIZE + Shape3D.SIZE
 The size of the component (or struct/type) in-memory inside the Frame data-buffers or stack (when passed as value parameter). Not related to the snapshot payload this occupies, which is bit-packed and compressed. More...
 

Properties

Boolean? Enabled [get, set]
 
Boolean? IsTrigger [get, set]
 
Int32 Layer [get, set]
 
AssetRef< PhysicsMaterial >? Material [get, set]
 

Detailed Description

A component with a shape used to represent 3D physics objects in the physics simulation. You can use flags and layers to setup how the object interacts with other colliders.

Member Function Documentation

◆ Create()

static PhysicsCollider3D Quantum.PhysicsCollider3D.Create ( FrameBase  f,
Shape3D  shape,
PhysicsMaterial  material = null,
bool  isTrigger = false,
int  layer = default 
)
inlinestatic

Creates a physics collider component with a Shape3D.

Parameters
fThe frame.
shapeThe shape to be used by this collider. If the provided shape is a Shape3D.CompoundShape3D, this collider will create a deep, persistent copy of the provided compound, which will be disposed automatically when this component is removed from an entity.
materialThe physics material asset object. If null, it will use the default physics material.
isTriggerIf the collider is trigger. False by default.
layerThe index of the layer the collider belongs to.
Returns
An instance of physics collider component.

◆ Serialize()

static void Quantum.PhysicsCollider3D.Serialize ( void *  ptr,
FrameSerializer  serializer 
)
inlinestatic

Serializes a PhysicsCollider3D into a FrameSerializer.

Parameters
ptrThe pointer to the PhysicsCollider3D.
serializerThe FrameSerializer instance into which the struct will be serialized.

Member Data Documentation

◆ SIZE

const int Quantum.PhysicsCollider3D.SIZE = sizeof(Int32) * 2 + AssetRef<PhysicsMaterial>.SIZE + Shape3D.SIZE
static

The size of the component (or struct/type) in-memory inside the Frame data-buffers or stack (when passed as value parameter). Not related to the snapshot payload this occupies, which is bit-packed and compressed.

◆ Shape

Shape3D Quantum.PhysicsCollider3D.Shape

The Shape3D used by the collider.