Table of Contents

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

bool

Bounciness

public float Bounciness

Field Value

float

ColorAlpha

public byte ColorAlpha

Field Value

byte

ColorBlue

public byte ColorBlue

Field Value

byte

ColorGreen

public byte ColorGreen

Field Value

byte

ColorRed

public byte ColorRed

Field Value

byte

LifeLength

public float LifeLength

Field Value

float

Next

public ParticleBase Next

Field Value

ParticleBase

Position

public Vec3d Position

Field Value

Vec3d

Prev

public ParticleBase Prev

Field Value

ParticleBase

SecondsAlive

public float SecondsAlive

Field Value

float

Velocity

public Vec3f Velocity

Field Value

Vec3f

VertexFlags

public int VertexFlags

Field Value

int

accum

public float accum

Field Value

float

flags

protected EnumCollideFlags flags

Field Value

EnumCollideFlags

lightrgbs

public int lightrgbs

Field Value

int

motion

protected Vec3f motion

Field Value

Vec3f

prevPosAdvance

public float prevPosAdvance

Field Value

float

prevPosDeltaX

public float prevPosDeltaX

Field Value

float

prevPosDeltaY

public float prevPosDeltaY

Field Value

float

prevPosDeltaZ

public float prevPosDeltaZ

Field Value

float

rnddrag

protected float rnddrag

Field Value

float

tdragnow

protected float tdragnow

Field Value

float

tickCount

protected byte tickCount

Field Value

byte

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 float

Will never be above PhysicsTickTime

api ICoreClientAPI
physicsSim ParticlePhysics

TickNow(float, float, ICoreClientAPI, ParticlePhysics)

public abstract void TickNow(float dt, float physicsdt, ICoreClientAPI api, ParticlePhysics physicsSim)

Parameters

dt float
physicsdt float
api ICoreClientAPI
physicsSim 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

buffer MeshData
cameraPos Vec3d
posPosition int
rgbaPosition int
flagPosition int

updatePositionWithCollision(float, ICoreClientAPI, ParticlePhysics, float)

protected void updatePositionWithCollision(float pdt, ICoreClientAPI api, ParticlePhysics physicsSim, float height)

Parameters

pdt float
api ICoreClientAPI
physicsSim ParticlePhysics
height float