Build System Changes

-=-=-=-=-=-=-=-=-=-=

Build System:
-Big clean up of SCons, changed how builds are done to a much cleaner method (check the Github Wiki for instructions).
-Deactivated BlackBerry10 (sorry), if no mantainer found (or BlackBerry does not send us a Passort ;), platform will be removed as we have no longer devices to test.

Engine:
-Removed deprecated object and scene format (was in there just for compatibility, not in use since a long time).
-Added ability to open scenes even if a node type was removed (will try to guess the closest type).
-Removed deprecated node types.
This commit is contained in:
Juan Linietsky
2014-10-07 01:31:49 -03:00
parent a0ae38e0c1
commit 0fa94a9690
72 changed files with 892 additions and 10494 deletions

View File

@ -821,6 +821,59 @@ public:
};
_FORCE_INLINE_ static int get_uv84_normal_bit(const Vector3& p_vector) {
int lat = Math::fast_ftoi(Math::floor(Math::acos(p_vector.dot(Vector3(0,1,0)))*4.0/Math_PI+0.5));
if (lat==0) {
return 24;
} else if (lat==4) {
return 25;
}
int lon = Math::fast_ftoi(Math::floor( (Math_PI+Math::atan2(p_vector.x,p_vector.z))*8.0/(Math_PI*2.0) + 0.5))%8;
return lon+(lat-1)*8;
}
_FORCE_INLINE_ static int get_uv84_normal_bit_neighbors(int p_idx) {
if (p_idx==24) {
return 1|2|4|8;
} else if (p_idx==25) {
return (1<<23)|(1<<22)|(1<<21)|(1<<20);
} else {
int ret = 0;
if ((p_idx%8) == 0)
ret|=(1<<(p_idx+7));
else
ret|=(1<<(p_idx-1));
if ((p_idx%8) == 7)
ret|=(1<<(p_idx-7));
else
ret|=(1<<(p_idx+1));
int mask = ret|(1<<p_idx);
if (p_idx<8)
ret|=24;
else
ret|=mask>>8;
if (p_idx>=16)
ret|=25;
else
ret|=mask<<8;
return ret;
}
}
static MeshData build_convex_mesh(const DVector<Plane> &p_planes);
static DVector<Plane> build_sphere_planes(float p_radius, int p_lats, int p_lons, Vector3::Axis p_axis=Vector3::AXIS_Z);
static DVector<Plane> build_box_planes(const Vector3& p_extents);