@Override public void activateParticles (int startIndex, int count) { super.activateParticles(startIndex, count); float start, diff; for (int i = startIndex * angularChannel.strideSize, c = i + count * angularChannel.strideSize; i < c; i += angularChannel.strideSize) { // Theta start = thetaValue.newLowValue(); diff = thetaValue.newHighValue(); if (!thetaValue.isRelative()) diff -= start; angularChannel.data[i + ParticleChannels.VelocityThetaStartOffset] = start; angularChannel.data[i + ParticleChannels.VelocityThetaDiffOffset] = diff; // Phi start = phiValue.newLowValue(); diff = phiValue.newHighValue(); if (!phiValue.isRelative()) diff -= start; angularChannel.data[i + ParticleChannels.VelocityPhiStartOffset] = start; angularChannel.data[i + ParticleChannels.VelocityPhiDiffOffset] = diff; } }
@Override public void allocateChannels () { super.allocateChannels(); accelerationChannel = controller.particles.addChannel(ParticleChannels.Acceleration); positionChannel = controller.particles.addChannel(ParticleChannels.Position); }
@Override public void read (Json json, JsonValue jsonData) { super.read(json, jsonData); thetaValue = json.readValue("thetaValue", ScaledNumericValue.class, jsonData); phiValue = json.readValue("phiValue", ScaledNumericValue.class, jsonData); } }
@Override public void write (Json json) { super.write(json); json.writeValue("thetaValue", thetaValue); json.writeValue("phiValue", phiValue); }
@Override public void allocateChannels () { super.allocateChannels(); ParticleChannels.Interpolation4.id = controller.particleChannels.newId(); angularChannel = controller.particles.addChannel(ParticleChannels.Interpolation4); }
@Override public void allocateChannels () { super.allocateChannels(); accelerationChannel = controller.particles.addChannel(ParticleChannels.Acceleration); }
@Override public void allocateChannels () { super.allocateChannels(); rotationalVelocity2dChannel = controller.particles.addChannel(ParticleChannels.AngularVelocity2D); }
@Override public void activateParticles (int startIndex, int count) { super.activateParticles(startIndex, count); float start, diff; for (int i = startIndex * angularChannel.strideSize, c = i + count * angularChannel.strideSize; i < c; i += angularChannel.strideSize) { // Theta start = thetaValue.newLowValue(); diff = thetaValue.newHighValue(); if (!thetaValue.isRelative()) diff -= start; angularChannel.data[i + ParticleChannels.VelocityThetaStartOffset] = start; angularChannel.data[i + ParticleChannels.VelocityThetaDiffOffset] = diff; // Phi start = phiValue.newLowValue(); diff = phiValue.newHighValue(); if (!phiValue.isRelative()) diff -= start; angularChannel.data[i + ParticleChannels.VelocityPhiStartOffset] = start; angularChannel.data[i + ParticleChannels.VelocityPhiDiffOffset] = diff; } }
@Override public void activateParticles (int startIndex, int count) { super.activateParticles(startIndex, count); float start, diff; for (int i = startIndex * angularChannel.strideSize, c = i + count * angularChannel.strideSize; i < c; i += angularChannel.strideSize) { // Theta start = thetaValue.newLowValue(); diff = thetaValue.newHighValue(); if (!thetaValue.isRelative()) diff -= start; angularChannel.data[i + ParticleChannels.VelocityThetaStartOffset] = start; angularChannel.data[i + ParticleChannels.VelocityThetaDiffOffset] = diff; // Phi start = phiValue.newLowValue(); diff = phiValue.newHighValue(); if (!phiValue.isRelative()) diff -= start; angularChannel.data[i + ParticleChannels.VelocityPhiStartOffset] = start; angularChannel.data[i + ParticleChannels.VelocityPhiDiffOffset] = diff; } }
@Override public void allocateChannels () { super.allocateChannels(); accelerationChannel = controller.particles.addChannel(ParticleChannels.Acceleration); positionChannel = controller.particles.addChannel(ParticleChannels.Position); }
@Override public void allocateChannels () { super.allocateChannels(); rotationalVelocity2dChannel = controller.particles.addChannel(ParticleChannels.AngularVelocity2D); }
@Override public void allocateChannels () { super.allocateChannels(); ParticleChannels.Interpolation4.id = controller.particleChannels.newId(); angularChannel = controller.particles.addChannel(ParticleChannels.Interpolation4); }
@Override public void allocateChannels () { super.allocateChannels(); accelerationChannel = controller.particles.addChannel(ParticleChannels.Acceleration); positionChannel = controller.particles.addChannel(ParticleChannels.Position); }
@Override public void allocateChannels () { super.allocateChannels(); ParticleChannels.Interpolation4.id = controller.particleChannels.newId(); angularChannel = controller.particles.addChannel(ParticleChannels.Interpolation4); }
@Override public void write (Json json) { super.write(json); json.writeValue("thetaValue", thetaValue); json.writeValue("phiValue", phiValue); }
@Override public void write (Json json) { super.write(json); json.writeValue("thetaValue", thetaValue); json.writeValue("phiValue", phiValue); }
@Override public void read (Json json, JsonValue jsonData) { super.read(json, jsonData); thetaValue = json.readValue("thetaValue", ScaledNumericValue.class, jsonData); phiValue = json.readValue("phiValue", ScaledNumericValue.class, jsonData); } }
@Override public void allocateChannels () { super.allocateChannels(); accelerationChannel = controller.particles.addChannel(ParticleChannels.Acceleration); }
@Override public void allocateChannels () { super.allocateChannels(); accelerationChannel = controller.particles.addChannel(ParticleChannels.Acceleration); }
@Override public void allocateChannels () { super.allocateChannels(); rotationalVelocity2dChannel = controller.particles.addChannel(ParticleChannels.AngularVelocity2D); }