Added Conversions To and From WXYZ Quaternion Representations #295
|
@ -23,6 +23,7 @@ public class RaccoonShowcase : Script
|
|||
[Range(-5, 5)]
|
||||
public List<int> intList = new List<int>(new int[] { 2, 8, 2, 6, 8, 0, 1 });
|
||||
public List<Light.Type> enumList = new List<Light.Type>(new Light.Type[] { Light.Type.Point, Light.Type.Directional, Light.Type.Ambient });
|
||||
public List<int> nullList;
|
||||
public FontAsset fontAsset;
|
||||
public MeshAsset mesh;
|
||||
public MaterialAsset matAsset;
|
||||
|
|
|
@ -61,8 +61,13 @@ namespace SHADE
|
|||
SHVkInstance::Init(true, false, true);
|
||||
#endif
|
||||
|
||||
// Get Physical Device and Construct Logical Device
|
||||
// Get Physical Device
|
||||
physicalDevice = SHVkInstance::CreatePhysicalDevice(SH_PHYSICAL_DEVICE_TYPE::BEST);
|
||||
if (!physicalDevice->GetVkPhysicalDevice())
|
||||
{
|
||||
throw std::runtime_error("[Graphics System] No supported Vulkan 1.3 compatible GPU was detected!");
|
||||
}
|
||||
// Construct Logical Device
|
||||
device = SHVkInstance::CreateLogicalDevice({ SHQueueParams(SH_Q_FAM::GRAPHICS, SH_QUEUE_SELECT::DEDICATED), SHQueueParams(SH_Q_FAM::TRANSFER, SH_QUEUE_SELECT::DEDICATED) }, physicalDevice);
|
||||
|
||||
// Construct surface
|
||||
|
|
|
@ -250,9 +250,7 @@ namespace SHADE
|
|||
}
|
||||
|
||||
// A static rigid body is implicitly created on creation of a physics object.
|
||||
// We only need to sync rigid bodies here in the event it is non-static.
|
||||
|
||||
physicsObject->SyncRigidBody(*componentGroup.rigidBodyComponent);
|
||||
// Nothing is needed here.
|
||||
}
|
||||
|
||||
void SHPhysicsObjectManager::addCollider(const QueueCommand&, SHPhysicsObject* physicsObject, const PhysicsComponentGroup& componentGroup)
|
||||
|
@ -269,7 +267,7 @@ namespace SHADE
|
|||
//for (int i = 0; i < NUM_SHAPES; ++i)
|
||||
// physicsObject->AddCollisionShape(i);
|
||||
|
||||
//physicsObject->SyncColliders(*componentGroup.colliderComponent);
|
||||
physicsObject->SyncColliders(*componentGroup.colliderComponent);
|
||||
}
|
||||
|
||||
void SHPhysicsObjectManager::removeRigidBody(const QueueCommand&, SHPhysicsObject* physicsObject, const PhysicsComponentGroup& componentGroup)
|
||||
|
|
|
@ -411,7 +411,14 @@ namespace SHADE
|
|||
objectManager.AddRigidBody(EID);
|
||||
|
||||
if (SHComponentManager::HasComponent<SHColliderComponent>(EID))
|
||||
{
|
||||
objectManager.AddCollider(EID);
|
||||
|
||||
auto* COLLIDER = SHComponentManager::GetComponent<SHColliderComponent>(EID);
|
||||
for (size_t i = 0; i < COLLIDER->GetCollisionShapes().size(); ++i)
|
||||
objectManager.AddCollisionShape(EID, i);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
////////////////////////////////
|
||||
|
|
|
@ -255,6 +255,8 @@ namespace SHADE
|
|||
// Sync transforms & physics components transforms
|
||||
if (transformComponent && transformComponent->HasChanged())
|
||||
{
|
||||
physicsObject.GetRigidBody()->setIsSleeping(false);
|
||||
|
||||
preUpdateSyncTransform
|
||||
(
|
||||
physicsObject
|
||||
|
|
|
@ -189,6 +189,12 @@ namespace SHADE
|
|||
System::Type^ listType = field->FieldType->GenericTypeArguments[0];
|
||||
RangeAttribute^ rangeAttrib = hasAttribute<RangeAttribute^>(field);
|
||||
System::Collections::IList^ iList = safe_cast<System::Collections::IList^>(field->GetValue(object));
|
||||
if (iList == nullptr)
|
||||
{
|
||||
// Create if the list does not exist
|
||||
iList = safe_cast<System::Collections::IList^>(System::Activator::CreateInstance(field->FieldType));
|
||||
field->SetValue(object, iList);
|
||||
}
|
||||
|
||||
if (SHEditorUI::CollapsingHeader(Convert::ToNative(field->Name), &isHovered))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue