StevEngine
StevEngine is a customizable C++ game engine.
Loading...
Searching...
No Matches
StevEngine::Physics::Layer Class Reference

Physics collision layer. More...

#include <physics/Layers.hpp>

Public Member Functions

 Layer (std::string name, bool isStatic=false)
 Create new physics layer.
 

Static Public Member Functions

static LayerGetLayerByName (std::string name)
 Get layer by name.
 
static LayerGetLayerById (JPH::ObjectLayer id)
 Get layer by ID.
 

Public Attributes

const bool isStatic
 Whether objects are static.
 
const std::string name
 Layer name.
 
const JPH::ObjectLayer id
 Unique layer ID.
 
const JPH::BroadPhaseLayer BroadPhaseLayer
 Broad phase settings.
 

Detailed Description

Physics collision layer.

Defines collision filtering and broad phase settings for physics objects. Controls which objects can collide with each other.

Constructor & Destructor Documentation

◆ Layer()

StevEngine::Physics::Layer::Layer ( std::string name,
bool isStatic = false )

Create new physics layer.

Parameters
nameLayer identifier
isStaticWhether objects are static

Member Function Documentation

◆ GetLayerById()

Layer * StevEngine::Physics::Layer::GetLayerById ( JPH::ObjectLayer id)
static

Get layer by ID.

Parameters
idLayer ID
Returns
Layer pointer

◆ GetLayerByName()

Layer * StevEngine::Physics::Layer::GetLayerByName ( std::string name)
static

Get layer by name.

Parameters
nameLayer identifier
Returns
Layer pointer

The documentation for this class was generated from the following files: