diff options
| author | sschirm <[email protected]> | 2016-12-23 14:20:36 +0100 |
|---|---|---|
| committer | sschirm <[email protected]> | 2016-12-23 14:56:17 +0100 |
| commit | ef6937e69e8ee3f409cf9d460d5ad300a65d5924 (patch) | |
| tree | 710426e8daa605551ce3f34b581897011101c30f /APEX_1.4/module/iofx/src/IofxActorImpl.cpp | |
| parent | Initial commit: (diff) | |
| download | physx-3.4-ef6937e69e8ee3f409cf9d460d5ad300a65d5924.tar.xz physx-3.4-ef6937e69e8ee3f409cf9d460d5ad300a65d5924.zip | |
PhysX 3.4 / APEX 1.4 release candidate @21506124
Diffstat (limited to 'APEX_1.4/module/iofx/src/IofxActorImpl.cpp')
| -rw-r--r-- | APEX_1.4/module/iofx/src/IofxActorImpl.cpp | 153 |
1 files changed, 0 insertions, 153 deletions
diff --git a/APEX_1.4/module/iofx/src/IofxActorImpl.cpp b/APEX_1.4/module/iofx/src/IofxActorImpl.cpp deleted file mode 100644 index 6996e880..00000000 --- a/APEX_1.4/module/iofx/src/IofxActorImpl.cpp +++ /dev/null @@ -1,153 +0,0 @@ -/* - * 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. - */ - - -#include "Apex.h" -#include "ApexSDKIntl.h" -#include "SceneIntl.h" -#include "IofxActor.h" -#include "IofxActorImpl.h" -#include "IofxSceneCPU.h" -#include "IofxSceneGPU.h" -#include "RenderVolumeImpl.h" -#include "IosObjectData.h" -#include "IofxRenderData.h" - -#include "ModuleIofxImpl.h" - -namespace nvidia -{ -namespace iofx -{ - -IofxActorImpl::IofxActorImpl(ResID renderResID, IofxScene* iscene, IofxManager& mgr) - : mRenderResID(renderResID) - , mIofxScene(iscene) - , mMgr(mgr) - , mRenderVolume(NULL) // IOS will set this after creation - , mSemantics(0) - , mActiveRenderable(NULL) -{ - //asset.add(*this); - - mResultBounds.setEmpty(); - mResultRange.startIndex = 0; - mResultRange.objectCount = 0; - mResultVisibleCount = 0; - - addSelfToContext(*iscene->mApexScene->getApexContext()); // Add self to ApexScene - addSelfToContext(*iscene); // Add self to IofxScene -} - -IofxActorImpl::~IofxActorImpl() -{ -} - -void IofxActorImpl::getLodRange(float& min, float& max, bool& intOnly) const -{ - READ_ZONE(); - PX_UNUSED(min); - PX_UNUSED(max); - PX_UNUSED(intOnly); - APEX_INVALID_OPERATION("not implemented"); -} - - -float IofxActorImpl::getActiveLod() const -{ - READ_ZONE(); - APEX_INVALID_OPERATION("BasicIosActor does not support this operation"); - return -1.0f; -} - - -void IofxActorImpl::forceLod(float lod) -{ - WRITE_ZONE(); - PX_UNUSED(lod); - APEX_INVALID_OPERATION("not implemented"); -} - -void IofxActorImpl::release() -{ - if (mInRelease) - { - return; - } - mInRelease = true; - destroy(); -} - - -void IofxActorImpl::destroy() -{ - if (mRenderVolume) - { - mRenderVolume->removeIofxActor(*this); - } - - // Removes self from scenes and IOFX manager - // should be called after mRenderVolume->removeIofxActor to avoid dead-lock!!! - ApexActor::destroy(); - - for (uint32_t i = 0 ; i < mRenderableArray.size() ; i++) - { - IofxRenderableImpl* renderable = mRenderableArray[i]; - if (renderable != NULL) - { - renderable->release(); - } - } - mRenderableArray.clear(); - - delete this; -} - -bool IofxActorImpl::prepareRenderables(IosObjectBaseData* obj) -{ - if (mResultRange.objectCount > 0 && obj->renderData->checkSemantics(mSemantics)) - { - const uint32_t instanceID = obj->renderData->getInstanceID(); - if (mRenderableArray.size() <= instanceID) - { - mRenderableArray.resize(instanceID + 1, NULL); - } - mActiveRenderable = mRenderableArray[instanceID]; - if (mActiveRenderable == NULL) - { - if (mMgr.mIsMesh) - { - mActiveRenderable = PX_NEW(IofxMeshRenderable)(mIofxScene, mRenderResID); - } - else - { - mActiveRenderable = PX_NEW(IofxSpriteRenderable)(mIofxScene, mRenderResID); - } - mRenderableArray[instanceID] = mActiveRenderable; - } - - mActiveRenderable->update(obj->renderData, mResultBounds, mResultRange.startIndex, mResultRange.objectCount, mResultVisibleCount); - return true; - } - else - { - mActiveRenderable = NULL; - return false; - } -} - -IofxRenderable* IofxActorImpl::acquireRenderableReference() -{ - return mActiveRenderable ? mActiveRenderable->incrementReferenceCount() : NULL; -} - - -} -} // namespace nvidia |