Class ParticleBase
- Namespace
- Vintagestory.API.Common
- Assembly
- VintagestoryAPI.dll
Represents a particle that has been spawned
public abstract class ParticleBase
- Inheritance
-
ParticleBase
- Inherited Members
- Extension Methods
Fields
Alive
public bool Alive
Field Value
Bounciness
public float Bounciness
Field Value
ColorAlpha
public byte ColorAlpha
Field Value
ColorBlue
public byte ColorBlue
Field Value
ColorGreen
public byte ColorGreen
Field Value
ColorRed
public byte ColorRed
Field Value
LifeLength
public float LifeLength
Field Value
Next
public ParticleBase Next
Field Value
Position
public Vec3d Position
Field Value
Prev
public ParticleBase Prev
Field Value
SecondsAlive
public float SecondsAlive
Field Value
Velocity
public Vec3f Velocity
Field Value
VertexFlags
public int VertexFlags
Field Value
accum
public float accum
Field Value
flags
protected EnumCollideFlags flags
Field Value
lightrgbs
public int lightrgbs
Field Value
motion
protected Vec3f motion
Field Value
prevPosAdvance
public float prevPosAdvance
Field Value
prevPosDeltaX
public float prevPosDeltaX
Field Value
prevPosDeltaY
public float prevPosDeltaY
Field Value
prevPosDeltaZ
public float prevPosDeltaZ
Field Value
rnddrag
protected float rnddrag
Field Value
tdragnow
protected float tdragnow
Field Value
tickCount
protected byte tickCount
Field Value
Methods
TickFixedStep(float, ICoreClientAPI, ParticlePhysics)
Advances the physics simulation of the particle if "physicsSim.PhysicsTickTime" seconds have passed by, otherwise it will only advance PrevPosition by the particles velocity.
public virtual void TickFixedStep(float dt, ICoreClientAPI api, ParticlePhysics physicsSim)
Parameters
dt
floatWill never be above PhysicsTickTime
api
ICoreClientAPIphysicsSim
ParticlePhysics
TickNow(float, float, ICoreClientAPI, ParticlePhysics)
public abstract void TickNow(float dt, float physicsdt, ICoreClientAPI api, ParticlePhysics physicsSim)
Parameters
dt
floatphysicsdt
floatapi
ICoreClientAPIphysicsSim
ParticlePhysics
UpdateBuffers(MeshData, Vec3d, ref int, ref int, ref int)
public abstract void UpdateBuffers(MeshData buffer, Vec3d cameraPos, ref int posPosition, ref int rgbaPosition, ref int flagPosition)
Parameters
updatePositionWithCollision(float, ICoreClientAPI, ParticlePhysics, float)
protected void updatePositionWithCollision(float pdt, ICoreClientAPI api, ParticlePhysics physicsSim, float height)
Parameters
pdt
floatapi
ICoreClientAPIphysicsSim
ParticlePhysicsheight
float