include/vehicle2/physxActor/PxVehiclePhysXActorHelpers.h
File members: include/vehicle2/physxActor/PxVehiclePhysXActorHelpers.h
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// * Neither the name of NVIDIA CORPORATION nor the names of its
// contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Copyright (c) 2008-2023 NVIDIA Corporation. All rights reserved.
// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
#pragma once
#include "PxFiltering.h"
#include "PxShape.h"
#if !PX_DOXYGEN
namespace physx
{
class PxGeometry;
class PxMaterial;
struct PxCookingParams;
namespace vehicle2
{
#endif
struct PxVehicleRigidBodyParams;
struct PxVehicleAxleDescription;
struct PxVehicleWheelParams;
struct PxVehiclePhysXActor;
struct PxVehicleFrame;
struct PxVehicleSuspensionParams;
class PxVehiclePhysXRigidActorParams
{
PX_NOCOPY(PxVehiclePhysXRigidActorParams)
public:
PxVehiclePhysXRigidActorParams(const PxVehicleRigidBodyParams& _physxActorRigidBodyParams, const char* _physxActorName)
: rigidBodyParams(_physxActorRigidBodyParams),
physxActorName(_physxActorName)
{
}
const PxVehicleRigidBodyParams& rigidBodyParams;
const char* physxActorName;
};
class PxVehiclePhysXRigidActorShapeParams
{
PX_NOCOPY(PxVehiclePhysXRigidActorShapeParams)
public:
PxVehiclePhysXRigidActorShapeParams
(const PxGeometry& _geometry, const PxTransform& _localPose, const PxMaterial& _material,
const PxShapeFlags _flags, const PxFilterData& _simulationFilterData, const PxFilterData& _queryFilterData)
: geometry(_geometry),
localPose(_localPose),
material(_material),
flags(_flags),
simulationFilterData(_simulationFilterData),
queryFilterData(_queryFilterData)
{
}
const PxGeometry& geometry;
const PxTransform& localPose;
const PxMaterial& material;
PxShapeFlags flags;
PxFilterData simulationFilterData;
PxFilterData queryFilterData;
};
class PxVehiclePhysXWheelParams
{
PX_NOCOPY(PxVehiclePhysXWheelParams)
public:
PxVehiclePhysXWheelParams(const PxVehicleAxleDescription& _axleDescription, const PxVehicleWheelParams* _wheelParams)
: axleDescription(_axleDescription),
wheelParams(_wheelParams)
{
}
const PxVehicleAxleDescription& axleDescription;
const PxVehicleWheelParams* wheelParams;
};
class PxVehiclePhysXWheelShapeParams
{
PX_NOCOPY(PxVehiclePhysXWheelShapeParams)
public:
PxVehiclePhysXWheelShapeParams(const PxMaterial& _material, const PxShapeFlags _flags, const PxFilterData _simulationFilterData, const PxFilterData _queryFilterData)
: material(_material),
flags(_flags),
simulationFilterData(_simulationFilterData),
queryFilterData(_queryFilterData)
{
}
const PxMaterial& material;
PxShapeFlags flags;
PxFilterData simulationFilterData;
PxFilterData queryFilterData;
};
void PxVehiclePhysXActorCreate
(const PxVehicleFrame& vehicleFrame,
const PxVehiclePhysXRigidActorParams& rigidActorParams, const PxTransform& rigidActorCmassLocalPose,
const PxVehiclePhysXRigidActorShapeParams& rigidActorShapeParams,
const PxVehiclePhysXWheelParams& wheelParams, const PxVehiclePhysXWheelShapeParams& wheelShapeParams,
PxPhysics& physics, const PxCookingParams& params,
PxVehiclePhysXActor& vehiclePhysXActor);
void PxVehiclePhysXActorConfigure
(const PxVehiclePhysXRigidActorParams& rigidActorParams, const PxTransform& rigidActorCmassLocalPose,
PxRigidBody& rigidBody);
void PxVehiclePhysXArticulationLinkCreate
(const PxVehicleFrame& vehicleFrame,
const PxVehiclePhysXRigidActorParams& rigidActorParams, const PxTransform& rigidActorCmassLocalPose,
const PxVehiclePhysXRigidActorShapeParams& rigidActorShapeParams,
const PxVehiclePhysXWheelParams& wheelParams, const PxVehiclePhysXWheelShapeParams& wheelShapeParams,
PxPhysics& physics, const PxCookingParams& params,
PxVehiclePhysXActor& vehiclePhysXActor);
void PxVehiclePhysXActorDestroy(PxVehiclePhysXActor& vehiclePhysXActor);
#if !PX_DOXYGEN
} // namespace vehicle2
} // namespace physx
#endif