mirror of
https://github.com/storytold/LiveScan3D.git
synced 2026-10-09 00:09:58 +00:00
Data streaming is now much faster (up to 40%). Also added the option to save to binary PLY which is faster than ASCII.
This commit is contained in:
@@ -56,10 +56,10 @@ private:
|
||||
SocketClient *m_pClientSocket;
|
||||
std::vector<float> m_vBounds;
|
||||
|
||||
std::vector<Point3f> m_vLastFrameVertices;
|
||||
std::vector<Point3s> m_vLastFrameVertices;
|
||||
std::vector<RGB> m_vLastFrameRGB;
|
||||
std::vector<Body> m_vLastFrameBody;
|
||||
std::vector<std::vector<Point3f>> m_vGatheredVertices;
|
||||
std::vector<std::vector<Point3s>> m_vGatheredVertices;
|
||||
std::vector<std::vector<RGB>> m_vGatheredRGBPoints;
|
||||
|
||||
HWND m_hWnd;
|
||||
@@ -84,7 +84,7 @@ private:
|
||||
bool SetStatusMessage(_In_z_ WCHAR* szMessage, DWORD nShowTimeMsec, bool bForce);
|
||||
|
||||
void HandleSocket();
|
||||
void SendFrame(vector<Point3f> vertices, vector<RGB> RGB, vector<Body> body);
|
||||
void SendFrame(vector<Point3s> vertices, vector<RGB> RGB, vector<Body> body);
|
||||
|
||||
void SocketThreadFunction();
|
||||
void StoreFrame(Point3f *vertices, Point2f *mapping, RGB *color, vector<Body> &bodies, BYTE* bodyIndex);
|
||||
|
||||
@@ -57,6 +57,32 @@ typedef struct Point3f
|
||||
float Z;
|
||||
} Point3f;
|
||||
|
||||
typedef struct Point3s
|
||||
{
|
||||
Point3s()
|
||||
{
|
||||
this->X = 0;
|
||||
this->Y = 0;
|
||||
this->Z = 0;
|
||||
}
|
||||
Point3s(short X, short Y, short Z)
|
||||
{
|
||||
this->X = X;
|
||||
this->Y = Y;
|
||||
this->Z = Z;
|
||||
}
|
||||
//meters to milimeters
|
||||
Point3s(Point3f &other)
|
||||
{
|
||||
this->X = static_cast<short>(1000 * other.X);
|
||||
this->Y = static_cast<short>(1000 * other.Y);
|
||||
this->Z = static_cast<short>(1000 * other.Z);
|
||||
}
|
||||
short X;
|
||||
short Y;
|
||||
short Z;
|
||||
} Point3s;
|
||||
|
||||
typedef struct Point2f
|
||||
{
|
||||
Point2f()
|
||||
|
||||
Reference in New Issue
Block a user