aboutsummaryrefslogtreecommitdiff
path: root/APEX_1.4/common/include/PhysXObjectDescIntl.h
diff options
context:
space:
mode:
authorgit perforce import user <a@b>2016-10-25 12:29:14 -0600
committerSheikh Dawood Abdul Ajees <Sheikh Dawood Abdul Ajees>2016-10-25 18:56:37 -0500
commit3dfe2108cfab31ba3ee5527e217d0d8e99a51162 (patch)
treefa6485c169e50d7415a651bf838f5bcd0fd3bfbd /APEX_1.4/common/include/PhysXObjectDescIntl.h
downloadphysx-3.4-3dfe2108cfab31ba3ee5527e217d0d8e99a51162.tar.xz
physx-3.4-3dfe2108cfab31ba3ee5527e217d0d8e99a51162.zip
Initial commit:
PhysX 3.4.0 Update @ 21294896 APEX 1.4.0 Update @ 21275617 [CL 21300167]
Diffstat (limited to 'APEX_1.4/common/include/PhysXObjectDescIntl.h')
-rw-r--r--APEX_1.4/common/include/PhysXObjectDescIntl.h116
1 files changed, 116 insertions, 0 deletions
diff --git a/APEX_1.4/common/include/PhysXObjectDescIntl.h b/APEX_1.4/common/include/PhysXObjectDescIntl.h
new file mode 100644
index 00000000..1fd999d0
--- /dev/null
+++ b/APEX_1.4/common/include/PhysXObjectDescIntl.h
@@ -0,0 +1,116 @@
+/*
+ * Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved.
+ *
+ * NVIDIA CORPORATION and its licensors retain all intellectual property
+ * and proprietary rights in and to this software, related documentation
+ * and any modifications thereto. Any use, reproduction, disclosure or
+ * distribution of this software and related documentation without an express
+ * license agreement from NVIDIA CORPORATION is strictly prohibited.
+ */
+
+
+#ifndef PHYSX_OBJECT_DESC_INTL_H
+#define PHYSX_OBJECT_DESC_INTL_H
+
+#include "PhysXObjectDesc.h"
+
+namespace nvidia
+{
+namespace apex
+{
+
+/**
+ * Module/Asset interface to actor info structure. This allows the asset to
+ * set the various flags without knowing their implementation.
+ */
+class PhysXObjectDescIntl : public PhysXObjectDesc
+{
+public:
+ void setIgnoreTransform(bool b)
+ {
+ if (b)
+ {
+ mFlags |= TRANSFORM;
+ }
+ else
+ {
+ mFlags &= ~(uint32_t)TRANSFORM;
+ }
+ };
+ void setIgnoreRaycasts(bool b)
+ {
+ if (b)
+ {
+ mFlags |= RAYCASTS;
+ }
+ else
+ {
+ mFlags &= ~(uint32_t)RAYCASTS;
+ }
+ };
+ void setIgnoreContacts(bool b)
+ {
+ if (b)
+ {
+ mFlags |= CONTACTS;
+ }
+ else
+ {
+ mFlags &= ~(uint32_t)CONTACTS;
+ }
+ };
+ void setUserDefinedFlag(uint32_t index, bool b)
+ {
+ if (b)
+ {
+ mFlags |= (1 << index);
+ }
+ else
+ {
+ mFlags &= ~(1 << index);
+ }
+ }
+
+ /**
+ \brief Implementation of pure virtual functions in PhysXObjectDesc, used for external (read-only)
+ access to the Actor list
+ */
+ uint32_t getApexActorCount() const
+ {
+ return mApexActors.size();
+ }
+ const Actor* getApexActor(uint32_t i) const
+ {
+ return mApexActors[i];
+ }
+
+
+ void swap(PhysXObjectDescIntl& rhs)
+ {
+ mApexActors.swap(rhs.mApexActors);
+ nvidia::swap(mPhysXObject, rhs.mPhysXObject);
+
+ nvidia::swap(userData, rhs.userData);
+ nvidia::swap(mFlags, rhs.mFlags);
+ }
+
+ /**
+ \brief Array of pointers to APEX actors assiciated with this PhysX object
+
+ Pointers may be NULL in cases where the APEX actor has been deleted
+ but PhysX actor cleanup has been deferred
+ */
+ physx::Array<const Actor*> mApexActors;
+
+ /**
+ \brief the PhysX object which uses this descriptor
+ */
+ const void* mPhysXObject;
+protected:
+ virtual ~PhysXObjectDescIntl(void) {}
+};
+
+}
+} // end namespace nvidia::apex
+
+#endif // PHYSX_OBJECT_DESC_INTL_H