aboutsummaryrefslogtreecommitdiff
path: root/PhysX_3.4/Source/PhysX/src/buffering/ScbActor.h
diff options
context:
space:
mode:
authorsschirm <[email protected]>2016-12-23 14:20:36 +0100
committersschirm <[email protected]>2016-12-23 14:56:17 +0100
commitef6937e69e8ee3f409cf9d460d5ad300a65d5924 (patch)
tree710426e8daa605551ce3f34b581897011101c30f /PhysX_3.4/Source/PhysX/src/buffering/ScbActor.h
parentInitial commit: (diff)
downloadphysx-3.4-ef6937e69e8ee3f409cf9d460d5ad300a65d5924.tar.xz
physx-3.4-ef6937e69e8ee3f409cf9d460d5ad300a65d5924.zip
PhysX 3.4 / APEX 1.4 release candidate @21506124
Diffstat (limited to 'PhysX_3.4/Source/PhysX/src/buffering/ScbActor.h')
-rw-r--r--PhysX_3.4/Source/PhysX/src/buffering/ScbActor.h16
1 files changed, 6 insertions, 10 deletions
diff --git a/PhysX_3.4/Source/PhysX/src/buffering/ScbActor.h b/PhysX_3.4/Source/PhysX/src/buffering/ScbActor.h
index 364972b1..21f623e5 100644
--- a/PhysX_3.4/Source/PhysX/src/buffering/ScbActor.h
+++ b/PhysX_3.4/Source/PhysX/src/buffering/ScbActor.h
@@ -27,7 +27,6 @@
// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
-
#ifndef PX_PHYSICS_SCB_FSACTOR
#define PX_PHYSICS_SCB_FSACTOR
@@ -58,7 +57,6 @@ protected:
~ActorBuffer(){}
};
-
class Actor : public Base
{
//= ATTENTION! =====================================================================================
@@ -97,7 +95,6 @@ public:
//---------------------------------------------------------------------------------
// Miscellaneous
//---------------------------------------------------------------------------------
-
PX_FORCE_INLINE const Core& getActorCore() const { return *reinterpret_cast<const Core*>(reinterpret_cast<size_t>(this) + sOffsets.scbToSc[getScbType()]); }
PX_FORCE_INLINE Core& getActorCore() { return *reinterpret_cast<Core*>(reinterpret_cast<size_t>(this) + sOffsets.scbToSc[getScbType()]); }
@@ -124,19 +121,18 @@ protected:
struct Offsets
{
size_t scToScb[PxActorType::eACTOR_COUNT];
- size_t scbToSc[ScbType::TYPE_COUNT];
+ size_t scbToSc[ScbType::eTYPE_COUNT];
Offsets();
};
static const Offsets sOffsets;
};
-
PX_INLINE void Actor::setActorFlags(PxActorFlags v)
{
#if PX_CHECKED
PxActorFlags aFlags = getActorFlags();
PxActorType::Enum aType = getActorType();
- if ((!aFlags.isSet(PxActorFlag::eDISABLE_SIMULATION)) && v.isSet(PxActorFlag::eDISABLE_SIMULATION) &&
+ if((!aFlags.isSet(PxActorFlag::eDISABLE_SIMULATION)) && v.isSet(PxActorFlag::eDISABLE_SIMULATION) &&
(aType != PxActorType::eRIGID_DYNAMIC) && (aType != PxActorType::eRIGID_STATIC))
{
Ps::getFoundation().error(PxErrorCode::eINVALID_PARAMETER, __FILE__, __LINE__,
@@ -147,11 +143,11 @@ PX_INLINE void Actor::setActorFlags(PxActorFlags v)
write<Buf::BF_ActorFlags>(v);
}
-PX_INLINE void Actor::setOwnerClient( PxClientID inId )
+PX_INLINE void Actor::setOwnerClient(PxClientID inId)
{
//This call is only valid if we aren't in a scene.
//Thus we can't be buffering yet
- if (!isBuffering())
+ if(!isBuffering())
{
getActorCore().setOwnerClient( inId );
UPDATE_PVD_PROPERTIES_OBJECT()
@@ -168,10 +164,10 @@ PX_INLINE void Actor::syncState()
//this should be called from syncState() of derived classes
const PxU32 flags = getBufferFlags();
- if (flags & (Buf::BF_ActorFlags|Buf::BF_DominanceGroup|Buf::BF_ClientBehaviorFlags))
+ if(flags & (Buf::BF_ActorFlags|Buf::BF_DominanceGroup|Buf::BF_ClientBehaviorFlags))
{
Core& core = getActorCore();
- Buf& buffer = *reinterpret_cast<Buf*>(getStream());
+ const Buf& buffer = *reinterpret_cast<const Buf*>(getStream());
flush<Buf::BF_ActorFlags>(core, buffer);
flush<Buf::BF_DominanceGroup>(core, buffer);