Class ParticleGraphicsAdapterImpl
Inheritance
ParticleGraphicsAdapterImpl
Assembly: .dll
Syntax
public class ParticleGraphicsAdapterImpl : IParticleGraphicsAdapter
Constructors
ParticleGraphicsAdapterImpl(IParticleState, RendererParticles)
Declaration
public ParticleGraphicsAdapterImpl(IParticleState particle, RendererParticles renderer)
Parameters
Fields
defColor
Declaration
private static Color defColor
Field Value
graphics_color
Declaration
public Color graphics_color
Field Value
graphics_colorRenderer
Declaration
public RendererParticles_RenderBatch graphics_colorRenderer
Field Value
graphics_globalID
Declaration
public int graphics_globalID
Field Value
graphics_isRegistered
Declaration
public bool graphics_isRegistered
Field Value
graphics_listID
Declaration
public int graphics_listID
Field Value
graphics_listNumber
Declaration
public int graphics_listNumber
Field Value
particle
Declaration
public IParticleState particle
Field Value
renderer
Declaration
private RendererParticles renderer
Field Value
state_cur
Declaration
public ParticleGraphicsAdapterImpl.PositionSnap state_cur
Field Value
state_prev
Declaration
public ParticleGraphicsAdapterImpl.PositionSnap state_prev
Field Value
Methods
AddParticle(ParticleMovementState)
Adds the particle to the renderer. Only needs to be called once to register a particle.
Declaration
public void AddParticle(ParticleMovementState movementState)
Parameters
Type |
Name |
Description |
ParticleMovementState |
movementState |
The current movement state of the new particle.
|
BondUpdate(ParticleBondGraphicState)
Declaration
public void BondUpdate(ParticleBondGraphicState bondState)
Parameters
CircuitUpdate(ParticlePinGraphicState)
Pushes an update for the pin configuration of the particle and
the immediate connections to neighboring particles.
Declaration
public void CircuitUpdate(ParticlePinGraphicState state)
Parameters
Type |
Name |
Description |
ParticlePinGraphicState |
state |
Data about the current state of the
particle's pin configuration and neighbor connections.
|
ClearParticleColor()
Call this when you want to remove the particle color.
It goes back to default afterwards. This only needs to
be called when the color which has been set manually
should be removed.
Declaration
public void ClearParticleColor()
HideParticle()
Complements ShowParticle(). Hides the particle.
Call this if you want to hide the particle.
Declaration
public void HideParticle()
RemoveParticle()
Removes a particle from the renderer. Only needs to be called once
when the particle is removed from the system.
Declaration
public void RemoveParticle()
SetParticleColor(Color)
Call this when you want to update the particle color.
This only needs to be called when the color which has
automatically been set when the particle was added to the
rendering system should be changed in some way.
Declaration
public void SetParticleColor(Color color)
Parameters
Type |
Name |
Description |
Color |
color |
The new color of the particle.
|
ShowParticle()
Complements HideParticle(). Shows the particle.
Calling this method is not necessary if the particle is never
hidden. By default the particle is visible once it is added
and updated.
Declaration
public void ShowParticle()
Update(ParticleMovementState)
Updates the particle graphics. This is applied and
shown directly in the next render cycle. Call it once
per round, even if the particle has not moved.
Example: A particle has expanded. Call
Update(ParticleMovementState) to update the visuals.
Declaration
public void Update(ParticleMovementState movementState)
Parameters
Update(bool, ParticleJointMovementState, bool)
Declaration
private void Update(bool forceRenderUpdate, ParticleJointMovementState jointMovementState, bool noAnimation)
Parameters
Update(bool, ParticleMovementState, bool)
Declaration
private void Update(bool forceRenderUpdate, ParticleMovementState movementState, bool noAnimation)
Parameters
UpdateReset()
Like Update(ParticleMovementState), but forces
the update to be applied visually without an animation, even
if the particle positions are the same as in the previous frame.
Declaration
public void UpdateReset()
UpdateReset(ParticleMovementState)
Like Update(ParticleMovementState), but forces
the update to be applied visually without an animation, even
if the particle positions are the same as in the previous frame.
Declaration
public void UpdateReset(ParticleMovementState movementState)
Parameters
Implements