aboutsummaryrefslogtreecommitdiff
path: root/APEX_1.4/samples_v2/SampleParticlesMeshParticles
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 /APEX_1.4/samples_v2/SampleParticlesMeshParticles
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 'APEX_1.4/samples_v2/SampleParticlesMeshParticles')
-rw-r--r--APEX_1.4/samples_v2/SampleParticlesMeshParticles/Main.cpp51
-rw-r--r--APEX_1.4/samples_v2/SampleParticlesMeshParticles/SampleSceneController.cpp67
-rw-r--r--APEX_1.4/samples_v2/SampleParticlesMeshParticles/SampleSceneController.h39
-rw-r--r--APEX_1.4/samples_v2/SampleParticlesMeshParticles/SampleUIController.cpp58
-rw-r--r--APEX_1.4/samples_v2/SampleParticlesMeshParticles/SampleUIController.h39
5 files changed, 0 insertions, 254 deletions
diff --git a/APEX_1.4/samples_v2/SampleParticlesMeshParticles/Main.cpp b/APEX_1.4/samples_v2/SampleParticlesMeshParticles/Main.cpp
deleted file mode 100644
index 61565451..00000000
--- a/APEX_1.4/samples_v2/SampleParticlesMeshParticles/Main.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-#include "Utils.h"
-
-#include <DirectXMath.h>
-#include "XInput.h"
-#include "DXUTMisc.h"
-#include "DXUTCamera.h"
-
-
-#include "ApexController.h"
-#include "ApexRenderer.h"
-#include "CommonUIController.h"
-#include "SampleUIController.h"
-#include "SampleSceneController.h"
-
-#include "SampleManager.h"
-
-int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow)
-{
- PX_UNUSED(hInstance);
- PX_UNUSED(hPrevInstance);
- PX_UNUSED(lpCmdLine);
- PX_UNUSED(nCmdShow);
-
-// Enable run-time memory check for debug builds.
-#if defined(DEBUG) | defined(_DEBUG)
- _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
- AllocConsole();
-#endif
-
- SampleManager* sampleManager = new SampleManager(L"APEX Particles Sample: Mesh Particles");
-
- CFirstPersonCamera camera;
-
- auto apexController = ApexController(PxDefaultSimulationFilterShader, &camera);
- auto apexRender = ApexRenderer(&camera, apexController);
- auto sceneController = SampleSceneController(&camera, apexController);
- auto commonUiController = CommonUIController(&camera, &apexRender, &apexController);
- auto sampleUIController = SampleUIController(&sceneController, &commonUiController);
-
- sampleManager->addControllerToFront(&apexController);
- sampleManager->addControllerToFront(&apexRender);
- sampleManager->addControllerToFront(&sceneController);
- sampleManager->addControllerToFront(&sampleUIController);
- sampleManager->addControllerToFront(&commonUiController);
-
- int result = sampleManager->run();
-
- delete sampleManager;
-
- return result;
-}
diff --git a/APEX_1.4/samples_v2/SampleParticlesMeshParticles/SampleSceneController.cpp b/APEX_1.4/samples_v2/SampleParticlesMeshParticles/SampleSceneController.cpp
deleted file mode 100644
index 9df8d0f9..00000000
--- a/APEX_1.4/samples_v2/SampleParticlesMeshParticles/SampleSceneController.cpp
+++ /dev/null
@@ -1,67 +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 "SampleSceneController.h"
-#include "ApexRenderer.h" // for matrix conversion
-#include <DirectXMath.h>
-#include "XInput.h"
-#include "DXUTMisc.h"
-#pragma warning(push)
-#pragma warning(disable : 4481) // Suppress "nonstandard extension used" warning
-#include "DXUTCamera.h"
-#pragma warning(pop)
-
-#include "PxPhysicsAPI.h"
-#include "PxMath.h"
-
-#include "ApexResourceCallback.h"
-#include "PhysXPrimitive.h"
-
-#include "EmitterAsset.h"
-#include "EmitterActor.h"
-
-using namespace physx;
-
-///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
-SampleSceneController::SampleSceneController(CFirstPersonCamera* camera, ApexController& apex)
- : mApex(apex), mCamera(camera)
-{
-}
-
-SampleSceneController::~SampleSceneController()
-{
-}
-
-void SampleSceneController::onSampleStart()
-{
- // setup camera
- DirectX::XMVECTORF32 lookAtPt = { 0, 2, 0, 0 };
- DirectX::XMVECTORF32 eyePt = { 0, 5, 10, 0 };
- mCamera->SetViewParams(eyePt, lookAtPt);
- mCamera->SetRotateButtons(false, false, true, false);
- mCamera->SetEnablePositionMovement(true);
-
- // spawn mesh emitter
- nvidia::apex::Asset *asset = (nvidia::apex::Asset *)mApex.getApexSDK()->getNamedResourceProvider()->getResource(EMITTER_AUTHORING_TYPE_NAME, "testMeshEmitter4ParticleIos");
- NvParameterized::Interface *defaultActorDesc = asset->getDefaultActorDesc();
- NvParameterized::setParamTransform(*defaultActorDesc, "InitialPose", PxTransform(PxIdentity));
- EmitterActor *actor = (EmitterActor*)asset->createApexActor(*defaultActorDesc, *(mApex.getApexScene()));
-
- actor->startEmit(true);
-
-}
-
-///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-
diff --git a/APEX_1.4/samples_v2/SampleParticlesMeshParticles/SampleSceneController.h b/APEX_1.4/samples_v2/SampleParticlesMeshParticles/SampleSceneController.h
deleted file mode 100644
index 34656862..00000000
--- a/APEX_1.4/samples_v2/SampleParticlesMeshParticles/SampleSceneController.h
+++ /dev/null
@@ -1,39 +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.
-*/
-
-#ifndef SCENE_CONTROLLER_H
-#define SCENE_CONTROLLER_H
-
-#include "ApexController.h"
-#include "SampleManager.h"
-#include "PxPhysicsAPI.h"
-
-class CFirstPersonCamera;
-
-using namespace physx;
-using namespace nvidia;
-
-class SampleSceneController : public ISampleController
-{
-public:
- SampleSceneController(CFirstPersonCamera* camera, ApexController& apex);
- virtual ~SampleSceneController();
-
- virtual void onSampleStart();
-
-private:
- SampleSceneController& operator= (const SampleSceneController&);
-
- ApexController& mApex;
- CFirstPersonCamera* mCamera;
-
-};
-
-#endif \ No newline at end of file
diff --git a/APEX_1.4/samples_v2/SampleParticlesMeshParticles/SampleUIController.cpp b/APEX_1.4/samples_v2/SampleParticlesMeshParticles/SampleUIController.cpp
deleted file mode 100644
index d6ddca20..00000000
--- a/APEX_1.4/samples_v2/SampleParticlesMeshParticles/SampleUIController.cpp
+++ /dev/null
@@ -1,58 +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 "SampleUIController.h"
-#include "SampleSceneController.h"
-#include "CommonUIController.h"
-
-SampleUIController::SampleUIController(SampleSceneController* s, CommonUIController* c) : mScene(s), mCommonUIController(c)
-{
-}
-
-void SampleUIController::onInitialize()
-{
- TwBar* sampleBar = TwNewBar("Sample");
- PX_UNUSED(sampleBar);
- TwDefine("Sample color='19 25 59' alpha=128 text=light size='200 150' iconified=false valueswidth=150 position='12 480' label='Select Asset'");
-
- mCommonUIController->addPhysXDebugRenderParam(PxVisualizationParameter::ePARTICLE_SYSTEM_POSITION);
- mCommonUIController->addPhysXDebugRenderParam(PxVisualizationParameter::ePARTICLE_SYSTEM_VELOCITY);
- mCommonUIController->addPhysXDebugRenderParam(PxVisualizationParameter::ePARTICLE_SYSTEM_COLLISION_NORMAL);
- mCommonUIController->addPhysXDebugRenderParam(PxVisualizationParameter::ePARTICLE_SYSTEM_BOUNDS);
- mCommonUIController->addPhysXDebugRenderParam(PxVisualizationParameter::ePARTICLE_SYSTEM_GRID);
- mCommonUIController->addPhysXDebugRenderParam(PxVisualizationParameter::ePARTICLE_SYSTEM_BROADPHASE_BOUNDS);
- mCommonUIController->addPhysXDebugRenderParam(PxVisualizationParameter::ePARTICLE_SYSTEM_MAX_MOTION_DISTANCE);
-
- mCommonUIController->addApexDebugRenderParam("VISUALIZE_TURBULENCE_FS_VELOCITY", "TurbulenceFS", 1.0f, "TurbulenceFS velocities");
- mCommonUIController->addApexDebugRenderParam("VISUALIZE_TURBULENCE_FS_BBOX", "TurbulenceFS", 1.0f, "TurbulenceFS BBOX");
- mCommonUIController->addApexDebugRenderParam("VISUALIZE_TURBULENCE_FS_ACTOR_NAME", "TurbulenceFS", 1.0f, "TurbulenceFS name");
- mCommonUIController->addApexDebugRenderParam("VISUALIZE_TURBULENCE_FS_VELOCITY_FIELD", "TurbulenceFS", 1.0f, "TurbulenceFS velocity field");
- mCommonUIController->addApexDebugRenderParam("VISUALIZE_TURBULENCE_FS_STREAMLINES", "TurbulenceFS", 1.0f, "TurbulenceFS streamlines");
- mCommonUIController->addApexDebugRenderParam("VISUALIZE_IOFX_ACTOR", "Iofx", 1.0f, "IOFX actor");
- mCommonUIController->addApexDebugRenderParam("apexEmitterParameters.VISUALIZE_APEX_EMITTER_ACTOR", "Emitter", 1.0f, "Emitter actor");
-}
-
-LRESULT SampleUIController::MsgProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
-{
- PX_UNUSED(hWnd);
- PX_UNUSED(uMsg);
- PX_UNUSED(wParam);
- PX_UNUSED(lParam);;
-
- return 1;
-}
-
-void SampleUIController::BackBufferResized(ID3D11Device* pDevice, const DXGI_SURFACE_DESC* pBackBufferSurfaceDesc)
-{
- PX_UNUSED(pDevice);
-
- mWidth = pBackBufferSurfaceDesc->Width;
- mHeight = pBackBufferSurfaceDesc->Height;
-}
diff --git a/APEX_1.4/samples_v2/SampleParticlesMeshParticles/SampleUIController.h b/APEX_1.4/samples_v2/SampleParticlesMeshParticles/SampleUIController.h
deleted file mode 100644
index 93fe5bbf..00000000
--- a/APEX_1.4/samples_v2/SampleParticlesMeshParticles/SampleUIController.h
+++ /dev/null
@@ -1,39 +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.
-*/
-
-#ifndef SAMPLE_UI_CONTROLLER_H
-#define SAMPLE_UI_CONTROLLER_H
-
-#include "SampleManager.h"
-#include <DirectXMath.h>
-#include "AntTweakBar.h"
-
-class SampleSceneController;
-class CommonUIController;
-
-class SampleUIController : public ISampleController
-{
- public:
- SampleUIController(SampleSceneController* s, CommonUIController* c);
-
- virtual void onInitialize();
- virtual LRESULT MsgProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
- virtual void BackBufferResized(ID3D11Device* pDevice, const DXGI_SURFACE_DESC* pBackBufferSurfaceDesc);
-
- private:
- SampleSceneController* mScene;
- CommonUIController* mCommonUIController;
- TwBar* mSettingsBar;
-
- UINT mWidth;
- UINT mHeight;
-};
-
-#endif \ No newline at end of file