The FrameContext is shared between individual transient FrameBase instances. More...
Classes | |
struct | Args |
The FrameContext creating arguments. More... | |
Public Member Functions | |
FrameContext (Args args) | |
Create a new instance of the FrameContext using the . More... | |
T | AcquireEvent< T > (int id) |
Creates a new event object from the pool. More... | |
virtual void | Dispose () |
Dispose internal subsystems and free allocated memory. More... | |
Boolean | InPredictionArea (DeterministicFrame frame, FPVector2 position) |
virtual Boolean | InPredictionArea (DeterministicFrame frame, FPVector3 position) |
This method determines if a position is inside the prediction area. More... | |
bool | IsLocalPlayer (PlayerRef player) |
Don't use this in the simulation that affect the state because it is different on each client and will lead to desyncs. More... | |
void | OnFrameSimulationBegin (FrameBase f) |
Forwards frame simulation begin event to internal subsystems. More... | |
void | OnFrameSimulationEnd () |
Forwards frame simulation end event to internal subsystems. More... | |
void | OnGameStart (DeterministicFrame f) |
Callback required to start the heap tracking. More... | |
void | OnSimulationBegin () |
Forwards simulation begin event to internal subsystems. More... | |
void | OnSimulationEnd () |
Forwards simulation end event to internal subsystems. More... | |
void | ReleaseEvent (EventBase evnt) |
Release an event object and return it to the pool More... | |
void | SetPredictionArea (FPVector3 center, FP radius) |
Sets the prediction area. Entities outside this area are culled from predicted frames. More... | |
void * | TempAllocate (int size, int alignment=8) |
Allocates memory that is released during OnFrameSimulationEnd. More... | |
void * | TempAllocateAndClear (int size, int alignment=8) |
. | |
Public Attributes | |
AssetDB | AssetDB => new AssetDB(_resourceManager) |
Obsolete. Use ResourceManager instead. More... | |
PhysicsCommon.Config | PhysicsConfig => _physicsConfig |
Access the global physics configuration. More... | |
Properties | |
Native.Allocator | Allocator [get] |
Access the native allocator. More... | |
IAssetSerializer | AssetSerializer [get] |
Access the the asset serializer. More... | |
DeterministicCommandSerializer | CommandSerializer [get] |
Access the command serializer. More... | |
FrameBase.Culling | Culling [get] |
Access the culling subsystem. More... | |
EventList | Events [get] |
Access the current stored events. More... | |
IHeapAllocationTracker | HeapTracker [get] |
Access the heap tracker. More... | |
HeapTrackingMode | HeapTrackingMode [get] |
Return the heap tracking mode that the FrameContext was created with. More... | |
bool | IsServer [get] |
Returns true if the FrameContext was started with Args.IsServer enabled. More... | |
Physics2D.PhysicsEngine2D | Physics2D [get] |
Access the 2D physics API. More... | |
Physics3D.PhysicsEngine3D | Physics3D [get] |
Access the 3D physics API. More... | |
FPVector3 | PredictionAreaCenter [get] |
Return the current prediction culling circle area center. More... | |
FP | PredictionAreaRadius [get] |
Return the current prediction culling circle area radius. More... | |
Profiling.ProfilerContext | ProfilerContext [get] |
Access the profiler context. More... | |
IResourceManager | ResourceManager [get] |
Access the resource manager. More... | |
FrameSerializer | SharedChecksumSerializer [get] |
Access the shared checksum serializer. More... | |
TaskContext | TaskContext [get] |
Access the task context. More... | |
bool | UseSharedChecksumSerializer [get] |
Returns true is Args.UseSharedChecksumSerialized was set. More... | |
The FrameContext is shared between individual transient FrameBase instances.
It controls systems like Quantum events, profilers, tasks, culling and subsystems for physics and navigation allocating reused memory.
|
inline |
Create a new instance of the FrameContext using the .
|
inline |
Don't use this in the simulation that affect the state because it is different on each client and will lead to desyncs.
player | Player ref |
true
if the player is controlled by the local simulation.
|
inline |
Callback required to start the heap tracking.
|
inline |
Forwards simulation begin event to internal subsystems.
|
inline |
Forwards simulation end event to internal subsystems.
|
inline |
Forwards frame simulation begin event to internal subsystems.
|
inline |
Forwards frame simulation end event to internal subsystems.
|
inline |
Allocates memory that is released during OnFrameSimulationEnd.
size | The memory size in bytes. |
alignment | The expected memory alignment. |
|
inlinevirtual |
Dispose internal subsystems and free allocated memory.
Reimplemented in Quantum.FrameContextUser.
|
inline |
Creates a new event object from the pool.
T | The event type. |
id | The event id. |
T | : | EventBase | |
T | : | new() |
|
inline |
Release an event object and return it to the pool
evnt | Event to release. |
Sets the prediction area. Entities outside this area are culled from predicted frames.
center | The center of the area of interest circle. |
radius | The radius of the area if ínterest circle. |
|
inlinevirtual |
This method determines if a position is inside the prediction area.
This method can be overwritten to support custom shapes.
frame | The current frame. |
position | The position to check. |
true
if the position is inside the prediction area.Obsolete. Use ResourceManager instead.
PhysicsCommon.Config Quantum.Core.FrameContext.PhysicsConfig => _physicsConfig |
Access the global physics configuration.
|
get |
Access the 2D physics API.
|
get |
Access the 3D physics API.
|
get |
Access the native allocator.
|
get |
Access the task context.
|
get |
Access the profiler context.
|
get |
Access the current stored events.
|
get |
Access the culling subsystem.
|
get |
Access the command serializer.
|
get |
Access the the asset serializer.
|
get |
Access the resource manager.
|
get |
Returns true
is Args.UseSharedChecksumSerialized was set.
|
get |
Access the shared checksum serializer.
|
get |
Return the heap tracking mode that the FrameContext was created with.
|
get |
Access the heap tracker.
|
get |
Returns true
if the FrameContext was started with Args.IsServer enabled.
|
get |
Return the current prediction culling circle area center.
|
get |
Return the current prediction culling circle area radius.