RavEngine
Loading...
Searching...
No Matches
PxVehiclePhysXActorHelpers.h
1// Redistribution and use in source and binary forms, with or without
2// modification, are permitted provided that the following conditions
3// are met:
4// * Redistributions of source code must retain the above copyright
5// notice, this list of conditions and the following disclaimer.
6// * Redistributions in binary form must reproduce the above copyright
7// notice, this list of conditions and the following disclaimer in the
8// documentation and/or other materials provided with the distribution.
9// * Neither the name of NVIDIA CORPORATION nor the names of its
10// contributors may be used to endorse or promote products derived
11// from this software without specific prior written permission.
12//
13// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
14// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
17// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24//
25// Copyright (c) 2008-2022 NVIDIA Corporation. All rights reserved.
26// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
27// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
28
29#pragma once
30
35#include "PxFiltering.h"
36#include "PxShape.h"
37
38#if !PX_DOXYGEN
39namespace physx
40{
41
42class PxGeometry;
43class PxMaterial;
44struct PxCookingParams;
45
46namespace vehicle2
47{
48#endif
49
50struct PxVehicleRigidBodyParams;
51struct PxVehicleAxleDescription;
52struct PxVehicleWheelParams;
53struct PxVehiclePhysXActor;
54struct PxVehicleFrame;
55struct PxVehicleSuspensionParams;
56
58{
60
61public:
62
63 PxVehiclePhysXRigidActorParams(const PxVehicleRigidBodyParams& _physxActorRigidBodyParams, const char* _physxActorName)
64 : rigidBodyParams(_physxActorRigidBodyParams),
65 physxActorName(_physxActorName)
66 {
67 }
68
69 const PxVehicleRigidBodyParams& rigidBodyParams;
70 const char* physxActorName;
71};
72
74{
76
77public:
78
80 (const PxGeometry& _geometry, const PxTransform& _localPose, const PxMaterial& _material,
81 const PxShapeFlags _flags, const PxFilterData& _simulationFilterData, const PxFilterData& _queryFilterData)
82 : geometry(_geometry),
83 localPose(_localPose),
84 material(_material),
85 flags(_flags),
86 simulationFilterData(_simulationFilterData),
87 queryFilterData(_queryFilterData)
88 {
89 }
90
91 const PxGeometry& geometry;
92 const PxTransform& localPose;
93 const PxMaterial& material;
94 PxShapeFlags flags;
95 PxFilterData simulationFilterData;
96 PxFilterData queryFilterData;
97};
98
100{
102
103public:
104
105 PxVehiclePhysXWheelParams(const PxVehicleAxleDescription& _axleDescription, const PxVehicleWheelParams* _wheelParams)
106 : axleDescription(_axleDescription),
107 wheelParams(_wheelParams)
108 {
109 }
110
111 const PxVehicleAxleDescription& axleDescription;
112 const PxVehicleWheelParams* wheelParams;
113};
114
116{
118
119public:
120
121 PxVehiclePhysXWheelShapeParams(const PxMaterial& _material, const PxShapeFlags _flags, const PxFilterData _simulationFilterData, const PxFilterData _queryFilterData)
122 : material(_material),
123 flags(_flags),
124 simulationFilterData(_simulationFilterData),
125 queryFilterData(_queryFilterData)
126 {
127 }
128
129 const PxMaterial& material;
130 PxShapeFlags flags;
131 PxFilterData simulationFilterData;
132 PxFilterData queryFilterData;
133};
134
151void PxVehiclePhysXActorCreate
152(const PxVehicleFrame& vehicleFrame,
153 const PxVehiclePhysXRigidActorParams& rigidActorParams, const PxTransform& rigidActorCmassLocalPose,
154 const PxVehiclePhysXRigidActorShapeParams& rigidActorShapeParams,
155 const PxVehiclePhysXWheelParams& wheelParams, const PxVehiclePhysXWheelShapeParams& wheelShapeParams,
156 PxPhysics& physics, const PxCookingParams& params,
157 PxVehiclePhysXActor& vehiclePhysXActor);
158
159
166void PxVehiclePhysXActorConfigure
167(const PxVehiclePhysXRigidActorParams& rigidActorParams, const PxTransform& rigidActorCmassLocalPose,
168 PxRigidBody& rigidBody);
169
187void PxVehiclePhysXArticulationLinkCreate
188(const PxVehicleFrame& vehicleFrame,
189 const PxVehiclePhysXRigidActorParams& rigidActorParams, const PxTransform& rigidActorCmassLocalPose,
190 const PxVehiclePhysXRigidActorShapeParams& rigidActorShapeParams,
191 const PxVehiclePhysXWheelParams& wheelParams, const PxVehiclePhysXWheelShapeParams& wheelShapeParams,
192 PxPhysics& physics, const PxCookingParams& params,
193 PxVehiclePhysXActor& vehiclePhysXActor);
194
200void PxVehiclePhysXActorDestroy(PxVehiclePhysXActor& vehiclePhysXActor);
201
202
203
204#if !PX_DOXYGEN
205} // namespace vehicle2
206} // namespace physx
207#endif
208
A geometry object.
Definition PxGeometry.h:79
Material class to represent a set of surface properties.
Definition PxMaterial.h:149
Abstract singleton factory class used for instancing objects in the Physics SDK.
Definition PxPhysics.h:91
PxRigidBody is a base class shared between dynamic rigid body objects.
Definition PxRigidBody.h:199
class representing a rigid euclidean transform as a quaternion and a vector
Definition PxTransform.h:49
Definition PxVehiclePhysXActorHelpers.h:58
Definition PxVehiclePhysXActorHelpers.h:74
Definition PxVehiclePhysXActorHelpers.h:100
Definition PxVehiclePhysXActorHelpers.h:116
Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
Definition PxBoxController.h:39
Structure describing parameters affecting mesh cooking.
Definition PxCooking.h:185
PxFilterData is user-definable data which gets passed into the collision filtering shader and/or call...
Definition PxFiltering.h:365
Definition PxVehicleParams.h:53
Definition PxVehicleParams.h:174
A description of the PhysX actor and shapes that represent the vehicle in an associated PxScene.
Definition PxVehiclePhysXActorStates.h:55
The properties of the rigid body.
Definition PxVehicleRigidBodyParams.h:50
Definition PxVehicleWheelParams.h:47