-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSphere.cpp
More file actions
35 lines (29 loc) · 719 Bytes
/
Copy pathSphere.cpp
File metadata and controls
35 lines (29 loc) · 719 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
//
// Created by rcabido on 25/10/19.
//
#include "Sphere.h"
#include <GL/glut.h>
//// MÉTODOS CLASE SPHERE ////
//* Constructores *//
Sphere::Sphere() : GameObject() {
this->radius = 0.0;
this->slices = 0;
this->stacks = 0;
}
Sphere::Sphere(const Vector3D& position, const Color& color, const Vector3D& speed, const Vector3D& orientation,
float radius, int slices, int stacks)
: GameObject(position, color, speed, orientation, Vector3D(), true) {
this->radius = radius;
this->slices = slices;
this->stacks = stacks;
}
//* Getters *//
float Sphere::getRadius() const {
return this->radius;
}
int Sphere::getSlices() const {
return this->slices;
}
int Sphere::getStacks() const {
return this->stacks;
}