Build fixes for android
This commit is contained in:
@@ -620,24 +620,24 @@ public:
|
||||
bool IsPointVisible(const Vec3& p) const;
|
||||
|
||||
//sphere-frustum test
|
||||
bool IsSphereVisible_F(const Sphere& s) const;
|
||||
uint8 IsSphereVisible_FH(const Sphere& s) const; //this is going to be the exact version of sphere-culling
|
||||
bool IsSphereVisible_F(const ::Sphere& s) const;
|
||||
uint8 IsSphereVisible_FH(const ::Sphere& s) const; //this is going to be the exact version of sphere-culling
|
||||
|
||||
// AABB-frustum test
|
||||
// Fast
|
||||
bool IsAABBVisible_F(const AABB& aabb) const;
|
||||
uint8 IsAABBVisible_FH(const AABB& aabb, bool* pAllInside) const;
|
||||
uint8 IsAABBVisible_FH(const AABB& aabb) const;
|
||||
bool IsAABBVisible_F(const ::AABB& aabb) const;
|
||||
uint8 IsAABBVisible_FH(const ::AABB& aabb, bool* pAllInside) const;
|
||||
uint8 IsAABBVisible_FH(const ::AABB& aabb) const;
|
||||
|
||||
// Exact
|
||||
bool IsAABBVisible_E(const AABB& aabb) const;
|
||||
uint8 IsAABBVisible_EH(const AABB& aabb, bool* pAllInside) const;
|
||||
uint8 IsAABBVisible_EH(const AABB& aabb) const;
|
||||
bool IsAABBVisible_E(const ::AABB& aabb) const;
|
||||
uint8 IsAABBVisible_EH(const ::AABB& aabb, bool* pAllInside) const;
|
||||
uint8 IsAABBVisible_EH(const ::AABB& aabb) const;
|
||||
|
||||
// Multi-camera
|
||||
bool IsAABBVisible_EHM(const AABB& aabb, bool* pAllInside) const;
|
||||
bool IsAABBVisible_EM(const AABB& aabb) const;
|
||||
bool IsAABBVisible_FM(const AABB& aabb) const;
|
||||
bool IsAABBVisible_EHM(const ::AABB& aabb, bool* pAllInside) const;
|
||||
bool IsAABBVisible_EM(const ::AABB& aabb) const;
|
||||
bool IsAABBVisible_FM(const ::AABB& aabb) const;
|
||||
|
||||
//OBB-frustum test
|
||||
bool IsOBBVisible_F(const Vec3& wpos, const OBB& obb) const;
|
||||
|
||||
@@ -794,7 +794,7 @@ struct HWVSphere
|
||||
radius = r;
|
||||
}
|
||||
|
||||
ILINE HWVSphere(const Sphere& sp)
|
||||
ILINE HWVSphere(const ::Sphere& sp)
|
||||
{
|
||||
center = HWVLoadVecUnaligned(&sp.center);
|
||||
radius = SIMDFLoadFloat(sp.radius);
|
||||
|
||||
@@ -1179,7 +1179,7 @@ namespace Distance {
|
||||
// float result = Distance::Point_TriangleSq( pos, triangle );
|
||||
//----------------------------------------------------------------------------------
|
||||
template<typename F>
|
||||
ILINE F Sphere_TriangleSq(const Sphere& s, const Triangle_tpl<F>& t)
|
||||
ILINE F Sphere_TriangleSq(const ::Sphere& s, const Triangle_tpl<F>& t)
|
||||
{
|
||||
F sqdistance = Distance::Point_TriangleSq(s.center, t) - (s.radius * s.radius);
|
||||
if (sqdistance < 0)
|
||||
@@ -1190,7 +1190,7 @@ namespace Distance {
|
||||
}
|
||||
|
||||
template<typename F>
|
||||
ILINE F Sphere_TriangleSq(const Sphere& s, const Triangle_tpl<F>& t, Vec3_tpl<F>& output)
|
||||
ILINE F Sphere_TriangleSq(const ::Sphere& s, const Triangle_tpl<F>& t, Vec3_tpl<F>& output)
|
||||
{
|
||||
F sqdistance = Distance::Point_TriangleSq(s.center, t, output) - (s.radius * s.radius);
|
||||
if (sqdistance < 0)
|
||||
|
||||
@@ -792,7 +792,7 @@ namespace Intersect {
|
||||
//--- 0x03 = two intersection, lineseg has ENTRY and EXIT point --
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
inline unsigned char Line_Sphere(const Line& line, const Sphere& s, Vec3& i0, Vec3& i1)
|
||||
inline unsigned char Line_Sphere(const Line& line, const ::Sphere& s, Vec3& i0, Vec3& i1)
|
||||
{
|
||||
Vec3 end = line.pointonline + line.direction;
|
||||
|
||||
@@ -830,7 +830,7 @@ namespace Intersect {
|
||||
//--- 0x03 = two intersection, lineseg has ENTRY and EXIT point --
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
inline unsigned char Ray_Sphere(const Ray& ray, const Sphere& s, Vec3& i0, Vec3& i1)
|
||||
inline unsigned char Ray_Sphere(const Ray& ray, const ::Sphere& s, Vec3& i0, Vec3& i1)
|
||||
{
|
||||
Vec3 end = ray.origin + ray.direction;
|
||||
float a = ray.direction | ray.direction;
|
||||
@@ -863,7 +863,7 @@ namespace Intersect {
|
||||
return intersection;
|
||||
}
|
||||
|
||||
inline bool Ray_SphereFirst(const Ray& ray, const Sphere& s, Vec3& intPoint)
|
||||
inline bool Ray_SphereFirst(const Ray& ray, const ::Sphere& s, Vec3& intPoint)
|
||||
{
|
||||
Vec3 p2;
|
||||
unsigned char res = Ray_Sphere(ray, s, intPoint, p2);
|
||||
@@ -886,7 +886,7 @@ namespace Intersect {
|
||||
//--- 0x02 = one intersection, lineseg has just an EXIT point but no ENTRY point (ls.start is inside the sphere) --
|
||||
//--- 0x03 = two intersection, lineseg has ENTRY and EXIT point --
|
||||
//----------------------------------------------------------------------------------
|
||||
inline unsigned char Lineseg_Sphere(const Lineseg& ls, const Sphere& s, Vec3& i0, Vec3& i1)
|
||||
inline unsigned char Lineseg_Sphere(const Lineseg& ls, const ::Sphere& s, Vec3& i0, Vec3& i1)
|
||||
{
|
||||
Vec3 dir = (ls.end - ls.start);
|
||||
|
||||
@@ -931,7 +931,7 @@ namespace Intersect {
|
||||
}
|
||||
|
||||
|
||||
inline bool Lineseg_SphereFirst(const Lineseg& lineseg, const Sphere& s, Vec3& intPoint)
|
||||
inline bool Lineseg_SphereFirst(const Lineseg& lineseg, const ::Sphere& s, Vec3& intPoint)
|
||||
{
|
||||
Vec3 p2;
|
||||
uint8 res = Lineseg_Sphere(lineseg, s, intPoint, p2);
|
||||
|
||||
@@ -103,7 +103,7 @@ namespace Overlap {
|
||||
// Checks if a point is inside a sphere.
|
||||
// Example:
|
||||
// bool result=Overlap::Point_Sphere( point, sphere );
|
||||
ILINE bool Point_Sphere(const Vec3& p, const Sphere& s)
|
||||
ILINE bool Point_Sphere(const Vec3& p, const ::Sphere& s)
|
||||
{
|
||||
Vec3 distc = p - s.center;
|
||||
f32 sqrad = s.radius * s.radius;
|
||||
@@ -407,7 +407,7 @@ namespace Overlap {
|
||||
|
||||
|
||||
//! check if a Lineseg and a Sphere overlap
|
||||
inline bool Lineseg_Sphere(const Lineseg& ls, const Sphere& s)
|
||||
inline bool Lineseg_Sphere(const Lineseg& ls, const ::Sphere& s)
|
||||
{
|
||||
float radius2 = s.radius * s.radius;
|
||||
|
||||
@@ -729,7 +729,7 @@ namespace Overlap {
|
||||
* 0 = no overlap
|
||||
* 1 = overlap
|
||||
*----------------------------------------------------------------------------------*/
|
||||
ILINE bool Sphere_AABB(const Sphere& s, const AABB& aabb)
|
||||
ILINE bool Sphere_AABB(const ::Sphere& s, const AABB& aabb)
|
||||
{
|
||||
Vec3 center(s.center);
|
||||
|
||||
@@ -746,7 +746,7 @@ namespace Overlap {
|
||||
}
|
||||
|
||||
// As Sphere_AABB but ignores z parts
|
||||
ILINE bool Sphere_AABB2D(const Sphere& s, const AABB& aabb)
|
||||
ILINE bool Sphere_AABB2D(const ::Sphere& s, const AABB& aabb)
|
||||
{
|
||||
Vec3 center(s.center);
|
||||
|
||||
@@ -776,7 +776,7 @@ namespace Overlap {
|
||||
* 0x01 = Sphere and AABB overlap
|
||||
* 0x02 = Sphere in inside AABB
|
||||
*/
|
||||
ILINE char Sphere_AABB_Inside(const Sphere& s, const AABB& aabb)
|
||||
ILINE char Sphere_AABB_Inside(const ::Sphere& s, const AABB& aabb)
|
||||
{
|
||||
if (Sphere_AABB(s, aabb))
|
||||
{
|
||||
@@ -819,7 +819,7 @@ namespace Overlap {
|
||||
//--- 0 = no overlap ---------------------------
|
||||
//--- 1 = overlap -----------------
|
||||
//----------------------------------------------------------------------------------
|
||||
inline bool Sphere_OBB(const Sphere& s, const OBB& obb)
|
||||
inline bool Sphere_OBB(const ::Sphere& s, const OBB& obb)
|
||||
{
|
||||
//first we transform the sphere-center into the AABB-space of the OBB
|
||||
Vec3 SphereInOBBSpace = s.center * obb.m33;
|
||||
@@ -861,7 +861,7 @@ namespace Overlap {
|
||||
//--- 0 = no overlap ---------------------------
|
||||
//--- 1 = overlap -----------------
|
||||
//----------------------------------------------------------------------------------
|
||||
inline bool Sphere_Sphere(const Sphere& s1, const Sphere& s2)
|
||||
inline bool Sphere_Sphere(const ::Sphere& s1, const ::Sphere& s2)
|
||||
{
|
||||
Vec3 distc = s1.center - s2.center;
|
||||
f32 sqrad = (s1.radius + s2.radius) * (s1.radius + s2.radius);
|
||||
@@ -884,7 +884,7 @@ namespace Overlap {
|
||||
//--- 1 = overlap -----------------
|
||||
//----------------------------------------------------------------------------------
|
||||
template<typename F>
|
||||
ILINE bool Sphere_Triangle(const Sphere& s, const Triangle_tpl<F>& t)
|
||||
ILINE bool Sphere_Triangle(const ::Sphere& s, const Triangle_tpl<F>& t)
|
||||
{
|
||||
//create a "bouding sphere" around triangle for fast rejection test
|
||||
Vec3_tpl<F> middle = (t.v0 + t.v1 + t.v2) * (1 / 3.0f);
|
||||
@@ -899,7 +899,7 @@ namespace Overlap {
|
||||
SqRad0 = (F)fsel(SqRad0 - SqRad2, SqRad0, SqRad2);
|
||||
|
||||
//first simple rejection-test...
|
||||
if (Sphere_Sphere(s, Sphere(middle, sqrt_tpl(SqRad0))) == 0)
|
||||
if (Sphere_Sphere(s, ::Sphere(middle, sqrt_tpl(SqRad0))) == 0)
|
||||
{
|
||||
return 0; //overlap not possible
|
||||
}
|
||||
|
||||
@@ -19,9 +19,10 @@ namespace AzNetworking
|
||||
static const int32_t FloatHashMinValue = (INT_MIN >> 7);
|
||||
static const int32_t FloatHashMaxValue = (INT_MAX >> 7);
|
||||
|
||||
AZ::HashValue64 HashSerializer::GetHash() const
|
||||
AZ::HashValue32 HashSerializer::GetHash() const
|
||||
{
|
||||
return m_hash;
|
||||
// Just truncate the upper bits
|
||||
return static_cast<AZ::HashValue32>(m_hash);
|
||||
}
|
||||
|
||||
SerializerMode HashSerializer::GetSerializerMode() const
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace AzNetworking
|
||||
|
||||
HashSerializer() = default;
|
||||
|
||||
AZ::HashValue64 GetHash() const;
|
||||
AZ::HashValue32 GetHash() const;
|
||||
|
||||
// ISerializer interfaces
|
||||
SerializerMode GetSerializerMode() const override;
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@
|
||||
|
||||
<RemoteProcedure Name="SendClientInput" InvokeFrom="Autonomous" HandleOn="Authority" IsPublic="true" IsReliable="false" Description="Client to server move / input RPC">
|
||||
<Param Type="Multiplayer::NetworkInputArray" Name="inputArray" />
|
||||
<Param Type="AZ::HashValue64" Name="stateHash" />
|
||||
<Param Type="AZ::HashValue32" Name="stateHash" />
|
||||
<Param Type="AzNetworking::PacketEncodingBuffer" Name="clientState" Description="This is for debugging desyncs only; release games should not populate this parameter" />
|
||||
</RemoteProcedure>
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ namespace Multiplayer
|
||||
(
|
||||
AzNetworking::IConnection* invokingConnection,
|
||||
const Multiplayer::NetworkInputArray& inputArray,
|
||||
const AZ::HashValue64& stateHash,
|
||||
const AZ::HashValue32& stateHash,
|
||||
[[maybe_unused]] const AzNetworking::PacketEncodingBuffer& clientState
|
||||
)
|
||||
{
|
||||
@@ -201,7 +201,7 @@ namespace Multiplayer
|
||||
AzNetworking::HashSerializer hashSerializer;
|
||||
GetNetBindComponent()->SerializeEntityCorrection(hashSerializer);
|
||||
|
||||
const AZ::HashValue64 localAuthorityHash = hashSerializer.GetHash();
|
||||
const AZ::HashValue32 localAuthorityHash = hashSerializer.GetHash();
|
||||
|
||||
if (stateHash != localAuthorityHash)
|
||||
{
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace Multiplayer
|
||||
(
|
||||
AzNetworking::IConnection* invokingConnection,
|
||||
const Multiplayer::NetworkInputArray& inputArray,
|
||||
const AZ::HashValue64& stateHash,
|
||||
const AZ::HashValue32& stateHash,
|
||||
const AzNetworking::PacketEncodingBuffer& clientState
|
||||
) override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user