mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-31 08:29:04 -06:00
posting message using asset file
This commit is contained in:
@@ -8,7 +8,7 @@ local CommunicationLine = {
|
||||
Parent = earthTransforms.EarthBarycenter.Identifier,
|
||||
Renderable = {
|
||||
Type = "CommunicationLines",
|
||||
--_myMessage = "My Asset works!"
|
||||
Message = "My Asset works!"
|
||||
-- SourceFolder = ENLILPaths.Earth,
|
||||
-- InputFileType = "osfls",
|
||||
},
|
||||
|
||||
@@ -25,10 +25,9 @@
|
||||
#include <modules/dsn/dsnmodule.h>
|
||||
|
||||
namespace openspace {
|
||||
constexpr const char* _loggerCat = "CommunicationLine";
|
||||
constexpr const char* _loggerCat = "DSN Module";
|
||||
|
||||
DsnModule::DsnModule() : OpenSpaceModule(Name) {
|
||||
LDEBUG("Hello from DSN module");
|
||||
}
|
||||
|
||||
void DsnModule::internalInitialize(const ghoul::Dictionary&) {
|
||||
|
||||
@@ -27,22 +27,27 @@
|
||||
|
||||
namespace openspace {
|
||||
constexpr const char* _loggerCat = "CommunicationLine";
|
||||
constexpr const char* _messageKey = "Message";
|
||||
|
||||
|
||||
CommunicationLines::CommunicationLines(const ghoul::Dictionary& dictionary)
|
||||
: Renderable(dictionary) {
|
||||
//lines between space and earth
|
||||
_dictionary = std::make_unique<ghoul::Dictionary>(dictionary);
|
||||
CommunicationLines::PrintSomething();
|
||||
CommunicationLines::PrintSomething(dictionary);
|
||||
|
||||
}
|
||||
|
||||
void CommunicationLines::PrintSomething(const ghoul::Dictionary& aDictionary) {
|
||||
|
||||
void CommunicationLines::PrintSomething() {
|
||||
|
||||
std::ofstream file{ "dsnmodule.txt" };
|
||||
file << _myMessage << std::endl;
|
||||
file.close();
|
||||
bool success = aDictionary.getValue(_messageKey, _myMessage);
|
||||
if (!success) {
|
||||
LERROR("ERROR DICTIONARY");
|
||||
}
|
||||
std::ofstream file{ "dsnmodule.txt" };
|
||||
file << _myMessage << std::endl;
|
||||
file.close();
|
||||
LDEBUG(_myMessage);
|
||||
|
||||
}
|
||||
|
||||
void CommunicationLines::render(const RenderData& data, RendererTasks&) {
|
||||
|
||||
@@ -36,10 +36,10 @@ namespace openspace {
|
||||
class CommunicationLines : public Renderable {
|
||||
public:
|
||||
|
||||
|
||||
std::string _myMessage;
|
||||
|
||||
CommunicationLines(const ghoul::Dictionary& dictionary);
|
||||
void PrintSomething();
|
||||
void PrintSomething(const ghoul::Dictionary& dictionary);
|
||||
|
||||
void initializeGL() override;
|
||||
void deinitializeGL() override;
|
||||
@@ -50,7 +50,7 @@ public:
|
||||
void update(const UpdateData& data) override;
|
||||
private:
|
||||
std::unique_ptr<ghoul::Dictionary> _dictionary;
|
||||
std::string _myMessage = "base";
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user