2019-05-31 22:54:31 +02:00
|
|
|
#include "voxel_light.h"
|
|
|
|
|
2019-07-19 23:54:56 +02:00
|
|
|
int VoxelLight::get_world_position_x() const {
|
2019-07-16 16:18:09 +02:00
|
|
|
return _world_position.x;
|
|
|
|
}
|
2019-07-19 23:54:56 +02:00
|
|
|
int VoxelLight::get_world_position_y() const {
|
2019-07-16 16:18:09 +02:00
|
|
|
return _world_position.y;
|
|
|
|
}
|
2019-07-19 23:54:56 +02:00
|
|
|
int VoxelLight::get_world_position_z() const {
|
2019-07-16 16:18:09 +02:00
|
|
|
return _world_position.z;
|
|
|
|
}
|
|
|
|
Vector3i VoxelLight::get_world_position() {
|
|
|
|
return _world_position;
|
|
|
|
|
|
|
|
}
|
2019-07-19 23:54:56 +02:00
|
|
|
void VoxelLight::set_world_position(const int x, const int y, const int z) {
|
2019-07-16 16:18:09 +02:00
|
|
|
_world_position.x = x;
|
|
|
|
_world_position.y = y;
|
|
|
|
_world_position.z = z;
|
|
|
|
}
|
2019-05-31 22:54:31 +02:00
|
|
|
|
2019-07-19 23:54:56 +02:00
|
|
|
Color VoxelLight::get_color() const {
|
2019-07-16 16:18:09 +02:00
|
|
|
return _color;
|
|
|
|
|
|
|
|
}
|
|
|
|
void VoxelLight::set_color(Color color) {
|
|
|
|
_color = color;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2019-07-19 23:54:56 +02:00
|
|
|
float VoxelLight::get_size() const {
|
2019-07-16 16:18:09 +02:00
|
|
|
return _size;
|
|
|
|
|
|
|
|
}
|
2019-07-19 23:54:56 +02:00
|
|
|
void VoxelLight::set_size(const float size) {
|
2019-07-16 16:18:09 +02:00
|
|
|
_size = size;
|
|
|
|
}
|
|
|
|
|
|
|
|
VoxelLight::VoxelLight() {
|
|
|
|
_size = 0;
|
2019-05-31 22:54:31 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
VoxelLight::~VoxelLight() {
|
|
|
|
}
|
2019-07-16 16:18:09 +02:00
|
|
|
|
|
|
|
void VoxelLight::_bind_methods() {
|
|
|
|
ClassDB::bind_method(D_METHOD("get_world_position_x"), &VoxelLight::get_world_position_x);
|
|
|
|
ClassDB::bind_method(D_METHOD("get_world_position_y"), &VoxelLight::get_world_position_y);
|
|
|
|
ClassDB::bind_method(D_METHOD("get_world_position_z"), &VoxelLight::get_world_position_z);
|
|
|
|
ClassDB::bind_method(D_METHOD("set_world_position", "x", "y", "z"), &VoxelLight::set_world_position);
|
|
|
|
|
|
|
|
ClassDB::bind_method(D_METHOD("get_color"), &VoxelLight::get_color);
|
|
|
|
ClassDB::bind_method(D_METHOD("set_color"), &VoxelLight::set_color);
|
|
|
|
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "color"), "set_color", "get_color");
|
|
|
|
|
|
|
|
ClassDB::bind_method(D_METHOD("get_size"), &VoxelLight::get_size);
|
|
|
|
ClassDB::bind_method(D_METHOD("set_size"), &VoxelLight::set_size);
|
|
|
|
ADD_PROPERTY(PropertyInfo(Variant::INT, "size"), "set_size", "get_size");
|
|
|
|
}
|