PhysX SDK 3.2 API Reference: PxVehicleDriveTank.h Source File

PhysX SDK 3.2 API

PxVehicleDriveTank.h

Go to the documentation of this file.
00001 // This code contains NVIDIA Confidential Information and is disclosed to you 
00002 // under a form of NVIDIA software license agreement provided separately to you.
00003 //
00004 // Notice
00005 // NVIDIA Corporation and its licensors retain all intellectual property and
00006 // proprietary rights in and to this software and related documentation and 
00007 // any modifications thereto. Any use, reproduction, disclosure, or 
00008 // distribution of this software and related documentation without an express 
00009 // license agreement from NVIDIA Corporation is strictly prohibited.
00010 // 
00011 // ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
00012 // NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
00013 // THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
00014 // MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
00015 //
00016 // Information and code furnished is believed to be accurate and reliable.
00017 // However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
00018 // information or for any infringement of patents or other rights of third parties that may
00019 // result from its use. No license is granted by implication or otherwise under any patent
00020 // or patent rights of NVIDIA Corporation. Details are subject to change without notice.
00021 // This code supersedes and replaces all information previously supplied.
00022 // NVIDIA Corporation products are not authorized for use as critical
00023 // components in life support devices or systems without express written approval of
00024 // NVIDIA Corporation.
00025 //
00026 // Copyright (c) 2008-2012 NVIDIA Corporation. All rights reserved.
00027 // Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
00028 // Copyright (c) 2001-2004 NovodeX AG. All rights reserved.  
00029 
00030 #ifndef PX_VEHICLE_DRIVE_TANK_H
00031 #define PX_VEHICLE_DRIVE_TANK_H
00032 
00036 #include "vehicle/PxVehicleDrive.h"
00037 #include "vehicle/PxVehicleWheels.h"
00038 #include "vehicle/PxVehicleComponents.h"
00039 
00040 
00041 #ifndef PX_DOXYGEN
00042 namespace physx
00043 {
00044 #endif
00045 
00046 struct PxFilterData;
00047 class PxGeometry;
00048 class PxPhysics;
00049 class PxBatchQuery;
00050 struct PxRaycastQueryResult;
00051 class PxVehicleDrivableSurfaceToTireFrictionPairs;
00052 class PxShape;
00053 class PxMaterial;
00054 class PxRigidDynamic;
00055 
00056 
00060 class PxVehicleDriveTank : public PxVehicleDrive
00061 {
00062 public:
00063 
00064     friend class PxVehicleUpdate;
00065 
00069     enum eWheelOrdering
00070     {
00071         eTANK_WHEEL_FRONT_LEFT=0,
00072         eTANK_WHEEL_FRONT_RIGHT,
00073         eTANK_WHEEL_1ST_FROM_FRONT_LEFT,
00074         eTANK_WHEEL_1ST_FROM_FRONT_RIGHT,
00075         eTANK_WHEEL_2ND_FROM_FRONT_LEFT,
00076         eTANK_WHEEL_2ND_FROM_FRONT_RIGHT,
00077         eTANK_WHEEL_3RD_FROM_FRONT_LEFT,
00078         eTANK_WHEEL_3RD_FROM_FRONT_RIGHT,
00079         eTANK_WHEEL_4TH_FROM_FRONT_LEFT,
00080         eTANK_WHEEL_4TH_FROM_FRONT_RIGHT,
00081         eTANK_WHEEL_5TH_FROM_FRONT_LEFT,
00082         eTANK_WHEEL_5TH_FROM_FRONT_RIGHT,
00083         eTANK_WHEEL_6TH_FROM_FRONT_LEFT,
00084         eTANK_WHEEL_6TH_FROM_FRONT_RIGHT,
00085         eTANK_WHEEL_7TH_FROM_FRONT_LEFT,
00086         eTANK_WHEEL_7TH_FROM_FRONT_RIGHT,
00087         eTANK_WHEEL_8TH_FROM_FRONT_LEFT,
00088         eTANK_WHEEL_8TH_FROM_FRONT_RIGHT,
00089         eTANK_WHEEL_9TH_FROM_FRONT_LEFT,
00090         eTANK_WHEEL_9TH_FROM_FRONT_RIGHT
00091     };
00092 
00096     enum
00097     {
00098         eANALOG_INPUT_ACCEL=PxVehicleDriveDynData::eANALOG_INPUT_ACCEL,     
00099         eANALOG_INPUT_BRAKE_LEFT,   
00100         eANALOG_INPUT_BRAKE_RIGHT,  
00101         eANALOG_INPUT_THRUST_LEFT,  
00102         eANALOG_INPUT_THRUST_RIGHT, 
00103         eMAX_NUM_DRIVETANK_ANALOG_INPUTS
00104     };
00105 
00110     enum eDriveModel
00111     {
00112         eDRIVE_MODEL_STANDARD=0,
00113         eDRIVE_MODEL_SPECIAL
00114     };
00115 
00121     static PxVehicleDriveTank* allocate(const PxU32 numWheels);
00122 
00127     void free();
00128 
00144     void setup
00145         (PxPhysics* physics, PxRigidDynamic* vehActor, 
00146          const PxVehicleWheelsSimData& wheelsData, const PxVehicleDriveSimData& driveData,
00147          const PxU32 numDrivenWheels);
00148 
00164     static PxVehicleDriveTank* create
00165         (PxPhysics* physics, PxRigidDynamic* vehActor, 
00166          const PxVehicleWheelsSimData& wheelsData, const PxVehicleDriveSimData& driveData,
00167          const PxU32 numDrivenWheels);
00168 
00175     void setDriveModel(const eDriveModel driveModel)
00176     {
00177         mDriveModel=driveModel;
00178     }
00179 
00183     eDriveModel getDriveModel() const {return mDriveModel;}
00184 
00190     void setToRestState();
00191 
00196     PxVehicleDriveSimData mDriveSimData;
00197 
00198 private:
00199 
00200     PxVehicleDriveTank()
00201         : mDriveModel(eDRIVE_MODEL_STANDARD)
00202     {
00203     }
00204 
00205     ~PxVehicleDriveTank()
00206     {
00207     }
00208 
00212     bool isValid() const;
00213 
00218     eDriveModel mDriveModel;
00219 
00220     PxU32 mPad[3];
00221 };
00222 PX_COMPILE_TIME_ASSERT(0==(sizeof(PxVehicleDriveTank) & 15));
00223 
00224 #ifndef PX_DOXYGEN
00225 } // namespace physx
00226 #endif
00227 
00229 #endif //PX_VEHICLE_DRIVE_TANK_H


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