-
Notifications
You must be signed in to change notification settings - Fork 173
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
411 additions
and
496 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#ifndef __POSITIONUPDATE__H__ | ||
#define __POSITIONUPDATE__H__ | ||
|
||
#include "NiPoint3.h" | ||
#include "NiQuaternion.h" | ||
|
||
|
||
struct RemoteInputInfo { | ||
RemoteInputInfo() { | ||
m_RemoteInputX = 0; | ||
m_RemoteInputY = 0; | ||
m_IsPowersliding = false; | ||
m_IsModified = false; | ||
} | ||
|
||
void operator=(const RemoteInputInfo& other) { | ||
m_RemoteInputX = other.m_RemoteInputX; | ||
m_RemoteInputY = other.m_RemoteInputY; | ||
m_IsPowersliding = other.m_IsPowersliding; | ||
m_IsModified = other.m_IsModified; | ||
} | ||
|
||
bool operator==(const RemoteInputInfo& other) { | ||
return m_RemoteInputX == other.m_RemoteInputX && m_RemoteInputY == other.m_RemoteInputY && m_IsPowersliding == other.m_IsPowersliding && m_IsModified == other.m_IsModified; | ||
} | ||
|
||
float m_RemoteInputX; | ||
float m_RemoteInputY; | ||
bool m_IsPowersliding; | ||
bool m_IsModified; | ||
}; | ||
|
||
struct LocalSpaceInfo { | ||
LWOOBJID objectId = LWOOBJID_EMPTY; | ||
NiPoint3 position = NiPoint3::ZERO; | ||
NiPoint3 linearVelocity = NiPoint3::ZERO; | ||
}; | ||
|
||
struct PositionUpdate { | ||
NiPoint3 position = NiPoint3::ZERO; | ||
NiQuaternion rotation = NiQuaternion::IDENTITY; | ||
bool onGround = false; | ||
bool onRail = false; | ||
NiPoint3 velocity = NiPoint3::ZERO; | ||
NiPoint3 angularVelocity = NiPoint3::ZERO; | ||
LocalSpaceInfo localSpaceInfo; | ||
RemoteInputInfo remoteInputInfo; | ||
}; | ||
|
||
#endif //!__POSITIONUPDATE__H__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.