Add support for Double2/3/4 for Variant

Increase size to 40 bytes to store Double3 without allocations
Change Ray and BoundingBox to be stored inlined in BoundingBox
Use safer accessors to read Variant explicit data type
This commit is contained in:
Wojtek Figat
2022-05-20 18:10:35 +02:00
parent 2369b6a34a
commit ed908a260e
9 changed files with 894 additions and 442 deletions

View File

@@ -53,6 +53,16 @@ const ScriptingType& ScriptingTypeHandle::GetType() const
return Module->Types[TypeIndex];
}
#if USE_MONO
MonoClass* ScriptingTypeHandle::GetMonoClass() const
{
ASSERT_LOW_LAYER(Module && Module->Types[TypeIndex].ManagedClass);
return Module->Types[TypeIndex].ManagedClass->GetNative();
}
#endif
bool ScriptingTypeHandle::IsSubclassOf(ScriptingTypeHandle c) const
{
auto type = *this;