Main Page Class List Class Members

- Main Page
- User's Guide
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

# sdk/toolkit/source/NvBlastTkJointImpl.h

Go to the documentation of this file.

    00001 // This code contains NVIDIA Confidential Information and is disclosed to you
    00002 // under a form of NVIDIA software license agreement provided separately to you.
    00003 //
    00004 // Notice
    00005 // NVIDIA Corporation and its licensors retain all intellectual property and
    00006 // proprietary rights in and to this software and related documentation and
    00007 // any modifications thereto. Any use, reproduction, disclosure, or
    00008 // distribution of this software and related documentation without an express
    00009 // license agreement from NVIDIA Corporation is strictly prohibited.
    00010 //
    00011 // ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
    00012 // NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
    00013 // THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
    00014 // MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
    00015 //
    00016 // Information and code furnished is believed to be accurate and reliable.
    00017 // However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
    00018 // information or for any infringement of patents or other rights of third parties that may
    00019 // result from its use. No license is granted by implication or otherwise under any patent
    00020 // or patent rights of NVIDIA Corporation. Details are subject to change without notice.
    00021 // This code supersedes and replaces all information previously supplied.
    00022 // NVIDIA Corporation products are not authorized for use as critical
    00023 // components in life support devices or systems without express written approval of
    00024 // NVIDIA Corporation.
    00025 //
    00026 // Copyright (c) 2016-2020 NVIDIA Corporation. All rights reserved.
    00027
    00028
    00029 #ifndef NVBLASTTKJOINTIMPL_H
    00030 #define NVBLASTTKJOINTIMPL_H
    00031
    00032
    00033 #include "NvBlastTkJoint.h"
    00034 #include "NvBlastTkCommon.h"
    00035 #include "NvBlastIndexFns.h"
    00036
    00037 #include "NvBlastAssert.h"
    00038 #include "NvBlastDLink.h"
    00039
    00040 #include <atomic>
    00041
    00042
    00043 namespace Nv
    00044 {
    00045 namespace Blast
    00046 {
    00047
    00048 // Forward declarations
    00049 class TkActorImpl;
    00050 class TkJointImpl;
    00051 class TkFamilyImpl;
    00052 class TkEventQueue;
    00053
    00054
    00058 struct TkJointLink : public DLink
    00059 {
    00060     TkJointImpl*    m_joint;
    00061 };
    00062
    00063
    00067 class TkJointImpl : public TkJoint
    00068 {
    00069 public:
    00071     TkJointImpl();
    00072
    00079     TkJointImpl(const TkJointDesc& desc, TkFamilyImpl* owner);
    00080
    00081     // Begin TkObject
    00082     virtual void                release() override;
    00083     // End TkObject
    00084
    00085     // Begin TkJoint
    00086     virtual const   TkJointData getData() const override;
    00087     // End TkJoint
    00088
    00089     // Public API
    00090
    00096     const TkJointData&          getDataInternal() const;
    00097
    00103     TkJointData&                getDataWritable();
    00104
    00117     void                        setActors(TkActorImpl* actor0, TkActorImpl* actor1, TkEventQueue* alternateQueue = nullptr);
    00118
    00122     void                        removeReferencesInActors();
    00123
    00128     void                        removeReferencesInFamilies();
    00129
    00130 private:
    00131     TkJointData     m_data;
    00132     TkJointLink     m_links[2];
    00133     TkFamilyImpl*   m_owner;
    00134
    00135     friend class TkFrameworkImpl;
    00136     friend class TkFamilyImpl;
    00137     friend class TkActorImpl;
    00138 };
    00139
    00140
    00142
    00143 NV_INLINE TkJointImpl::TkJointImpl()
    00144 {
    00145     m_links[0].m_joint = m_links[1].m_joint = this;
    00146 }
    00147
    00148
    00149 NV_INLINE const TkJointData& TkJointImpl::getDataInternal() const
    00150 {
    00151     return m_data;
    00152 }
    00153
    00154
    00155 NV_INLINE TkJointData& TkJointImpl::getDataWritable()
    00156 {
    00157     return m_data;
    00158 }
    00159
    00160 } // namespace Blast
    00161 } // namespace Nv
    00162
    00163
    00164 #endif // ifndef NVBLASTTKJOINTIMPL_H

Copyright © 2015-2017 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved. www.nvidia.com