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
14#ifndef PX_PHYSICS_PX_PHYSICS_INSERTION_CALLBACK
15#define PX_PHYSICS_PX_PHYSICS_INSERTION_CALLBACK
16
17#include "PxBase.h"
18
19/** \addtogroup common
20@{
21*/
22
23#ifndef PX_DOXYGEN
24namespace physx
25{
26#endif
27
28 /**
29
30 \brief PxPhysicsInsertionCallback does provide interface from PxCooking to be able to insert
31 TriangleMesh or HeightfieldMesh directly into PxPhysics without the need of storing
32 the cooking results into stream.
33
34 This advised only if real-time cooking is required, using "offline" cooking and
35 streams is highly advised.
36
37 Only default PxPhysicsInsertionCallback implementation must be used. The PxPhysics
38 default callback can be obtained using the PxPhysics::getPhysicsInsertionCallback().
39
40 @see PxCooking PxPhysics
41 */
42 class PxPhysicsInsertionCallback
43 {
44 public:
45 PxPhysicsInsertionCallback() {}
46
47 /**
48 \brief Inserts object (TriangleMesh or HeightfieldMesh) into PxPhysics.
49
50 \param obj Object to insert.
51 */
52 virtual bool insertObject(PxBase& obj) = 0;
53
54 protected:
55 virtual ~PxPhysicsInsertionCallback() {}
56 };
57
58
59#ifndef PX_DOXYGEN
60} // namespace physx
61#endif
62
63/** @} */
64#endif
65