Permalink
Browse files

Able to record Rigid Body data.

  • Loading branch information...
1 parent ae3cd29 commit fa35fe487aeee4af88b6837b15a69b6d3445dcf5 @mdfeist committed Jun 19, 2013
View
@@ -91,6 +91,19 @@ bool AppData::openFile(char* filePath) {
return true;
}
+pugi::xml_node AppData::getNewRecording() {
+ // Get Project
+ pugi::xml_node project = doc.child("Project");
+
+ // If no Project create new Project node
+ if (!project) {
+ project = doc.append_child();
+ project.set_name("Project");
+ }
+
+ return project.append_child();
+}
+
bool AppData::saveFile() {
MainFormController::getInstance()->getInfo();
View
@@ -13,8 +13,6 @@
#include "NatNetTypes.h"
#include "pugixml.hpp"
-
-
public class AppData
{
public:
@@ -34,6 +32,8 @@ public class AppData
char* getLastError() { return this->error; }
+ pugi::xml_node getNewRecording();
+
bool openFile(char* filePath);
bool saveFile();
bool isSaveNeeded() { return this->needSaveFlag; }
@@ -85,6 +85,7 @@
<PrecompiledHeader>Use</PrecompiledHeader>
<AdditionalIncludeDirectories>NatNetSDK\include;</AdditionalIncludeDirectories>
<CompileAsManaged>true</CompileAsManaged>
+ <Optimization>Full</Optimization>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
@@ -113,7 +114,6 @@
<Content Include="DikablisHelpDocs\DikablisHelp.htm">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
- <None Include="ClassDiagram1.cd" />
<None Include="DikablisHelpDocs\DikablisHelp.rtf" />
<Content Include="NatNetLib.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
@@ -141,7 +141,8 @@
</ClCompile>
<ClCompile Include="Objects.cpp" />
<ClCompile Include="pugixml.cpp" />
- <ClCompile Include="RecorderManager.cpp" />
+ <ClCompile Include="RecordingManager.cpp" />
+ <ClCompile Include="Recording.cpp" />
<ClCompile Include="RigidBody.cpp" />
<ClCompile Include="AppData.cpp" />
<ClCompile Include="SetObjectRigidBodyForm.cpp" />
@@ -191,7 +192,8 @@
<ClInclude Include="Objects.h" />
<ClInclude Include="pugiconfig.hpp" />
<ClInclude Include="pugixml.hpp" />
- <ClInclude Include="RecorderManager.h" />
+ <ClInclude Include="RecordingManager.h" />
+ <ClInclude Include="Recording.h" />
<ClInclude Include="resource.h" />
<ClInclude Include="RigidBody.h" />
<ClInclude Include="AppData.h" />
@@ -22,7 +22,6 @@
<None Include="DikablisHelpDocs\DikablisHelp.rtf">
<Filter>Resource Files</Filter>
</None>
- <None Include="ClassDiagram1.cd" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="BlinkAnalysis.cpp">
@@ -91,7 +90,10 @@
<ClCompile Include="WorldManager.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="RecorderManager.cpp">
+ <ClCompile Include="Recording.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="RecordingManager.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
@@ -201,7 +203,10 @@
<ClInclude Include="WorldManager.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="RecorderManager.h">
+ <ClInclude Include="Recording.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="RecordingManager.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
@@ -76,7 +76,7 @@ osg::Vec3 ClientHandler::getRay(int x, int y) {
int loc = 3*((j*(DikablisViewingWidth+2*DikablisViewingMargin)) + i);
- if (loc >= 0 && loc < DikablisViewingSize) {
+ if (loc >= 0 && loc < (int)DikablisViewingSize) {
ray.x() = this->dikablisEyeVectorArray[loc + 0];
ray.y() = this->dikablisEyeVectorArray[loc + 1];
ray.z() = this->dikablisEyeVectorArray[loc + 2];
View
@@ -26,6 +26,7 @@
#include "AppData.h"
#include "AppViewer.h"
#include "WorldManager.h"
+#include "RecordingManager.h"
#include "NatNetClientSetup.h"
@@ -389,6 +390,9 @@ private: System::Windows::Forms::Button^ startRecordingBtn;
this->visualViewerScaleLabel = (gcnew System::Windows::Forms::ToolStripLabel());
this->visualViewerScaleTextBox = (gcnew System::Windows::Forms::ToolStripTextBox());
this->toolStripSeparator1 = (gcnew System::Windows::Forms::ToolStripSeparator());
+ this->visualRecorderPanel = (gcnew System::Windows::Forms::Panel());
+ this->stopRecordingBtn = (gcnew System::Windows::Forms::Button());
+ this->startRecordingBtn = (gcnew System::Windows::Forms::Button());
this->visualRecorderLabel = (gcnew System::Windows::Forms::Label());
this->visualPropertiesTabControl = (gcnew System::Windows::Forms::TabControl());
this->rigidBodyTabPage = (gcnew System::Windows::Forms::TabPage());
@@ -423,9 +427,6 @@ private: System::Windows::Forms::Button^ startRecordingBtn;
this->addObjectToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
this->rigidBodyToolContextMenu = (gcnew System::Windows::Forms::ContextMenuStrip(this->components));
this->setAsRigidBodyToolToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem());
- this->visualRecorderPanel = (gcnew System::Windows::Forms::Panel());
- this->startRecordingBtn = (gcnew System::Windows::Forms::Button());
- this->stopRecordingBtn = (gcnew System::Windows::Forms::Button());
this->mainTabControl->SuspendLayout();
this->OptiTrackPage->SuspendLayout();
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->optiTrackMainSplitContainer))->BeginInit();
@@ -455,6 +456,7 @@ private: System::Windows::Forms::Button^ startRecordingBtn;
this->visualSplitContainer->Panel2->SuspendLayout();
this->visualSplitContainer->SuspendLayout();
this->visualToolStrip->SuspendLayout();
+ this->visualRecorderPanel->SuspendLayout();
this->visualPropertiesTabControl->SuspendLayout();
this->rigidBodyTabPage->SuspendLayout();
this->worldTabPage->SuspendLayout();
@@ -463,7 +465,6 @@ private: System::Windows::Forms::Button^ startRecordingBtn;
(cli::safe_cast<System::ComponentModel::ISupportInitialize^ >(this->objectGridView))->BeginInit();
this->menuStrip->SuspendLayout();
this->rigidBodyToolContextMenu->SuspendLayout();
- this->visualRecorderPanel->SuspendLayout();
this->SuspendLayout();
//
// mainTabControl
@@ -1438,6 +1439,39 @@ private: System::Windows::Forms::Button^ startRecordingBtn;
this->toolStripSeparator1->Name = L"toolStripSeparator1";
this->toolStripSeparator1->Size = System::Drawing::Size(6, 25);
//
+ // visualRecorderPanel
+ //
+ this->visualRecorderPanel->Anchor = static_cast<System::Windows::Forms::AnchorStyles>((((System::Windows::Forms::AnchorStyles::Top | System::Windows::Forms::AnchorStyles::Bottom)
+ | System::Windows::Forms::AnchorStyles::Left)
+ | System::Windows::Forms::AnchorStyles::Right));
+ this->visualRecorderPanel->BackColor = System::Drawing::Color::WhiteSmoke;
+ this->visualRecorderPanel->Controls->Add(this->stopRecordingBtn);
+ this->visualRecorderPanel->Controls->Add(this->startRecordingBtn);
+ this->visualRecorderPanel->Location = System::Drawing::Point(3, 16);
+ this->visualRecorderPanel->Name = L"visualRecorderPanel";
+ this->visualRecorderPanel->Size = System::Drawing::Size(487, 101);
+ this->visualRecorderPanel->TabIndex = 1;
+ //
+ // stopRecordingBtn
+ //
+ this->stopRecordingBtn->Location = System::Drawing::Point(131, 3);
+ this->stopRecordingBtn->Name = L"stopRecordingBtn";
+ this->stopRecordingBtn->Size = System::Drawing::Size(122, 23);
+ this->stopRecordingBtn->TabIndex = 1;
+ this->stopRecordingBtn->Text = L"Stop Recording";
+ this->stopRecordingBtn->UseVisualStyleBackColor = true;
+ this->stopRecordingBtn->Click += gcnew System::EventHandler(this, &MainForm::stopRecordingBtn_Click);
+ //
+ // startRecordingBtn
+ //
+ this->startRecordingBtn->Location = System::Drawing::Point(3, 3);
+ this->startRecordingBtn->Name = L"startRecordingBtn";
+ this->startRecordingBtn->Size = System::Drawing::Size(122, 23);
+ this->startRecordingBtn->TabIndex = 0;
+ this->startRecordingBtn->Text = L"Start Recording";
+ this->startRecordingBtn->UseVisualStyleBackColor = true;
+ this->startRecordingBtn->Click += gcnew System::EventHandler(this, &MainForm::startRecordingBtn_Click);
+ //
// visualRecorderLabel
//
this->visualRecorderLabel->AutoSize = true;
@@ -1786,37 +1820,6 @@ private: System::Windows::Forms::Button^ startRecordingBtn;
this->setAsRigidBodyToolToolStripMenuItem->Text = L"Set as Rigid Body Tool";
this->setAsRigidBodyToolToolStripMenuItem->Click += gcnew System::EventHandler(this, &MainForm::setAsRigidBodyToolToolStripMenuItem_Click);
//
- // visualRecorderPanel
- //
- this->visualRecorderPanel->Anchor = static_cast<System::Windows::Forms::AnchorStyles>((((System::Windows::Forms::AnchorStyles::Top | System::Windows::Forms::AnchorStyles::Bottom)
- | System::Windows::Forms::AnchorStyles::Left)
- | System::Windows::Forms::AnchorStyles::Right));
- this->visualRecorderPanel->BackColor = System::Drawing::Color::WhiteSmoke;
- this->visualRecorderPanel->Controls->Add(this->stopRecordingBtn);
- this->visualRecorderPanel->Controls->Add(this->startRecordingBtn);
- this->visualRecorderPanel->Location = System::Drawing::Point(3, 16);
- this->visualRecorderPanel->Name = L"visualRecorderPanel";
- this->visualRecorderPanel->Size = System::Drawing::Size(487, 101);
- this->visualRecorderPanel->TabIndex = 1;
- //
- // startRecordingBtn
- //
- this->startRecordingBtn->Location = System::Drawing::Point(3, 3);
- this->startRecordingBtn->Name = L"startRecordingBtn";
- this->startRecordingBtn->Size = System::Drawing::Size(122, 23);
- this->startRecordingBtn->TabIndex = 0;
- this->startRecordingBtn->Text = L"Start Recording";
- this->startRecordingBtn->UseVisualStyleBackColor = true;
- //
- // stopRecordingBtn
- //
- this->stopRecordingBtn->Location = System::Drawing::Point(131, 3);
- this->stopRecordingBtn->Name = L"stopRecordingBtn";
- this->stopRecordingBtn->Size = System::Drawing::Size(122, 23);
- this->stopRecordingBtn->TabIndex = 1;
- this->stopRecordingBtn->Text = L"Stop Recording";
- this->stopRecordingBtn->UseVisualStyleBackColor = true;
- //
// MainForm
//
this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
@@ -1872,6 +1875,7 @@ private: System::Windows::Forms::Button^ startRecordingBtn;
this->visualSplitContainer->ResumeLayout(false);
this->visualToolStrip->ResumeLayout(false);
this->visualToolStrip->PerformLayout();
+ this->visualRecorderPanel->ResumeLayout(false);
this->visualPropertiesTabControl->ResumeLayout(false);
this->rigidBodyTabPage->ResumeLayout(false);
this->worldTabPage->ResumeLayout(false);
@@ -1883,7 +1887,6 @@ private: System::Windows::Forms::Button^ startRecordingBtn;
this->menuStrip->ResumeLayout(false);
this->menuStrip->PerformLayout();
this->rigidBodyToolContextMenu->ResumeLayout(false);
- this->visualRecorderPanel->ResumeLayout(false);
this->ResumeLayout(false);
this->PerformLayout();
@@ -2640,7 +2643,7 @@ private: System::Void addObjectToolStripMenuItem_Click(System::Object^ sender,
{
optiTrackLabeledMarkerVector->at(safe_cast<int>(num->Current))->select();
}
- }*/
+}*/
private: System::Void visualRigidBodyListView_MouseClick(System::Object^ sender, System::Windows::Forms::MouseEventArgs^ e) {
if (e->Button == ::MouseButtons::Right)
{
@@ -3088,6 +3091,12 @@ private: System::Void visualViewerScaleTextBox_TextChanged(System::Object^ send
float scale = Convert::ToSingle(this->visualViewerScaleTextBox->Text);
AppViewer::setScale(scale);
}
+private: System::Void startRecordingBtn_Click(System::Object^ sender, System::EventArgs^ e) {
+ RecordingManager::getInstance()->startRecording();
+ }
+private: System::Void stopRecordingBtn_Click(System::Object^ sender, System::EventArgs^ e) {
+ RecordingManager::getInstance()->stopRecording();
+ }
};
}
@@ -117,9 +117,6 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
- <metadata name="visualToolStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <value>327, 13</value>
- </metadata>
<metadata name="optiTrackRigidBodyIDColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
@@ -147,38 +144,8 @@
<metadata name="optiTrackRigidBodyRotationWColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
- <metadata name="optiTrackRigidBodyIDColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>True</value>
- </metadata>
- <metadata name="optiTrackRigidBodyNameColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>True</value>
- </metadata>
- <metadata name="optiTrackRigidBodyPositionXColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>True</value>
- </metadata>
- <metadata name="optiTrackRigidBodyPositionYColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>True</value>
- </metadata>
- <metadata name="optiTrackRigidBodyPositionZColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>True</value>
- </metadata>
- <metadata name="optiTrackRigidBodyRotationXColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>True</value>
- </metadata>
- <metadata name="optiTrackRigidBodyRotationYColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>True</value>
- </metadata>
- <metadata name="optiTrackRigidBodyRotationZColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>True</value>
- </metadata>
- <metadata name="optiTrackRigidBodyRotationWColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>True</value>
- </metadata>
- <metadata name="worldPropertyColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>True</value>
- </metadata>
- <metadata name="worldValueColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>True</value>
+ <metadata name="visualToolStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>327, 13</value>
</metadata>
<metadata name="worldPropertyColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
@@ -192,12 +159,6 @@
<metadata name="objectValueColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
- <metadata name="objectPropertyColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>True</value>
- </metadata>
- <metadata name="objectValueColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>True</value>
- </metadata>
<metadata name="menuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
Oops, something went wrong.

0 comments on commit fa35fe4

Please sign in to comment.