APIdia Launch Partner
Top Description Inners Fields Constructors Methods
com.badlogic.gdx.graphics.g3d.particles.influencers

public abstract Class RegionInfluencer

extends Influencer
Class Inheritance
Known Direct Subclasses
com.badlogic.gdx.graphics.g3d.particles.influencers.RegionInfluencer.Single, com.badlogic.gdx.graphics.g3d.particles.influencers.RegionInfluencer.Random, com.badlogic.gdx.graphics.g3d.particles.influencers.RegionInfluencer.Animated
Imports
com.badlogic.gdx.assets.AssetManager, com.badlogic.gdx.graphics.Texture, com.badlogic.gdx.graphics.g2d.TextureAtlas, .TextureRegion, com.badlogic.gdx.graphics.g3d.particles.ParallelArray.FloatChannel, .ParticleChannels, .ResourceData, .ResourceData.SaveData, com.badlogic.gdx.utils.Array, .Json, .JsonValue

It's an Influencer which assigns a region of a Texture to the particles.
Author
Inferno

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
RegionInfluencer.Animated

Assigns a region to the particles using the particle life percent to calculate the current index in the RegionInfluencer#regions array.

public static class
RegionInfluencer.AspectTextureRegion

It's a class used internally by the RegionInfluencer to represent a texture region.

public static class
RegionInfluencer.Random

Assigns a random region of RegionInfluencer#regions to the particles.

public static class
RegionInfluencer.Single

Assigns the first region of RegionInfluencer#regions to the particles.

Field Summary

Modifier and TypeField and Description
private static final String
public String
pack-priv ParallelArray.FloatChannel
public Array<RegionInfluencer.AspectTextureRegion>

Constructor Summary

AccessConstructor and Description
public
RegionInfluencer(int regionsCount)

public
public
RegionInfluencer(TextureRegion... regions)

All the regions must be defined on the same Texture

public
public

Method Summary

Modifier and TypeMethod and Description
public void
add(TextureRegion... regions)

public void
allocateChannels()

Overrides com.badlogic.gdx.graphics.g3d.particles.ParticleControllerComponent.allocateChannels.

Called during initialization to allocate additional particles channels

public void
public void
public void
public void
public void
setAtlasName(String atlasName)

public void

Field Detail

ASSET_DATAback to summary
private static final String ASSET_DATA
atlasNameback to summary
public String atlasName
regionChannelback to summary
pack-priv ParallelArray.FloatChannel regionChannel
regionsback to summary
public Array<RegionInfluencer.AspectTextureRegion> regions

Constructor Detail

RegionInfluencerback to summary
public RegionInfluencer(int regionsCount)
RegionInfluencerback to summary
public RegionInfluencer()
RegionInfluencerback to summary
public RegionInfluencer(TextureRegion... regions)

All the regions must be defined on the same Texture

RegionInfluencerback to summary
public RegionInfluencer(Texture texture)
RegionInfluencerback to summary
public RegionInfluencer(RegionInfluencer regionInfluencer)

Method Detail

addback to summary
public void add(TextureRegion... regions)
allocateChannelsback to summary
public void allocateChannels()

Overrides com.badlogic.gdx.graphics.g3d.particles.ParticleControllerComponent.allocateChannels.

Doc from com.badlogic.gdx.graphics.g3d.particles.ParticleControllerComponent.allocateChannels.

Called during initialization to allocate additional particles channels

Annotations
@Override
clearback to summary
public void clear()
loadback to summary
public void load(AssetManager manager, ResourceData<T> resources)

Overrides com.badlogic.gdx.graphics.g3d.particles.ParticleControllerComponent.load.

Implements com.badlogic.gdx.graphics.g3d.particles.ResourceData.Configurable.load.

Annotations
@Override
readback to summary
public void read(Json json, JsonValue jsonData)

Overrides com.badlogic.gdx.graphics.g3d.particles.ParticleControllerComponent.read.

Implements com.badlogic.gdx.utils.Json.Serializable.read.

Annotations
@Override
saveback to summary
public void save(AssetManager manager, ResourceData<T> resources)

Overrides com.badlogic.gdx.graphics.g3d.particles.ParticleControllerComponent.save.

Implements com.badlogic.gdx.graphics.g3d.particles.ResourceData.Configurable.save.

Annotations
@Override
setAtlasNameback to summary
public void setAtlasName(String atlasName)
writeback to summary
public void write(Json json)

Overrides com.badlogic.gdx.graphics.g3d.particles.ParticleControllerComponent.write.

Implements com.badlogic.gdx.utils.Json.Serializable.write.

Annotations
@Override
com.badlogic.gdx.graphics.g3d.particles.influencers back to summary

public Class RegionInfluencer.Animated

extends RegionInfluencer
Class Inheritance

Assigns a region to the particles using the particle life percent to calculate the current index in the RegionInfluencer#regions array.

Field Summary

Modifier and TypeField and Description
pack-priv ParallelArray.FloatChannel
Inherited from com.badlogic.gdx.graphics.g3d.particles.influencers.RegionInfluencer:
atlasNameregionChannelregions

Constructor Summary

AccessConstructor and Description
public
public
public
Animated(TextureRegion textureRegion)

public
Animated(Texture texture)

Method Summary

Modifier and TypeMethod and Description
public void
allocateChannels()

Overrides com.badlogic.gdx.graphics.g3d.particles.influencers.RegionInfluencer.allocateChannels.

Called during initialization to allocate additional particles channels

public RegionInfluencer.Animated
public void
update()

Overrides com.badlogic.gdx.graphics.g3d.particles.ParticleControllerComponent.update.

Called to execute the component behavior.

Inherited from com.badlogic.gdx.graphics.g3d.particles.influencers.RegionInfluencer:
addclearloadreadsavesetAtlasNamewrite

Field Detail

lifeChannelback to summary
pack-priv ParallelArray.FloatChannel lifeChannel

Constructor Detail

Animatedback to summary
public Animated()
Animatedback to summary
public Animated(RegionInfluencer.Animated regionInfluencer)
Animatedback to summary
public Animated(TextureRegion textureRegion)
Animatedback to summary
public Animated(Texture texture)

Method Detail

allocateChannelsback to summary
public void allocateChannels()

Overrides com.badlogic.gdx.graphics.g3d.particles.influencers.RegionInfluencer.allocateChannels.

Doc from com.badlogic.gdx.graphics.g3d.particles.ParticleControllerComponent.allocateChannels.

Called during initialization to allocate additional particles channels

Annotations
@Override
copyback to summary
public RegionInfluencer.Animated copy()

Implements abstract com.badlogic.gdx.graphics.g3d.particles.ParticleControllerComponent.copy.

Annotations
@Override
updateback to summary
public void update()

Overrides com.badlogic.gdx.graphics.g3d.particles.ParticleControllerComponent.update.

Doc from com.badlogic.gdx.graphics.g3d.particles.ParticleControllerComponent.update.

Called to execute the component behavior.

Annotations
@Override
com.badlogic.gdx.graphics.g3d.particles.influencers back to summary

public Class RegionInfluencer.AspectTextureRegion

extends Object
Class Inheritance
  • java.lang.Object
  • com.badlogic.gdx.graphics.g3d.particles.influencers.RegionInfluencer.AspectTextureRegion

It's a class used internally by the RegionInfluencer to represent a texture region. It contains the uv coordinates of the region and the region inverse aspect ratio.

Field Summary

Modifier and TypeField and Description
public float
public String
public float
u

public float
public float
v

public float

Constructor Summary

AccessConstructor and Description
public
public
public

Method Summary

Modifier and TypeMethod and Description
public void
public void
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

halfInvAspectRatioback to summary
public float halfInvAspectRatio
imageNameback to summary
public String imageName
uback to summary
public float u
u2back to summary
public float u2
vback to summary
public float v
v2back to summary
public float v2

Constructor Detail

AspectTextureRegionback to summary
public AspectTextureRegion()
AspectTextureRegionback to summary
public AspectTextureRegion(RegionInfluencer.AspectTextureRegion aspectTextureRegion)
AspectTextureRegionback to summary
public AspectTextureRegion(TextureRegion region)

Method Detail

setback to summary
public void set(TextureRegion region)
setback to summary
public void set(RegionInfluencer.AspectTextureRegion aspectTextureRegion)
updateUVback to summary
public void updateUV(TextureAtlas atlas)
com.badlogic.gdx.graphics.g3d.particles.influencers back to summary

public Class RegionInfluencer.Random

extends RegionInfluencer
Class Inheritance

Assigns a random region of RegionInfluencer#regions to the particles.

Field Summary

Inherited from com.badlogic.gdx.graphics.g3d.particles.influencers.RegionInfluencer:
atlasNameregionChannelregions

Constructor Summary

AccessConstructor and Description
public
public
Random(RegionInfluencer.Random regionInfluencer)

public
Random(TextureRegion textureRegion)

public
Random(Texture texture)

Method Summary

Modifier and TypeMethod and Description
public void
activateParticles(int startIndex, int count)

Overrides com.badlogic.gdx.graphics.g3d.particles.ParticleControllerComponent.activateParticles.

Called to initialize new emitted particles.

public RegionInfluencer.Random
Inherited from com.badlogic.gdx.graphics.g3d.particles.influencers.RegionInfluencer:
addallocateChannelsclearloadreadsavesetAtlasNamewrite

Constructor Detail

Randomback to summary
public Random()
Randomback to summary
public Random(RegionInfluencer.Random regionInfluencer)
Randomback to summary
public Random(TextureRegion textureRegion)
Randomback to summary
public Random(Texture texture)

Method Detail

activateParticlesback to summary
public void activateParticles(int startIndex, int count)

Overrides com.badlogic.gdx.graphics.g3d.particles.ParticleControllerComponent.activateParticles.

Doc from com.badlogic.gdx.graphics.g3d.particles.ParticleControllerComponent.activateParticles.

Called to initialize new emitted particles.

Annotations
@Override
copyback to summary
public RegionInfluencer.Random copy()

Implements abstract com.badlogic.gdx.graphics.g3d.particles.ParticleControllerComponent.copy.

Annotations
@Override
com.badlogic.gdx.graphics.g3d.particles.influencers back to summary

public Class RegionInfluencer.Single

extends RegionInfluencer
Class Inheritance

Assigns the first region of RegionInfluencer#regions to the particles.

Field Summary

Inherited from com.badlogic.gdx.graphics.g3d.particles.influencers.RegionInfluencer:
atlasNameregionChannelregions

Constructor Summary

AccessConstructor and Description
public
public
Single(RegionInfluencer.Single regionInfluencer)

public
Single(TextureRegion textureRegion)

public
Single(Texture texture)

Method Summary

Modifier and TypeMethod and Description
public RegionInfluencer.Single
public void
Inherited from com.badlogic.gdx.graphics.g3d.particles.influencers.RegionInfluencer:
addallocateChannelsclearloadreadsavesetAtlasNamewrite

Constructor Detail

Singleback to summary
public Single()
Singleback to summary
public Single(RegionInfluencer.Single regionInfluencer)
Singleback to summary
public Single(TextureRegion textureRegion)
Singleback to summary
public Single(Texture texture)

Method Detail

copyback to summary
public RegionInfluencer.Single copy()

Implements abstract com.badlogic.gdx.graphics.g3d.particles.ParticleControllerComponent.copy.

Annotations
@Override
initback to summary
public void init()

Overrides com.badlogic.gdx.graphics.g3d.particles.ParticleControllerComponent.init.

Doc from com.badlogic.gdx.graphics.g3d.particles.ParticleControllerComponent.init.

Called once during intialization

Annotations
@Override