NoJobEngine 2.0.7
Loading...
Searching...
No Matches
NoJob::PhysicsSystem Class Reference

#include <PhysicsSystem.h>

Classes

struct  Implementation

Public Member Functions

 PhysicsSystem ()
 ~PhysicsSystem ()
 PhysicsSystem (const PhysicsSystem &)=delete
PhysicsSystem & operator= (const PhysicsSystem &)=delete
void Start (Scene &scene)
void Stop ()
void Update (float deltaTime)
bool IsRunning () const
bool AddForce (std::uint64_t entityID, const glm::vec3 &force)
bool AddImpulse (std::uint64_t entityID, const glm::vec3 &impulse)
bool SetLinearVelocity (std::uint64_t entityID, const glm::vec3 &velocity)
glm::vec3 GetLinearVelocity (std::uint64_t entityID) const
std::optional< RaycastHit > Raycast (const glm::vec3 &origin, const glm::vec3 &direction, float maxDistance=1000.0f) const
const std::vector< TriggerEvent > & GetTriggerEvents () const
bool HasObstacleBetween (const glm::vec3 &origin, const glm::vec3 &destination, std::uint64_t observerID, std::uint64_t targetID) const

Detailed Description

Definition at line 37 of file PhysicsSystem.h.

Constructor & Destructor Documentation

◆ PhysicsSystem() [1/2]

NoJob::PhysicsSystem::PhysicsSystem ( )

Definition at line 237 of file PhysicsSystem.cpp.

Referenced by operator=(), and PhysicsSystem().

◆ ~PhysicsSystem()

NoJob::PhysicsSystem::~PhysicsSystem ( )

Definition at line 248 of file PhysicsSystem.cpp.

References Stop().

◆ PhysicsSystem() [2/2]

NoJob::PhysicsSystem::PhysicsSystem ( const PhysicsSystem & )
delete

References PhysicsSystem().

Member Function Documentation

◆ AddForce()

bool NoJob::PhysicsSystem::AddForce ( std::uint64_t entityID,
const glm::vec3 & force )

Definition at line 478 of file PhysicsSystem.cpp.

◆ AddImpulse()

bool NoJob::PhysicsSystem::AddImpulse ( std::uint64_t entityID,
const glm::vec3 & impulse )

Definition at line 491 of file PhysicsSystem.cpp.

◆ GetLinearVelocity()

glm::vec3 NoJob::PhysicsSystem::GetLinearVelocity ( std::uint64_t entityID) const

Definition at line 517 of file PhysicsSystem.cpp.

◆ GetTriggerEvents()

const std::vector< TriggerEvent > & NoJob::PhysicsSystem::GetTriggerEvents ( ) const
inline

Definition at line 61 of file PhysicsSystem.h.

◆ HasObstacleBetween()

bool NoJob::PhysicsSystem::HasObstacleBetween ( const glm::vec3 & origin,
const glm::vec3 & destination,
std::uint64_t observerID,
std::uint64_t targetID ) const

Definition at line 561 of file PhysicsSystem.cpp.

◆ IsRunning()

bool NoJob::PhysicsSystem::IsRunning ( ) const
inline

Definition at line 49 of file PhysicsSystem.h.

◆ operator=()

PhysicsSystem & NoJob::PhysicsSystem::operator= ( const PhysicsSystem & )
delete

References PhysicsSystem(), Start(), Stop(), and Update().

◆ Raycast()

std::optional< RaycastHit > NoJob::PhysicsSystem::Raycast ( const glm::vec3 & origin,
const glm::vec3 & direction,
float maxDistance = 1000.0f ) const

◆ SetLinearVelocity()

bool NoJob::PhysicsSystem::SetLinearVelocity ( std::uint64_t entityID,
const glm::vec3 & velocity )

Definition at line 504 of file PhysicsSystem.cpp.

◆ Start()

void NoJob::PhysicsSystem::Start ( Scene & scene)

Definition at line 253 of file PhysicsSystem.cpp.

References Stop().

Referenced by operator=().

◆ Stop()

void NoJob::PhysicsSystem::Stop ( )

Definition at line 288 of file PhysicsSystem.cpp.

Referenced by operator=(), Start(), and ~PhysicsSystem().

◆ Update()

void NoJob::PhysicsSystem::Update ( float deltaTime)

Definition at line 421 of file PhysicsSystem.cpp.

Referenced by operator=().


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