APEX Framework: PhysXObjectDesc.h Source File

NVIDIA APEX

PhysXObjectDesc.h
Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2008-2017, NVIDIA CORPORATION.  All rights reserved.
00003  *
00004  * NVIDIA CORPORATION and its licensors retain all intellectual property
00005  * and proprietary rights in and to this software, related documentation
00006  * and any modifications thereto.  Any use, reproduction, disclosure or
00007  * distribution of this software and related documentation without an express
00008  * license agreement from NVIDIA CORPORATION is strictly prohibited.
00009  */
00010 
00011 
00012 #ifndef PHYS_XOBJECT_DESC_H
00013 #define PHYS_XOBJECT_DESC_H
00014 
00020 #include "ApexUsingNamespace.h"
00021 
00022 namespace nvidia
00023 {
00024 namespace apex
00025 {
00026 
00027 class Actor;
00028 
00029 PX_PUSH_PACK_DEFAULT
00030 
00037 class PhysXObjectDesc
00038 {
00039 protected:
00046     uint32_t                mFlags;
00047 
00048     enum
00049     {
00050         TRANSFORM   = (1U << 31),   
00051         RAYCASTS    = (1U << 30), 
00052         CONTACTS    = (1U << 29) 
00053     };
00054 
00055 
00056 public:
00058     virtual uint32_t                getApexActorCount() const = 0;
00060     virtual const Actor*    getApexActor(uint32_t i) const = 0;
00061 
00063     bool ignoreTransform() const
00064     {
00065         return (mFlags & (uint32_t)TRANSFORM) ? true : false;
00066     }
00068     bool ignoreRaycasts() const
00069     {
00070         return (mFlags & (uint32_t)RAYCASTS) ? true : false;
00071     }
00073     bool ignoreContacts() const
00074     {
00075         return (mFlags & (uint32_t)CONTACTS) ? true : false;
00076     }
00078     bool getUserDefinedFlag(uint32_t index) const
00079     {
00080         return (mFlags & (uint32_t)(1 << index)) ? true : false;
00081     }
00082 
00089     void*               userData;
00090 };
00091 
00092 // To get owning Actor's authorable object type name:
00093 //      getActor()->getOwner()->getAuthObjName();
00094 // To get owning Actor's authorable object type ID:
00095 //      getActor()->getOwner()->getAuthObjType();
00096 
00097 PX_POP_PACK
00098 
00099 }
00100 } // end namespace nvidia::apex
00101 
00102 #endif // PHYS_XOBJECT_DESC_H

Generated on Fri Dec 15 2017 13:58:35
Copyright © 2012-2017 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved.