RavEngine
Loading...
Searching...
No Matches
PxVehicleTireStates.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
34#include "foundation/PxVec3.h"
35#include "foundation/PxMemory.h"
36
37#include "vehicle2/PxVehicleParams.h"
38
39#if !PX_DOXYGEN
40namespace physx
41{
42namespace vehicle2
43{
44#endif
45
46
52{
53 PxVec3 directions[PxVehicleTireDirectionModes::eMAX_NB_PLANAR_DIRECTIONS];
54
55 PX_FORCE_INLINE void setToDefault()
56 {
58 }
59};
60
61
68{
69 PxReal speedStates[PxVehicleTireDirectionModes::eMAX_NB_PLANAR_DIRECTIONS];
70
71 PX_FORCE_INLINE void setToDefault()
72 {
74 }
75};
76
82{
83 PxReal slips[PxVehicleTireDirectionModes::eMAX_NB_PLANAR_DIRECTIONS];
84
85 PX_FORCE_INLINE void setToDefault()
86 {
87 PxMemZero(this, sizeof(PxVehicleTireSlipState));
88 }
89};
90
95{
101 PxReal load;
102
106 PxReal friction;
107
108 PX_FORCE_INLINE void setToDefault()
109 {
110 PxMemZero(this, sizeof(PxVehicleTireGripState));
111 }
112};
113
118{
119 PxReal camberAngle;
120
121 PX_FORCE_INLINE void setToDefault()
122 {
124 }
125};
126
134{
135 PxReal lowSpeedTime[PxVehicleTireDirectionModes::eMAX_NB_PLANAR_DIRECTIONS];
136 bool activeStatus[PxVehicleTireDirectionModes::eMAX_NB_PLANAR_DIRECTIONS];
137
138 PX_FORCE_INLINE void setToDefault()
139 {
140 PxMemZero(this, sizeof(PxVehicleTireStickyState));
141 }
142};
143
148{
149 /*
150 \brief The tire forces that develop along the tire's longitudinal and lateral directions. Specified in the world frame.
151 */
152 PxVec3 forces[PxVehicleTireDirectionModes::eMAX_NB_PLANAR_DIRECTIONS];
153
154 /*
155 \brief The tire torques that develop around the tire's longitudinal and lateral directions. Specified in the world frame.
156 */
157 PxVec3 torques[PxVehicleTireDirectionModes::eMAX_NB_PLANAR_DIRECTIONS];
158
163
168
169 PX_FORCE_INLINE void setToDefault()
170 {
171 PxMemZero(this, sizeof(PxVehicleTireForce));
172 }
173};
174
175
176#if !PX_DOXYGEN
177} // namespace vehicle2
178} // namespace physx
179#endif
180
3 Element vector class.
Definition PxVec3.h:50
#define PX_FORCE_INLINE
Definition PxPreprocessor.h:335
Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
Definition PxBoxController.h:39
PX_FORCE_INLINE void * PxMemZero(void *dest, PxU32 count)
Sets the bytes of the provided buffer to zero.
Definition PxMemory.h:53
Camber angle of the tire relative to the ground plane.
Definition PxVehicleTireStates.h:118
PxVehicleTireDirectionState stores the world frame lateral and longtidinal axes of the tire after pro...
Definition PxVehicleTireStates.h:52
The longitudinal/lateral forces/torques that develop on the tire.
Definition PxVehicleTireStates.h:148
PxReal aligningMoment
The aligning moment may be propagated to a torque-driven steering controller.
Definition PxVehicleTireStates.h:162
PxReal wheelTorque
The torque to apply to the wheel's 1d rigid body.
Definition PxVehicleTireStates.h:167
The load and friction experienced by a tire.
Definition PxVehicleTireStates.h:95
PxReal load
The tire load.
Definition PxVehicleTireStates.h:101
PxReal friction
The tire friction is the product of the road geometry friction and a friction response multiplier.
Definition PxVehicleTireStates.h:106
The lateral and longitudinal tire slips.
Definition PxVehicleTireStates.h:82
PxVehicleTireSpeedState stores the components of the instantaneous velocity of the rigid body at the ...
Definition PxVehicleTireStates.h:68
Prolonged low speeds in the lateral and longitudinal directions may be handled with "sticky" velocity...
Definition PxVehicleTireStates.h:134