The compiler says…
the class “Circle” does not exist
…but it does.
Code:
Circle circle = new Circle(10,color(0),color(255,0,0),0,new PVector(400,400),new PVector(0,0),new PVector(0,0));
class Circle{
float diameter;
color colorStroke;
color colorFill;
float thickness;
PVector position;
PVector velocity;
PVector acceleration;
Circle(float d,color cs,color cf,float t,PVector p,PVector v,PVector a){
diameter = d;
colorStroke = cs;
colorFill = cf;
thickness = t;
position = p;
velocity = v;
acceleration = a;
}
void update(){
velocity.add(acceleration);
position.add(velocity);
if(thickness == 0){
noStroke();
}else{
strokeWeight(thickness);
}
stroke(colorStroke);
fill(colorFill);
ellipse(position.x - (diameter / 2),position.y - (diameter / 2),position.x + (diameter / 2),position.y + (diameter / 2));
}
}