Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.amcgala.framework.shape.util;
 
Partikel Element fuer den ParticleEmitter. TODO: Es sollte hier moeglich sein auch verschiedene Objekte als Particle zu nutzen !

Author(s):
Steffen Troester
public class Particle extends AbstractShape implements Updatable {
    private double particleSpeed;
    private int life = 100;
    private Vector3d direction;
    private Point2d point2d;

    
Particle Constructor initialisiert vom ParticleEmitter

Parameters:
particleSpeed
direction
x
y
    public Particle(double particleSpeedfinal Vector3d directiondouble x,
                    double y) {
        this. = particleSpeed;
        this. = direction.normalize();
        this. = new Point2d(xy);
        Vector3d v = this..copy();
        v.times(particleSpeed);
    }
    @Override
    public void update() {
        super.update();
        . += .;
        . += .;
        --;
    }
    @Override
    public void render(Renderer renderer) {
        .render(renderer);
    }
    public Vector3d getDirection() {
        return ;
    }
    public void setDirection(Vector3d direction) {
        this. = direction;
    }
    public double getParticleSpeed() {
        return ;
    }
    public void setParticleSpeed(double particleSpeed) {
        this. = particleSpeed;
    }
    public double getX() {
        return .;
    }
    public double getY() {
        return .;
    }
    public int getLife() {
        return ;
    }
New to GrepCode? Check out our FAQ X