Commit 23702a60 authored by frankie's avatar frankie 💬

defining M_PI for windows

parent 9f198928
......@@ -52,6 +52,11 @@
#include "futari_gizmo_modifiers.h"
#if defined(__WIN32__) || defined(WIN32) || defined(_WIN32)
// M_PI is not defined on windows... see <math.h> in linux
# define M_PI 3.14159265358979323846 /* pi */
#endif
// +++++++++++++++ MODIFIER +++++++++++++++
FutariModifierGizmoPlugin::FutariModifierGizmoPlugin() {
......@@ -403,7 +408,7 @@ void FutariVortexGizmoPlugin::redraw(EditorSpatialGizmo *p_gizmo) {
FutariVortex *vortex = Object::cast_to<FutariVortex>(p_gizmo->get_spatial_node());
p_gizmo->clear();
Ref<Material> material;
if (vortex->get_enabled()) {
material = get_material(FUTARI_VORTEX_MATERIAL, p_gizmo);
......@@ -502,21 +507,21 @@ void FutariFloorGizmoPlugin::redraw(EditorSpatialGizmo *p_gizmo) {
Vector<Vector3> lines;
real_t w = floor->get_width() * 0.5;
real_t h = floor->get_height() * 0.5;
for ( int i = 0; i < 2; ++i ) {
Vector3 offset(0,0,0);
if ( i == 1 ) {
for (int i = 0; i < 2; ++i) {
Vector3 offset(0, 0, 0);
if (i == 1) {
offset.y = floor->get_range();
}
lines.push_back( Vector3( -w,0,-h ) + offset );
lines.push_back( Vector3( w,0,-h ) + offset );
lines.push_back( Vector3( w,0,-h ) + offset );
lines.push_back( Vector3( w,0,h ) + offset );
lines.push_back( Vector3( w,0,h ) + offset );
lines.push_back( Vector3( -w,0,h ) + offset );
lines.push_back( Vector3( -w,0,h ) + offset );
lines.push_back( Vector3( -w,0,-h ) + offset );
lines.push_back(Vector3(-w, 0, -h) + offset);
lines.push_back(Vector3(w, 0, -h) + offset);
lines.push_back(Vector3(w, 0, -h) + offset);
lines.push_back(Vector3(w, 0, h) + offset);
lines.push_back(Vector3(w, 0, h) + offset);
lines.push_back(Vector3(-w, 0, h) + offset);
lines.push_back(Vector3(-w, 0, h) + offset);
lines.push_back(Vector3(-w, 0, -h) + offset);
}
p_gizmo->add_lines(lines, material);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment