PxVehicleUpdate.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved.
3  *
4  * NVIDIA CORPORATION and its licensors retain all intellectual property
5  * and proprietary rights in and to this software, related documentation
6  * and any modifications thereto. Any use, reproduction, disclosure or
7  * distribution of this software and related documentation without an express
8  * license agreement from NVIDIA CORPORATION is strictly prohibited.
9  */
10 // Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
11 // Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
12 
13 #ifndef PX_VEHICLE_UPDATE_H
14 #define PX_VEHICLE_UPDATE_H
15 
19 #include "vehicle/PxVehicleSDK.h"
22 #include "foundation/PxMemory.h"
23 #include "foundation/PxTransform.h"
24 #include "PxBatchQueryDesc.h"
25 
26 #ifndef PX_DOXYGEN
27 namespace physx
28 {
29 #endif
30 
31  class PxBatchQuery;
32  class PxVehicleWheels;
34  class PxVehicleTelemetryData;
35 
42  {
44  {
45  PxMemZero(this, sizeof(PxWheelQueryResult));
46  isInAir=true;
48  localPose = PxTransform(PxIdentity);
49  }
50 
57 
64 
71 
78  bool isInAir;
79 
86 
93 
100 
111 
118 
125 
135 
145 
154 
162 
170 
180 
190 
196 
201  };
202 
204  {
214 
220  };
221 
229  {
230  friend class PxVehicleUpdate;
231 
233  : localPose(PxTransform(PxIdentity)),
234  hitActor(NULL),
235  hitActorForce(PxVec3(0,0,0)),
236  hitActorForcePosition(PxVec3(0,0,0))
237  {
238  }
239 
240  private:
241 
246  };
247 
256  {
257  friend class PxVehicleUpdate;
258 
260  : concurrentWheelUpdates(NULL),
261  nbConcurrentWheelUpdates(0),
262  linearMomentumChange(PxVec3(0,0,0)),
263  angularMomentumChange(PxVec3(0,0,0)),
264  staySleeping(false),
265  wakeup(false)
266  {
267  }
268 
276 
282 
283  private:
284 
288  bool wakeup;
289  };
290 
327  (PxBatchQuery* batchQuery, const PxU32 nbVehicles, PxVehicleWheels** vehicles, const PxU32 nbSceneQueryResults, PxRaycastQueryResult* sceneQueryResults, const bool* vehiclesToRaycast = NULL);
328 
329 
374  void PxVehicleUpdates(
375  const PxReal timestep, const PxVec3& gravity,
376  const PxVehicleDrivableSurfaceToTireFrictionPairs& vehicleDrivableSurfaceToTireFrictionPairs,
377  const PxU32 nbVehicles, PxVehicleWheels** vehicles, PxVehicleWheelQueryResult* vehicleWheelQueryResults, PxVehicleConcurrentUpdateData* vehicleConcurrentUpdates = NULL);
378 
379 
393  const PxVehicleConcurrentUpdateData* vehicleConcurrentUpdates, const PxU32 nbVehicles, PxVehicleWheels** vehicles);
394 
395 
412  void PxVehicleShiftOrigin(const PxVec3& shift, const PxU32 nbVehicles, PxVehicleWheels** vehicles);
413 
414 #if PX_DEBUG_VEHICLE_ON
415 
444  void PxVehicleUpdateSingleVehicleAndStoreTelemetryData
445  (const PxReal timestep, const PxVec3& gravity,
446  const PxVehicleDrivableSurfaceToTireFrictionPairs& vehicleDrivableSurfaceToTireFrictionPairs,
447  PxVehicleWheels* focusVehicle, PxVehicleWheelQueryResult* vehicleWheelQueryResults,
448  PxVehicleTelemetryData& telemetryData);
449 #endif
450 
451 #ifndef PX_DOXYGEN
452 } // namespace physx
453 #endif
454 
456 #endif //PX_VEHICLE_UPDATE_H


Copyright © 2008-2015 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved. www.nvidia.com