Engine²
Open-source game engine written in C++.
Loading...
Searching...
No Matches
Physics::Component::VehicleInternal Struct Reference

Internal vehicle component storing Jolt-specific data. More...

#include <VehicleInternal.hpp>

Public Member Functions

bool IsValid () const
 Check if the vehicle constraint is valid.
 VehicleInternal ()=default
 Default constructor.
 VehicleInternal (JPH::BodyID chassis)
 Construct with chassis body ID.

Public Attributes

JPH::Ref< JPH::VehicleConstraint > vehicleConstraint
JPH::Ref< JPH::VehicleCollisionTester > collisionTester
std::array< Engine::EntityId, 4 > wheelEntities
 Entity IDs of the 4 wheel entities (for transform sync).
std::array< JPH::BodyID, 4 > wheelBodyIDs
 Jolt BodyIDs for the 4 wheel collision bodies.
JPH::BodyID chassisBodyID
 BodyID of the chassis.

Detailed Description

Internal vehicle component storing Jolt-specific data.

This component is automatically managed by the VehicleSystem. Users should NEVER directly create or modify this component.

Stores the vehicle constraint, controller, and wheel body references.

Constructor & Destructor Documentation

◆ VehicleInternal() [1/2]

Physics::Component::VehicleInternal::VehicleInternal ( )
default

Default constructor.

◆ VehicleInternal() [2/2]

Physics::Component::VehicleInternal::VehicleInternal ( JPH::BodyID chassis)
inlineexplicit

Construct with chassis body ID.

Member Function Documentation

◆ IsValid()

bool Physics::Component::VehicleInternal::IsValid ( ) const
inline

Check if the vehicle constraint is valid.

Member Data Documentation

◆ chassisBodyID

JPH::BodyID Physics::Component::VehicleInternal::chassisBodyID

BodyID of the chassis.

◆ collisionTester

JPH::Ref<JPH::VehicleCollisionTester> Physics::Component::VehicleInternal::collisionTester

Collision tester for vehicle wheel raycasts (must stay alive while constraint exists) Using Jolt's Ref smart pointer for proper reference counting

◆ vehicleConstraint

JPH::Ref<JPH::VehicleConstraint> Physics::Component::VehicleInternal::vehicleConstraint

The Jolt vehicle constraint (owns the vehicle physics) Using Jolt's Ref smart pointer for proper reference counting

◆ wheelBodyIDs

std::array<JPH::BodyID, 4> Physics::Component::VehicleInternal::wheelBodyIDs

Jolt BodyIDs for the 4 wheel collision bodies.

◆ wheelEntities

std::array<Engine::EntityId, 4> Physics::Component::VehicleInternal::wheelEntities

Entity IDs of the 4 wheel entities (for transform sync).


The documentation for this struct was generated from the following file: