EffectPackageActor.h
Go to the documentation of this file.
00001 //
00002 // Redistribution and use in source and binary forms, with or without
00003 // modification, are permitted provided that the following conditions
00004 // are met:
00005 //  * Redistributions of source code must retain the above copyright
00006 //    notice, this list of conditions and the following disclaimer.
00007 //  * Redistributions in binary form must reproduce the above copyright
00008 //    notice, this list of conditions and the following disclaimer in the
00009 //    documentation and/or other materials provided with the distribution.
00010 //  * Neither the name of NVIDIA CORPORATION nor the names of its
00011 //    contributors may be used to endorse or promote products derived
00012 //    from this software without specific prior written permission.
00013 //
00014 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
00015 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00016 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
00017 // PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
00018 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00019 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00020 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
00021 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
00022 // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00023 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00024 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00025 //
00026 // Copyright (c) 2018 NVIDIA Corporation. All rights reserved.
00027 
00028 
00029 
00030 #ifndef EFFECT_PACKAGE_ACTOR_H
00031 #define EFFECT_PACKAGE_ACTOR_H
00032 
00033 #include "Actor.h"
00034 #include "EmitterActor.h"
00035 
00048 struct ID3D11ShaderResourceView;
00049 struct ID3D11DeviceContext;
00050 
00051 namespace physx
00052 {
00053     class PxRigidDynamic;
00054 }
00055 
00056 namespace nvidia
00057 {
00058 
00059 namespace general_renderdebug4
00060 {
00062 class RenderDebugInterface;
00063 };
00064 
00065 namespace apex
00066 {
00067 
00071 enum EffectType
00072 {
00073     ET_EMITTER,
00074     ET_HEAT_SOURCE,
00075     ET_SUBSTANCE_SOURCE,
00076     ET_TURBULENCE_FS,
00077     ET_JET_FS,
00078     ET_ATTRACTOR_FS,
00079     ET_FORCE_FIELD,
00080     ET_NOISE_FS,
00081     ET_VORTEX_FS,
00082     ET_WIND_FS,
00083     ET_RIGID_BODY,
00084     ET_VELOCITY_SOURCE,
00085     ET_FLAME_EMITTER,
00086     ET_LAST
00087 };
00088 
00089 class Actor;
00090 class RenderVolume;
00091 
00095 class EffectPackageActor : public Actor
00096 {
00097 public:
00098 
00109     virtual void fadeOut(float fadetime) = 0;
00110 
00120     virtual void fadeIn(float fadetime) = 0;
00121 
00125     virtual uint32_t getEffectCount() const = 0;
00126 
00132     virtual EffectType getEffectType(uint32_t effectIndex) const = 0;
00133 
00139     virtual const char* getEffectName(uint32_t effectIndex) const = 0;
00140 
00146     virtual bool isEffectEnabled(uint32_t effectIndex) const = 0;
00147 
00154     virtual bool setEffectEnabled(uint32_t effectIndex, bool state) = 0;
00155 
00161     virtual void setCurrentScale(float scale) = 0;
00162 
00166     virtual float getCurrentScale(void) const = 0;
00167 
00175     virtual bool getEffectPose(uint32_t effectIndex, PxTransform& pose, bool worldSpace) = 0;
00176 
00184     virtual bool setEffectPose(uint32_t effectIndex, const PxTransform& pose, bool worldSpace) = 0;
00185 
00198     virtual Actor* getEffectActor(uint32_t effectIndex) const  = 0;
00199 
00209     virtual PxRigidDynamic* getEffectRigidDynamic(uint32_t effectIndex) const  = 0;
00210 
00218     virtual void setEmitterState(bool state) = 0;
00219 
00225     virtual uint32_t getActiveParticleCount() const = 0;
00226 
00235     virtual bool isStillEmitting() const = 0;
00236 
00240     virtual bool isAlive(void) const = 0;
00241 
00251     virtual void setEnabled(bool state) = 0;
00252 
00256     virtual bool getEnabled() const = 0;
00257 
00265     virtual void setPose(const PxTransform& pose) = 0;
00266 
00270     virtual const PxTransform& getPose() const = 0;
00271 
00275     virtual void refresh() = 0;
00276 
00280     virtual void release() = 0;
00281 
00285     virtual const char* getName() const = 0;
00286 
00290     virtual float getDuration() const = 0;
00291 
00295     virtual float getCurrentLife() const = 0;
00296 
00300     virtual void                 setPreferredRenderVolume(RenderVolume* volume) = 0;
00301 
00305     virtual const char * hasVolumeRenderMaterial(uint32_t &index) const = 0;
00306 
00310     virtual void setApexEmitterValidateCallback(EmitterActor::EmitterValidateCallback *callback) = 0;
00311 };
00312 
00313 
00314 }; // end of apex namespace
00315 }; // end of physx namespace
00316 
00317 #endif

Generated on Sat Dec 1 2018 15:52:05

Copyright © 2012-2018 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved.