Main Page Class List Class Members

NvBlastExtPxActorImpl.h
Go to the documentation of this file.
1 // This code contains NVIDIA Confidential Information and is disclosed to you
2 // under a form of NVIDIA software license agreement provided separately to you.
3 //
4 // Notice
5 // NVIDIA Corporation and its licensors retain all intellectual property and
6 // proprietary rights in and to this software and related documentation and
7 // any modifications thereto. Any use, reproduction, disclosure, or
8 // distribution of this software and related documentation without an express
9 // license agreement from NVIDIA Corporation is strictly prohibited.
10 //
11 // ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
12 // NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
13 // THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
14 // MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
15 //
16 // Information and code furnished is believed to be accurate and reliable.
17 // However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
18 // information or for any infringement of patents or other rights of third parties that may
19 // result from its use. No license is granted by implication or otherwise under any patent
20 // or patent rights of NVIDIA Corporation. Details are subject to change without notice.
21 // This code supersedes and replaces all information previously supplied.
22 // NVIDIA Corporation products are not authorized for use as critical
23 // components in life support devices or systems without express written approval of
24 // NVIDIA Corporation.
25 //
26 // Copyright (c) 2016-2020 NVIDIA Corporation. All rights reserved.
27
28
29 #ifndef NVBLASTEXTPXACTORIMPL_H
30 #define NVBLASTEXTPXACTORIMPL_H
31
32 #include "NvBlastExtPxActor.h"
33 #include "NvBlastArray.h"
34 #include "PxTransform.h"
35
36
37 using namespace physx;
38
39 namespace Nv
40 {
41 namespace Blast
42 {
43
44
45 // Forward declarations
46 class ExtPxFamilyImpl;
47
48 struct PxActorCreateInfo
49 {
50 PxTransform m_transform;
51 PxVec3 m_scale;
52 PxVec3 m_parentLinearVelocity;
53 PxVec3 m_parentAngularVelocity;
54 PxVec3 m_parentCOM;
55 };
56
57
58 class ExtPxActorImpl final : public ExtPxActor
59 {
60 public:
62
63 ExtPxActorImpl(ExtPxFamilyImpl* family, TkActor* tkActor, const PxActorCreateInfo& pxActorInfo);
64
65 ~ExtPxActorImpl()
66 {
67 release();
68 }
69
70 void release();
71
72
74
75 virtual uint32_t getChunkCount() const override
76 {
77 return static_cast<uint32_t>(m_chunkIndices.size());
78 }
79
80 virtual const uint32_t* getChunkIndices() const override
81 {
82 return m_chunkIndices.begin();
83 }
84
85 virtual PxRigidDynamic& getPhysXActor() const override
86 {
87 return *m_rigidDynamic;
88 }
89
90 virtual TkActor& getTkActor() const override
91 {
92 return *m_tkActor;
93 }
94
95 virtual ExtPxFamily& getFamily() const override;
96
97
98 private:
100
101 ExtPxFamilyImpl* m_family;
102 TkActor* m_tkActor;
103 PxRigidDynamic* m_rigidDynamic;
104 InlineArray<uint32_t, 4>::type m_chunkIndices;
105 };
106
107
108
109 } // namespace Blast
110 } // namespace Nv
111
112
113 #endif // ifndef NVBLASTEXTPXACTORIMPL_H
physx
Definition: NvBlastExtApexSharedParts.h:34
Nv::Blast::PxActorCreateInfo::m_transform
PxTransform m_transform
Definition: NvBlastExtPxActorImpl.h:50
NvBlastArray.h
Nv::Blast::ExtPxActorImpl::getChunkCount
virtual uint32_t getChunkCount() const override
Definition: NvBlastExtPxActorImpl.h:75
Nv::Blast::InlineArray
Definition: NvBlastArray.h:58
Nv::Blast::TkActor
Definition: NvBlastTkActor.h:57
Nv::Blast::ExtPxActorImpl::getTkActor
virtual TkActor & getTkActor() const override
Definition: NvBlastExtPxActorImpl.h:90
Nv::Blast::PxActorCreateInfo::m_scale
PxVec3 m_scale
Definition: NvBlastExtPxActorImpl.h:51
Nv::Blast::ExtPxActorImpl::~ExtPxActorImpl
~ExtPxActorImpl()
Definition: NvBlastExtPxActorImpl.h:65
Nv::Blast::ExtPxActorImpl::getPhysXActor
virtual PxRigidDynamic & getPhysXActor() const override
Definition: NvBlastExtPxActorImpl.h:85
NvBlastExtPxActor.h
Nv::Blast::PxActorCreateInfo::m_parentCOM
PxVec3 m_parentCOM
Definition: NvBlastExtPxActorImpl.h:54
Nv::Blast::ExtPxActor
Definition: NvBlastExtPxActor.h:57
Nv::Blast::ExtPxActorImpl
Definition: NvBlastExtPxActorImpl.h:58
Nv::Blast::ExtPxFamily
Definition: NvBlastExtPxFamily.h:105
Nv::Blast::PxActorCreateInfo::m_parentAngularVelocity
PxVec3 m_parentAngularVelocity
Definition: NvBlastExtPxActorImpl.h:53
Nv::Blast::PxActorCreateInfo
Definition: NvBlastExtPxActorImpl.h:48
Nv::Blast::ExtPxFamilyImpl
Definition: NvBlastExtPxFamilyImpl.h:53
Nv::Blast::PxActorCreateInfo::m_parentLinearVelocity
PxVec3 m_parentLinearVelocity
Definition: NvBlastExtPxActorImpl.h:52
Nv
Definition: NvBlastArray.h:37
Nv::Blast::ExtPxActorImpl::getChunkIndices
virtual const uint32_t * getChunkIndices() const override
Definition: NvBlastExtPxActorImpl.h:80