mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-14 08:04:40 +00:00
initial commit jolt
This commit is contained in:
parent
0c2aa5328c
commit
8acf7da95b
1086 changed files with 214612 additions and 4 deletions
27
Engine/lib/JoltPhysics/TestFramework/Utils/AssetStream.h
Normal file
27
Engine/lib/JoltPhysics/TestFramework/Utils/AssetStream.h
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
// Jolt Physics Library (https://github.com/jrouwe/JoltPhysics)
|
||||
// SPDX-FileCopyrightText: 2025 Jorrit Rouwe
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#pragma once
|
||||
|
||||
JPH_SUPPRESS_WARNINGS_STD_BEGIN
|
||||
#include <fstream>
|
||||
JPH_SUPPRESS_WARNINGS_STD_END
|
||||
|
||||
/// An istream interface that reads data from a file in the Assets folder
|
||||
class AssetStream
|
||||
{
|
||||
public:
|
||||
/// Constructor
|
||||
AssetStream(const char *inFileName, std::ios_base::openmode inOpenMode);
|
||||
AssetStream(const String &inFileName, std::ios_base::openmode inOpenMode) : AssetStream(inFileName.c_str(), inOpenMode) { }
|
||||
|
||||
/// Get the path to the assets folder
|
||||
static String sGetAssetsBasePath();
|
||||
|
||||
/// Get the stream
|
||||
std::istream & Get() { return mStream; }
|
||||
|
||||
private:
|
||||
std::ifstream mStream;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue