Defines the EffectPackageActor API which is instantiated from an EffectPackageAsset. More...
#include <EffectPackageActor.h>
Public Member Functions | |
virtual void | fadeOut (float fadetime)=0 |
Fade out the EffectPackageActor over a period of time. This method will cause the actors within the EffectPackage to be 'faded out' over a period of time. The EffectPackageAsset will define how this fadeOut operation is to be applied. Some actors may simply be turned off over this duration while others are modulated in some way. For example, by default, emitter actors will have their emitter rate reduced over this duration so they do not appear to immediately cut off. | |
virtual void | fadeIn (float fadetime)=0 |
Fade in the EffectPackageActor over a period of time. This method will cause the associated effects to be faded in over a period of time. It will begin the linear interpolation fade process relative to the current fade time. Meaning if you had previously specified a fadeOut duration of 1 second but then execute a fadeIn just a 1/2 second later, will will begin fading in from a 50% level; not zero. | |
virtual uint32_t | getEffectCount () const =0 |
Returns the number of effects within this effect package. | |
virtual EffectType | getEffectType (uint32_t effectIndex) const =0 |
Returns the type of effect at this index location. | |
virtual const char * | getEffectName (uint32_t effectIndex) const =0 |
Returns the name of the effect at this index. | |
virtual bool | isEffectEnabled (uint32_t effectIndex) const =0 |
Returns true if this sub-effect is currently enabled. | |
virtual bool | setEffectEnabled (uint32_t effectIndex, bool state)=0 |
Sets the enabled state of this sub-effect. | |
virtual void | setCurrentScale (float scale)=0 |
Sets the over all effect scale, this is a uniform scaling factor. | |
virtual float | getCurrentScale (void) const =0 |
Gets the current overall uniform effect scale. | |
virtual bool | getEffectPose (uint32_t effectIndex, PxTransform &pose, bool worldSpace)=0 |
Returns the pose of this sub-effect; returns as a bool the active state of this effect. | |
virtual bool | setEffectPose (uint32_t effectIndex, const PxTransform &pose, bool worldSpace)=0 |
Sets the pose of this sub-effect; returns as a bool the active state of this effect. | |
virtual Actor * | getEffectActor (uint32_t effectIndex) const =0 |
Returns the base Actor pointer for this effect. Use this method if you need direct access to the base Actor pointer relative to this effect. You must use 'getEffectType' to know what type of actor this is referring to before you cast it to either an emitter, or heat source, or turbulence actor, etc. It is important to note that the application cannot cache this pointer as it may be deleted in subsequent frames due to level of detail calculations or timing values such as fade out operations. | |
virtual PxRigidDynamic * | getEffectRigidDynamic (uint32_t effectIndex) const =0 |
Returns the base PxRigidDynamic actor pointer for this effect. Use this method if you need direct access to the base PxRigidDynamic actor pointer relative to this effect. | |
virtual void | setEmitterState (bool state)=0 |
Forces the state of all emitters associated with this effect package to be on or off. This method allows the application to manually force all emitters to be active or inactive based on an explicit call. | |
virtual uint32_t | getActiveParticleCount () const =0 |
A helper method to return the active number of particles being simulated by all related effects in this EffectPackageActor. | |
virtual bool | isStillEmitting () const =0 |
This helper method reports if any emitters within this EffectPackageActor are still actively emitting particles. | |
virtual bool | isAlive (void) const =0 |
virtual void | setEnabled (bool state)=0 |
Allows the application to manually enable this EffectPackageActor. | |
virtual bool | getEnabled () const =0 |
Returns the current enabled state for this actor. | |
virtual void | setPose (const PxTransform &pose)=0 |
Sets the root pose for this EffectPackageActor It's important to note that child-relative poses for each sub-component in an EffectPackageActor are authored in the ParticleEffectTool. | |
virtual const PxTransform & | getPose () const =0 |
Returns the current root pose for this EffectPackageActor. | |
virtual void | refresh ()=0 |
This method is used by the ParticleEffectTool to refresh a currently running effect with real-time property changes. | |
virtual void | release ()=0 |
Releases this EffectPackageActor and all associated children effects. | |
virtual const char * | getName () const =0 |
A convenient helper method to return the name of the asset used to to create this actor. | |
virtual float | getDuration () const =0 |
returns the duration of the effect; accounting for maximum duration of each sub-effect. A duration of 'zero' means it is an infinite lifetime effect. | |
virtual float | getCurrentLife () const =0 |
Returns the current lifetime of the particle. | |
virtual void | setPreferredRenderVolume (RenderVolume *volume)=0 |
Sets the preferred render volume for emitters in this effect package. | |
virtual const char * | hasVolumeRenderMaterial (uint32_t &index) const =0 |
Returns true if this effect package contains a turbulence effect that specifies a volume-render material; if so then the application may want to set up volume rendering. | |
virtual void | setApexEmitterValidateCallback (EmitterActor::EmitterValidateCallback *callback)=0 |
Sets the emitter validation callback for any newly created emitter actors. |
Detailed Description
Defines the EffectPackageActor API which is instantiated from an EffectPackageAsset.
Member Function Documentation
virtual void nvidia::apex::EffectPackageActor::fadeIn | ( | float | fadetime | ) | [pure virtual] |
Fade in the EffectPackageActor over a period of time. This method will cause the associated effects to be faded in over a period of time. It will begin the linear interpolation fade process relative to the current fade time. Meaning if you had previously specified a fadeOut duration of 1 second but then execute a fadeIn just a 1/2 second later, will will begin fading in from a 50% level; not zero.
- Parameters:
-
[in] fadetime : The duration to fade this effect in, in seconds
virtual void nvidia::apex::EffectPackageActor::fadeOut | ( | float | fadetime | ) | [pure virtual] |
Fade out the EffectPackageActor over a period of time. This method will cause the actors within the EffectPackage to be 'faded out' over a period of time. The EffectPackageAsset will define how this fadeOut operation is to be applied. Some actors may simply be turned off over this duration while others are modulated in some way. For example, by default, emitter actors will have their emitter rate reduced over this duration so they do not appear to immediately cut off.
- Parameters:
-
[in] fadetime : The duration to fade out the associated effects in seconds
virtual uint32_t nvidia::apex::EffectPackageActor::getActiveParticleCount | ( | ) | const [pure virtual] |
A helper method to return the active number of particles being simulated by all related effects in this EffectPackageActor.
- Returns:
- Returns the number of particles active relative to this EffectPackageActor
virtual Actor* nvidia::apex::EffectPackageActor::getEffectActor | ( | uint32_t | effectIndex | ) | const [pure virtual] |
Returns the base Actor pointer for this effect. Use this method if you need direct access to the base Actor pointer relative to this effect. You must use 'getEffectType' to know what type of actor this is referring to before you cast it to either an emitter, or heat source, or turbulence actor, etc. It is important to note that the application cannot cache this pointer as it may be deleted in subsequent frames due to level of detail calculations or timing values such as fade out operations.
- Parameters:
-
[in] effectIndex : The effect number to refer to; must be less than the result of getEffectCount
- Returns:
- Returns the Actor pointer for this effect. This may be NULL if that effect is not currently active.
virtual const char* nvidia::apex::EffectPackageActor::getEffectName | ( | uint32_t | effectIndex | ) | const [pure virtual] |
Returns the name of the effect at this index.
- Parameters:
-
[in] effectIndex : The effect number to refer to; must be less than the result of getEffectCount
virtual bool nvidia::apex::EffectPackageActor::getEffectPose | ( | uint32_t | effectIndex, |
PxTransform & | pose, | ||
bool | worldSpace | ||
) | [pure virtual] |
Returns the pose of this sub-effect; returns as a bool the active state of this effect.
- Parameters:
-
[in] effectIndex : The effect number to refer to; must be less than the result of getEffectCount [pose] : Contains the pose requested [worldSpace] : Whether to return the pose in world-space or in parent-relative space.
virtual PxRigidDynamic* nvidia::apex::EffectPackageActor::getEffectRigidDynamic | ( | uint32_t | effectIndex | ) | const [pure virtual] |
Returns the base PxRigidDynamic actor pointer for this effect. Use this method if you need direct access to the base PxRigidDynamic actor pointer relative to this effect.
- Parameters:
-
[in] effectIndex : The effect number to refer to; must be less than the result of getEffectCount, must be a rigid dynamic effect
- Returns:
- Returns the PxRigidDynamic pointer for this effect. This may be NULL if that effect is not currently active.
virtual EffectType nvidia::apex::EffectPackageActor::getEffectType | ( | uint32_t | effectIndex | ) | const [pure virtual] |
Returns the type of effect at this index location.
- Parameters:
-
[in] effectIndex : The effect number to refer to; must be less than the result of getEffectCount
virtual bool nvidia::apex::EffectPackageActor::isAlive | ( | void | ) | const [pure virtual] |
Returns true if any portion of the effect is still considered 'alive' based on LOD and duration settings.
virtual bool nvidia::apex::EffectPackageActor::isEffectEnabled | ( | uint32_t | effectIndex | ) | const [pure virtual] |
Returns true if this sub-effect is currently enabled.
- Parameters:
-
[in] effectIndex : The effect number to refer to; must be less than the result of getEffectCount
virtual bool nvidia::apex::EffectPackageActor::isStillEmitting | ( | ) | const [pure virtual] |
This helper method reports if any emitters within this EffectPackageActor are still actively emitting particles.
This method allows the application to determine whether or not any emitters are actively running relative to this actor. Typically this would be used to defer deleting an effect while it is still active.
- Returns:
- Returns true if any emitters in the actor are still active.
virtual void nvidia::apex::EffectPackageActor::setCurrentScale | ( | float | scale | ) | [pure virtual] |
Sets the over all effect scale, this is a uniform scaling factor.
- Parameters:
-
[in] scale : The uniform scale to apply to all effects in this effect package
virtual bool nvidia::apex::EffectPackageActor::setEffectEnabled | ( | uint32_t | effectIndex, |
bool | state | ||
) | [pure virtual] |
Sets the enabled state of this sub-effect.
- Parameters:
-
[in] effectIndex : The effect number to refer to; must be less than the result of getEffectCount [in] state : Whether the effect should be enabled or not.
virtual bool nvidia::apex::EffectPackageActor::setEffectPose | ( | uint32_t | effectIndex, |
const PxTransform & | pose, | ||
bool | worldSpace | ||
) | [pure virtual] |
Sets the pose of this sub-effect; returns as a bool the active state of this effect.
- Parameters:
-
[in] effectIndex : The effect number to refer to; must be less than the result of getEffectCount [pose] : Contains the pose to be set [worldSpace] : Whether to return the pose in world-space or in parent-relative space.
virtual void nvidia::apex::EffectPackageActor::setEmitterState | ( | bool | state | ) | [pure virtual] |
Forces the state of all emitters associated with this effect package to be on or off. This method allows the application to manually force all emitters to be active or inactive based on an explicit call.
- Parameters:
-
[state] : Determines whether to set all emitters on or off
virtual void nvidia::apex::EffectPackageActor::setEnabled | ( | bool | state | ) | [pure virtual] |
Allows the application to manually enable this EffectPackageActor.
This method is used by the application to manually force the EffectPackageActor to be enabled. This is generally used based on some kind of game logic where the EffectPackageActor has been pre-allocated and placed into the world but is initially inactive until some event occurs.
- Parameters:
-
[state] Set the current enabled state to true or false
virtual void nvidia::apex::EffectPackageActor::setPose | ( | const PxTransform & | pose | ) | [pure virtual] |
Sets the root pose for this EffectPackageActor It's important to note that child-relative poses for each sub-component in an EffectPackageActor are authored in the ParticleEffectTool.
- Parameters:
-
[pose] : Sets the current root pose for this EffectPackageActor
The documentation for this class was generated from the following file:
Generated on Fri Dec 15 2017 13:58:40
Copyright © 2012-2017 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved.