Main Page Class List Class Members

NvBlastTkJointImpl.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 NVBLASTTKJOINTIMPL_H
30 #define NVBLASTTKJOINTIMPL_H
31
32
33 #include "NvBlastTkJoint.h"
34 #include "NvBlastTkCommon.h"
35 #include "NvBlastIndexFns.h"
36
37 #include "NvBlastAssert.h"
38 #include "NvBlastDLink.h"
39
40 #include <atomic>
41
42
43 namespace Nv
44 {
45 namespace Blast
46 {
47
48 // Forward declarations
49 class TkActorImpl;
50 class TkJointImpl;
51 class TkFamilyImpl;
52 class TkEventQueue;
53
54
58 struct TkJointLink : public DLink
59 {
60 TkJointImpl* m_joint;
61 };
62
63
67 class TkJointImpl : public TkJoint
68 {
69 public:
71 TkJointImpl();
72
79 TkJointImpl(const TkJointDesc& desc, TkFamilyImpl* owner);
80
81 // Begin TkObject
82 virtual void release() override;
83 // End TkObject
84
85 // Begin TkJoint
86 virtual const TkJointData getData() const override;
87 // End TkJoint
88
89 // Public API
90
96 const TkJointData& getDataInternal() const;
97
103 TkJointData& getDataWritable();
104
117 void setActors(TkActorImpl* actor0, TkActorImpl* actor1, TkEventQueue* alternateQueue = nullptr);
118
122 void removeReferencesInActors();
123
128 void removeReferencesInFamilies();
129
130 private:
131 TkJointData m_data;
132 TkJointLink m_links[2];
133 TkFamilyImpl* m_owner;
134
135 friend class TkFrameworkImpl;
136 friend class TkFamilyImpl;
137 friend class TkActorImpl;
138 };
139
140
142
143 NV_INLINE TkJointImpl::TkJointImpl()
144 {
145 m_links[0].m_joint = m_links[1].m_joint = this;
146 }
147
148
149 NV_INLINE const TkJointData& TkJointImpl::getDataInternal() const
150 {
151 return m_data;
152 }
153
154
155 NV_INLINE TkJointData& TkJointImpl::getDataWritable()
156 {
157 return m_data;
158 }
159
160 } // namespace Blast
161 } // namespace Nv
162
163
164 #endif // ifndef NVBLASTTKJOINTIMPL_H
Nv::Blast::TkJointImpl::getDataInternal
const TkJointData & getDataInternal() const
Definition: NvBlastTkJointImpl.h:149
Nv::Blast::TkActorImpl
Definition: NvBlastTkActorImpl.h:75
Nv::Blast::TkJoint
Definition: NvBlastTkJoint.h:63
Nv::Blast::TkJointLink::m_joint
TkJointImpl * m_joint
The joint containing this link.
Definition: NvBlastTkJointImpl.h:60
Nv::Blast::TkJointLink
Definition: NvBlastTkJointImpl.h:58
Nv::Blast::DLink
Definition: NvBlastDLink.h:142
Nv::Blast::TkJointDesc
Definition: NvBlastTkFramework.h:130
NvBlastIndexFns.h
NvBlastDLink.h
Nv::Blast::TkJointImpl::getDataWritable
TkJointData & getDataWritable()
Definition: NvBlastTkJointImpl.h:155
NV_INLINE
#define NV_INLINE
Definition: NvPreprocessor.h:350
NvBlastTkCommon.h
Nv::Blast::TkEventQueue
Definition: NvBlastTkEventQueue.h:61
Nv::Blast::TkFrameworkImpl
Definition: NvBlastTkFrameworkImpl.h:54
Nv::Blast::TkJointImpl::TkJointImpl
TkJointImpl()
Definition: NvBlastTkJointImpl.h:143
NvBlastTkJoint.h
Nv::Blast::TkJointImpl
Definition: NvBlastTkJointImpl.h:67
Nv
Definition: NvBlastArray.h:37
NvBlastAssert.h
Nv::Blast::TkJointData
Definition: NvBlastTkJoint.h:45