|
Falcon
|
Namespaces | |
| car_data | |
Classes | |
| struct | ActorUserData |
| struct | Car |
| struct | ShapeUserData |
| struct | VehicleDesc |
| class | VehicleSceneQueryData |
| class | WheelQueryResults |
Enumerations | |
| enum | COLLUSUION_FLAGS { COLLISION_FLAG_GROUND = 1 << 0, COLLISION_FLAG_WHEEL = 1 << 1, COLLISION_FLAG_CHASSIS = 1 << 2, COLLISION_FLAG_OBSTACLE = 1 << 3, COLLISION_FLAG_DRIVABLE_OBSTACLE = 1 << 4, COLLISION_FLAG_GROUND_AGAINST = COLLISION_FLAG_CHASSIS | COLLISION_FLAG_OBSTACLE | COLLISION_FLAG_DRIVABLE_OBSTACLE, COLLISION_FLAG_WHEEL_AGAINST = COLLISION_FLAG_WHEEL | COLLISION_FLAG_CHASSIS | COLLISION_FLAG_OBSTACLE, COLLISION_FLAG_CHASSIS_AGAINST = COLLISION_FLAG_GROUND | COLLISION_FLAG_WHEEL | COLLISION_FLAG_CHASSIS | COLLISION_FLAG_OBSTACLE | COLLISION_FLAG_DRIVABLE_OBSTACLE, COLLISION_FLAG_OBSTACLE_AGAINST = COLLISION_FLAG_GROUND | COLLISION_FLAG_WHEEL | COLLISION_FLAG_CHASSIS | COLLISION_FLAG_OBSTACLE | COLLISION_FLAG_DRIVABLE_OBSTACLE, COLLISION_FLAG_DRIVABLE_OBSTACLE_AGAINST = COLLISION_FLAG_GROUND | COLLISION_FLAG_CHASSIS | COLLISION_FLAG_OBSTACLE | COLLISION_FLAG_DRIVABLE_OBSTACLE } |
| enum | { DRIVABLE_SURFACE = 0xffff0000, UNDRIVABLE_SURFACE = 0x0000ffff } |
Functions | |
| void | IncrementDrivingMode (Car *car, physx::PxVehicleDrive4WRawInputData &vehicleInputData, const float timestep) |
| void | CreateVehicleDescriptionObject (Car *car) |
| void | CreateVehicle4W (Car *car, physx::PxRigidDynamic *vehActor) |
| void | SetupVehicleActorData (Car *car, physx::PxRigidDynamic *vehActor) |
| void | ConfigureCarData (physx::PxVehicleWheels *vehicle, ActorUserData *actorUserData, ShapeUserData *shapeUserDatas) |
| void | startAccelerateForwardsMode (Car *car, physx::PxVehicleDrive4WRawInputData &vehicleInputData) |
| void | startAccelerateReverseMode (Car *car, physx::PxVehicleDrive4WRawInputData &vehicleInputData) |
| void | startBrakeMode (Car *car, physx::PxVehicleDrive4WRawInputData &vehicleInputData) |
| void | startTurnHardLeftMode (Car *car, physx::PxVehicleDrive4WRawInputData &vehicleInputData) |
| void | startTurnHardRightMode (Car *car, physx::PxVehicleDrive4WRawInputData &vehicleInputData) |
| void | startHandbrakeTurnLeftMode (Car *car, physx::PxVehicleDrive4WRawInputData &vehicleInputData) |
| void | startHandbrakeTurnRightMode (Car *car, physx::PxVehicleDrive4WRawInputData &vehicleInputData) |
| void | releaseAllControls (Car *car, physx::PxVehicleDrive4WRawInputData &vehicleInputData) |
| bool | InitVehicleSDK () |
| bool | ReleaseVehcileSDK () |
| void | StepVehicleSDK (float dt) |
| physx::PxVehicleDrivableSurfaceToTireFrictionPairs * | createFrictionPairs (const physx::PxMaterial *defaultMaterial) |
| void | CreateCar (physx::PxRigidDynamic *vehActor, Transform &transform) |
| void | ReleaseCarMemory () |
| physx::PxFilterFlags | VehicleFilterShader (physx::PxFilterObjectAttributes attributes0, physx::PxFilterData filterData0, physx::PxFilterObjectAttributes attributes1, physx::PxFilterData filterData1, physx::PxPairFlags &pairFlags, const void *constantBlock, uint32_t constantBlockSize) |
| void | setupDrivableSurface (physx::PxFilterData &filterData) |
| void | setupNonDrivableSurface (physx::PxFilterData &filterData) |
| physx::PxQueryHitType::Enum | WheelSceneQueryPreFilterBlocking (physx::PxFilterData filterData0, physx::PxFilterData filterData1, const void *constantBlock, uint32_t constantBlockSize, physx::PxHitFlags &queryFlags) |
| physx::PxQueryHitType::Enum | WheelSceneQueryPostFilterBlocking (physx::PxFilterData filterData0, physx::PxFilterData filterData1, const void *constantBlock, uint32_t constantBlockSize, const physx::PxQueryHit &hit) |
| physx::PxQueryHitType::Enum | WheelSceneQueryPreFilterNonBlocking (physx::PxFilterData filterData0, physx::PxFilterData filterData1, const void *constantBlock, uint32_t constantBlockSize, physx::PxHitFlags &queryFlags) |
| physx::PxQueryHitType::Enum | WheelSceneQueryPostFilterNonBlocking (physx::PxFilterData filterData0, physx::PxFilterData filterData1, const void *constantBlock, uint32_t constantBlockSize, const physx::PxQueryHit &hit) |
| physx::PxQueryHitType::Enum | WheelSceneQueryPreFilterNonBlocking (physx::PxFilterData filterData0, physx::PxFilterData filterData1, const void *constantBlock, uint32_t constantBlockSize, const physx::PxHitFlags &queryFlags) |
Variables | |
| boost::container::vector< Car * > | gCars |
| physx::PxVehicleDrive4WRawInputData | gVehicleInputData [10] |
| boost::container::vector< physx::PxVehicleWheels * > | gVehicles |
| boost::container::vector< physx::PxVehicleWheelQueryResult > | gvehicleQueryResults |
| bool | gMimicKeyInputs = true |
Defines the different collision flags for defining colliding surfaces.
| void physics::vehicle::ConfigureCarData | ( | physx::PxVehicleWheels * | vehicle, |
| ActorUserData * | actorUserData, | ||
| ShapeUserData * | shapeUserDatas | ||
| ) |
Defines the car for the vehicle sdk.
| PxVehicleWheels* | to vehicle |
| ActorUserData* | being used for simulation |
| ShapeUserData* | being used for collision |
| void physics::vehicle::CreateCar | ( | physx::PxRigidDynamic * | vehActor, |
| Transform & | transform | ||
| ) |
| physx::PxVehicleDrivableSurfaceToTireFrictionPairs * physics::vehicle::createFrictionPairs | ( | const physx::PxMaterial * | defaultMaterial | ) |
Creates the firction pairs for the tyre materials and terrain surfaces. Will be used by the simulation.
| material | pointer for default material |
| void physics::vehicle::CreateVehicle4W | ( | Car * | car, |
| physx::PxRigidDynamic * | vehActor | ||
| ) |
Creates vehicle4w* for a car which is used by physx to apply simulations on.
| poniter | to the car which is being setup |
| pointer | to car's dynamic actor |
| void physics::vehicle::CreateVehicleDescriptionObject | ( | Car * | car | ) |
This method can be used to setup the vehicle description.
| poniter | to the car which is being setup TODO: Read data from json. |
The API which exposes the vehicle creation for the external classes to create cars to create and use cars in scenes. Steps to instantiate a car
| void physics::vehicle::IncrementDrivingMode | ( | Car * | car, |
| physx::PxVehicleDrive4WRawInputData & | vehicleInputData, | ||
| const float | timestep | ||
| ) |
Nvidia'a Sample code to itereate through multiple driving routines. Being used here for testing. Will be removed once we have inputs coming in via Falcon's APIs.
| bool physics::vehicle::InitVehicleSDK | ( | ) |
Initializes the physx vehicle sdk.
Initiates the vehicle sdk for the physics.
| void physics::vehicle::releaseAllControls | ( | Car * | car, |
| physx::PxVehicleDrive4WRawInputData & | vehicleInputData | ||
| ) |
Releases all inouts from the car.
| pointer | to the car. |
| PxVehicleDrive4WRawInputData | associated with the car. |
| void physics::vehicle::ReleaseCarMemory | ( | ) |
Releases the memory being used by the car objects.
| bool physics::vehicle::ReleaseVehcileSDK | ( | ) |
Releases resources being held physx vehicle sdk.
Releases resources allocated by the vehicle sdk.
| void physics::vehicle::setupDrivableSurface | ( | physx::PxFilterData & | filterData | ) |
| void physics::vehicle::setupNonDrivableSurface | ( | physx::PxFilterData & | filterData | ) |
| void physics::vehicle::SetupVehicleActorData | ( | Car * | car, |
| physx::PxRigidDynamic * | vehActor | ||
| ) |
Sets up simulation data for wheels and chassis.
| poniter | to the car which is being setup |
| pointer | to car's dynamic actor |
| void physics::vehicle::startAccelerateForwardsMode | ( | Car * | car, |
| physx::PxVehicleDrive4WRawInputData & | vehicleInputData | ||
| ) |
Drives the car forward.
| pointer | to the car. |
| PxVehicleDrive4WRawInputData | associated with the car. |
Methods to pass on inuts to phyX.
| void physics::vehicle::startAccelerateReverseMode | ( | Car * | car, |
| physx::PxVehicleDrive4WRawInputData & | vehicleInputData | ||
| ) |
Drives the car backwards.
| pointer | to the car. |
| PxVehicleDrive4WRawInputData | associated with the car. |
| void physics::vehicle::startBrakeMode | ( | Car * | car, |
| physx::PxVehicleDrive4WRawInputData & | vehicleInputData | ||
| ) |
Applies breaks to the car.
| pointer | to the car. |
| PxVehicleDrive4WRawInputData | associated with the car. |
| void physics::vehicle::startHandbrakeTurnLeftMode | ( | Car * | car, |
| physx::PxVehicleDrive4WRawInputData & | vehicleInputData | ||
| ) |
Makes car take a left turn with handbreak enabled
| pointer | to the car. |
| PxVehicleDrive4WRawInputData | associated with the car. |
| void physics::vehicle::startHandbrakeTurnRightMode | ( | Car * | car, |
| physx::PxVehicleDrive4WRawInputData & | vehicleInputData | ||
| ) |
Makes car take a right turn with handbreak enabled.
| pointer | to the car. |
| PxVehicleDrive4WRawInputData | associated with the car. |
| void physics::vehicle::startTurnHardLeftMode | ( | Car * | car, |
| physx::PxVehicleDrive4WRawInputData & | vehicleInputData | ||
| ) |
Makes car take a hard left turn
| pointer | to the car. |
| PxVehicleDrive4WRawInputData | associated with the car. |
| void physics::vehicle::startTurnHardRightMode | ( | Car * | car, |
| physx::PxVehicleDrive4WRawInputData & | vehicleInputData | ||
| ) |
Makes car take a hard right turn.
| pointer | to the car. |
| PxVehicleDrive4WRawInputData | associated with the car. |
| void physics::vehicle::StepVehicleSDK | ( | float | dt | ) |
| physx::PxFilterFlags physics::vehicle::VehicleFilterShader | ( | physx::PxFilterObjectAttributes | attributes0, |
| physx::PxFilterData | filterData0, | ||
| physx::PxFilterObjectAttributes | attributes1, | ||
| physx::PxFilterData | filterData1, | ||
| physx::PxPairFlags & | pairFlags, | ||
| const void * | constantBlock, | ||
| uint32_t | constantBlockSize | ||
| ) |
Creates a vehicle filter shader which enables physx to decide what stuff car should interact with.
| physx::PxQueryHitType::Enum physics::vehicle::WheelSceneQueryPostFilterBlocking | ( | physx::PxFilterData | filterData0, |
| physx::PxFilterData | filterData1, | ||
| const void * | constantBlock, | ||
| uint32_t | constantBlockSize, | ||
| const physx::PxQueryHit & | hit | ||
| ) |
| physx::PxQueryHitType::Enum physics::vehicle::WheelSceneQueryPostFilterNonBlocking | ( | physx::PxFilterData | filterData0, |
| physx::PxFilterData | filterData1, | ||
| const void * | constantBlock, | ||
| uint32_t | constantBlockSize, | ||
| const physx::PxQueryHit & | hit | ||
| ) |
| physx::PxQueryHitType::Enum physics::vehicle::WheelSceneQueryPreFilterBlocking | ( | physx::PxFilterData | filterData0, |
| physx::PxFilterData | filterData1, | ||
| const void * | constantBlock, | ||
| uint32_t | constantBlockSize, | ||
| physx::PxHitFlags & | queryFlags | ||
| ) |
| physx::PxQueryHitType::Enum physics::vehicle::WheelSceneQueryPreFilterNonBlocking | ( | physx::PxFilterData | filterData0, |
| physx::PxFilterData | filterData1, | ||
| const void * | constantBlock, | ||
| uint32_t | constantBlockSize, | ||
| const physx::PxHitFlags & | queryFlags | ||
| ) |
| physx::PxQueryHitType::Enum physics::vehicle::WheelSceneQueryPreFilterNonBlocking | ( | physx::PxFilterData | filterData0, |
| physx::PxFilterData | filterData1, | ||
| const void * | constantBlock, | ||
| uint32_t | constantBlockSize, | ||
| physx::PxHitFlags & | queryFlags | ||
| ) |
| boost::container::vector< Car * > physics::vehicle::gCars |
Global vec to maintain all cars' Driver4W component. This is used by vehicle update to update all the cars. As custom allocators are not initialized before these allocations, I am using default allocators.
| bool physics::vehicle::gMimicKeyInputs = true |
| physx::PxVehicleDrive4WRawInputData physics::vehicle::gVehicleInputData |
| boost::container::vector< physx::PxVehicleWheelQueryResult > physics::vehicle::gvehicleQueryResults |
| boost::container::vector< physx::PxVehicleWheels * > physics::vehicle::gVehicles |
1.8.17