Commit f3f286c8 authored by Dipl.-Ing. Jonas Stienen's avatar Dipl.-Ing. Jonas Stienen
Browse files

Finishing homogeneous medium methods

parent 52f0dbd9
......@@ -822,62 +822,86 @@ public:
inline void SetHomogeneousMediumSoundSpeed( const double dSoundSpeed )
{
VA_EXCEPT_NOT_IMPLEMENTED;
VA_REQUIRE_CONNECTED;
VA_MUTAL_EXCLUDE;
m_pProtocol->ClientSetHomogeneousMediumSoundSpeed( dSoundSpeed );
};
inline double GetHomogeneousMediumSoundSpeed() const
{
VA_EXCEPT_NOT_IMPLEMENTED;
VA_REQUIRE_CONNECTED;
VA_MUTAL_EXCLUDE;
return m_pProtocol->ClientGetHomogeneousMediumSoundSpeed();
};
inline void SetHomogeneousMediumTemperature( const double dDegreesCentigrade )
{
VA_EXCEPT_NOT_IMPLEMENTED;
VA_REQUIRE_CONNECTED;
VA_MUTAL_EXCLUDE;
m_pProtocol->ClientSetHomogeneousMediumTemperature( dDegreesCentigrade );
};
inline double GetHomogeneousMediumTemperature() const
{
VA_EXCEPT_NOT_IMPLEMENTED;
VA_REQUIRE_CONNECTED;
VA_MUTAL_EXCLUDE;
return m_pProtocol->ClientGetHomogeneousMediumTemperature();
};
inline void SetHomogeneousMediumStaticPressure( const double dPressurePascal )
{
VA_EXCEPT_NOT_IMPLEMENTED;
VA_REQUIRE_CONNECTED;
VA_MUTAL_EXCLUDE;
m_pProtocol->ClientSetHomogeneousMediumStaticPressure( dPressurePascal );
};
inline double GetHomogeneousMediumStaticPressure() const
{
VA_EXCEPT_NOT_IMPLEMENTED;
VA_REQUIRE_CONNECTED;
VA_MUTAL_EXCLUDE;
return m_pProtocol->ClientGetHomogeneousMediumStaticPressure();
};
inline void SetHomogeneousMediumRelativeHumidity( const double dRelativeHumidityPercent )
{
VA_EXCEPT_NOT_IMPLEMENTED;
VA_REQUIRE_CONNECTED;
VA_MUTAL_EXCLUDE;
m_pProtocol->ClientSetHomogeneousMediumRelativeHumidity( dRelativeHumidityPercent );
};
inline double GetHomogeneousMediumRelativeHumidity()
{
VA_EXCEPT_NOT_IMPLEMENTED;
VA_REQUIRE_CONNECTED;
VA_MUTAL_EXCLUDE;
return m_pProtocol->ClientGetHomogeneousMediumRelativeHumidity();
};
inline void SetHomogeneousMediumShiftSpeed( const VAVec3& v3TranslationSpeed )
{
VA_EXCEPT_NOT_IMPLEMENTED;
VA_REQUIRE_CONNECTED;
VA_MUTAL_EXCLUDE;
m_pProtocol->ClientSetHomogeneousMediumShiftSpeed( v3TranslationSpeed );
};
inline VAVec3 GetHomogeneousMediumShiftSpeed() const
{
VA_EXCEPT_NOT_IMPLEMENTED;
VA_REQUIRE_CONNECTED;
VA_MUTAL_EXCLUDE;
return m_pProtocol->ClientGetHomogeneousMediumShiftSpeed();
};
inline void SetHomogeneousMediumParameters( const CVAStruct& oParams )
{
VA_EXCEPT_NOT_IMPLEMENTED;
VA_REQUIRE_CONNECTED;
VA_MUTAL_EXCLUDE;
m_pProtocol->ClientSetHomogeneousMediumParameters( oParams );
};
inline CVAStruct GetHomogeneousMediumParameters()
inline CVAStruct GetHomogeneousMediumParameters( const CVAStruct& oArgs )
{
VA_EXCEPT_NOT_IMPLEMENTED;
VA_REQUIRE_CONNECTED;
VA_MUTAL_EXCLUDE;
return m_pProtocol->ClientGetHomogeneousMediumParameters( oArgs );
};
......
......@@ -3039,6 +3039,184 @@ void CVANetNetworkProtocol::ServerSetAcousticMaterialParameters()
m_pRealCore->SetAcousticMaterialParameters( iID, oParams );
}
double CVANetNetworkProtocol::ClientGetHomogeneousMediumSoundSpeed()
{
CVANetMessage* pMsg = ClientInitMessage( VA_NP_GET_HOMOGENEOUS_MEDIUM_SOUND_SPEED, MESSAGE_WITH_ANSWER );
ClientSendCommand( pMsg );
return pMsg->ReadDouble();
}
void CVANetNetworkProtocol::ServerGetHomogeneousMediumSoundSpeed()
{
CVANetMessage* pMsg = ServerGetMessage();
const double dValue = m_pRealCore->GetHomogeneousMediumSoundSpeed();
pMsg->WriteDouble( dValue );
}
void CVANetNetworkProtocol::ClientSetHomogeneousMediumSoundSpeed( const double dSoundSpeed )
{
CVANetMessage* pMsg = ClientInitMessage( VA_NP_SET_HOMOGENEOUS_MEDIUM_SOUND_SPEED, MESSAGE_ALLOWS_BUFFERING );
pMsg->WriteDouble( dSoundSpeed );
ClientSendCommand( pMsg );
}
void CVANetNetworkProtocol::ServerSetHomogeneousMediumSoundSpeed()
{
CVANetMessage* pMsg = ServerGetMessage();
const double dValue = pMsg->ReadDouble();
m_pRealCore->SetHomogeneousMediumSoundSpeed( dValue );
}
double CVANetNetworkProtocol::ClientGetHomogeneousMediumTemperature()
{
CVANetMessage* pMsg = ClientInitMessage( VA_NP_GET_HOMOGENEOUS_MEDIUM_TEMPERATURE, MESSAGE_WITH_ANSWER );
ClientSendCommand( pMsg );
return pMsg->ReadDouble();
}
void CVANetNetworkProtocol::ServerGetHomogeneousMediumTemperature()
{
CVANetMessage* pMsg = ServerGetMessage();
const double dValue = m_pRealCore->GetHomogeneousMediumTemperature();
pMsg->WriteDouble( dValue );
}
void CVANetNetworkProtocol::ClientSetHomogeneousMediumTemperature( const double dTemperature )
{
CVANetMessage* pMsg = ClientInitMessage( VA_NP_SET_HOMOGENEOUS_MEDIUM_TEMPERATURE, MESSAGE_ALLOWS_BUFFERING );
pMsg->WriteDouble( dTemperature );
ClientSendCommand( pMsg );
}
void CVANetNetworkProtocol::ServerSetHomogeneousMediumTemperature()
{
CVANetMessage* pMsg = ServerGetMessage();
const double dValue = pMsg->ReadDouble();
m_pRealCore->SetHomogeneousMediumTemperature( dValue );
}
double CVANetNetworkProtocol::ClientGetHomogeneousMediumStaticPressure()
{
CVANetMessage* pMsg = ClientInitMessage( VA_NP_GET_HOMOGENEOUS_MEDIUM_STATIC_PRESSURE, MESSAGE_WITH_ANSWER );
ClientSendCommand( pMsg );
return pMsg->ReadDouble();
}
void CVANetNetworkProtocol::ServerGetHomogeneousMediumStaticPressure()
{
CVANetMessage* pMsg = ServerGetMessage();
const double dValue = m_pRealCore->GetHomogeneousMediumStaticPressure();
pMsg->WriteDouble( dValue );
}
void CVANetNetworkProtocol::ClientSetHomogeneousMediumStaticPressure( const double dStaticPressure )
{
CVANetMessage* pMsg = ClientInitMessage( VA_NP_SET_HOMOGENEOUS_MEDIUM_STATIC_PRESSURE, MESSAGE_ALLOWS_BUFFERING );
pMsg->WriteDouble( dStaticPressure );
ClientSendCommand( pMsg );
}
void CVANetNetworkProtocol::ServerSetHomogeneousMediumStaticPressure()
{
CVANetMessage* pMsg = ServerGetMessage();
const double dValue = pMsg->ReadDouble();
m_pRealCore->SetHomogeneousMediumStaticPressure( dValue );
}
double CVANetNetworkProtocol::ClientGetHomogeneousMediumRelativeHumidity()
{
CVANetMessage* pMsg = ClientInitMessage( VA_NP_GET_HOMOGENEOUS_MEDIUM_RELATIVE_HUMIDITY, MESSAGE_WITH_ANSWER );
ClientSendCommand( pMsg );
return pMsg->ReadDouble();
}
void CVANetNetworkProtocol::ServerGetHomogeneousMediumRelativeHumidity()
{
CVANetMessage* pMsg = ServerGetMessage();
const double dValue = m_pRealCore->GetHomogeneousMediumRelativeHumidity();
pMsg->WriteDouble( dValue );
}
void CVANetNetworkProtocol::ClientSetHomogeneousMediumRelativeHumidity( const double dRelativeHumidity )
{
CVANetMessage* pMsg = ClientInitMessage( VA_NP_SET_HOMOGENEOUS_MEDIUM_RELATIVE_HUMIDITY, MESSAGE_ALLOWS_BUFFERING );
pMsg->WriteDouble( dRelativeHumidity );
ClientSendCommand( pMsg );
}
void CVANetNetworkProtocol::ServerSetHomogeneousMediumRelativeHumidity()
{
CVANetMessage* pMsg = ServerGetMessage();
const double dValue = pMsg->ReadDouble();
m_pRealCore->SetHomogeneousMediumRelativeHumidity( dValue );
}
VAVec3 CVANetNetworkProtocol::ClientGetHomogeneousMediumShiftSpeed()
{
CVANetMessage* pMsg = ClientInitMessage( VA_NP_GET_HOMOGENEOUS_MEDIUM_SHIFT_SPEED, MESSAGE_WITH_ANSWER );
ClientSendCommand( pMsg );
return pMsg->ReadVec3();
}
void CVANetNetworkProtocol::ServerGetHomogeneousMediumShiftSpeed()
{
CVANetMessage* pMsg = ServerGetMessage();
const VAVec3 v3TranslationSpeed = m_pRealCore->GetHomogeneousMediumShiftSpeed();
pMsg->WriteVec3( v3TranslationSpeed );
}
void CVANetNetworkProtocol::ClientSetHomogeneousMediumShiftSpeed( const VAVec3& v3TranslationSpeed )
{
CVANetMessage* pMsg = ClientInitMessage( VA_NP_SET_HOMOGENEOUS_MEDIUM_RELATIVE_HUMIDITY, MESSAGE_ALLOWS_BUFFERING );
pMsg->WriteVec3( v3TranslationSpeed );
ClientSendCommand( pMsg );
}
void CVANetNetworkProtocol::ServerSetHomogeneousMediumShiftSpeed()
{
CVANetMessage* pMsg = ServerGetMessage();
const VAVec3 v3TranslationSpeed = pMsg->ReadVec3();
m_pRealCore->SetHomogeneousMediumShiftSpeed( v3TranslationSpeed );
}
void CVANetNetworkProtocol::ClientSetHomogeneousMediumParameters( const CVAStruct& oParams )
{
CVANetMessage* pMsg = ClientInitMessage( VA_NP_SET_HOMOGENEOUS_MEDIUM_PARAMETERS, MESSAGE_ALLOWS_BUFFERING );
pMsg->WriteVAStruct( oParams );
ClientSendCommand( pMsg );
}
void CVANetNetworkProtocol::ServerSetHomogeneousMediumParameters()
{
CVANetMessage* pMsg = ServerGetMessage();
CVAStruct oParams;
pMsg->ReadVAStruct( oParams );
m_pRealCore->SetHomogeneousMediumParameters( oParams );
}
CVAStruct CVANetNetworkProtocol::ClientGetHomogeneousMediumParameters( const CVAStruct& oParams )
{
CVANetMessage* pMsg = ClientInitMessage( VA_NP_GET_HOMOGENEOUS_MEDIUM_PARAMETERS, MESSAGE_WITH_ANSWER );
pMsg->WriteVAStruct( oParams );
ClientSendCommand( pMsg );
CVAStruct oRet;
pMsg->ReadVAStruct( oRet );
return oRet;
}
void CVANetNetworkProtocol::ServerGetHomogeneousMediumParameters()
{
CVANetMessage* pMsg = ServerGetMessage();
std::string sID = pMsg->ReadString();
CVAStruct oParams;
pMsg->ReadVAStruct( oParams );
CVAStruct oRet = m_pRealCore->GetHomogeneousMediumParameters( oParams );
pMsg->WriteVAStruct( oRet );
return;
}
bool CVANetNetworkProtocol::ClientIsRenderingModuleMuted( const std::string& sID )
{
CVANetMessage* pMsg = ClientInitMessage( VA_NP_RENDERER_IS_MUTED, MESSAGE_WITH_ANSWER );
......
......@@ -218,6 +218,19 @@ public:
static const int VA_NP_GET_ACOUSTIC_MATERIAL_PARAMETERS = 1408;
static const int VA_NP_SET_ACOUSTIC_MATERIAL_PARAMETERS = 1409;
static const int VA_NP_GET_HOMOGENEOUS_MEDIUM_SOUND_SPEED = 1500;
static const int VA_NP_SET_HOMOGENEOUS_MEDIUM_SOUND_SPEED = 1501;
static const int VA_NP_GET_HOMOGENEOUS_MEDIUM_TEMPERATURE = 1502;
static const int VA_NP_SET_HOMOGENEOUS_MEDIUM_TEMPERATURE = 1503;
static const int VA_NP_GET_HOMOGENEOUS_MEDIUM_STATIC_PRESSURE = 1504;
static const int VA_NP_SET_HOMOGENEOUS_MEDIUM_STATIC_PRESSURE = 1505;
static const int VA_NP_GET_HOMOGENEOUS_MEDIUM_RELATIVE_HUMIDITY = 1506;
static const int VA_NP_SET_HOMOGENEOUS_MEDIUM_RELATIVE_HUMIDITY = 1507;
static const int VA_NP_GET_HOMOGENEOUS_MEDIUM_SHIFT_SPEED = 1508;
static const int VA_NP_SET_HOMOGENEOUS_MEDIUM_SHIFT_SPEED = 1509;
static const int VA_NP_GET_HOMOGENEOUS_MEDIUM_PARAMETERS = 1510;
static const int VA_NP_SET_HOMOGENEOUS_MEDIUM_PARAMETERS = 1511;
static const int VA_NP_GET_INPUT_GAIN = 1100;
static const int VA_NP_SET_INPUT_GAIN = 1101;
static const int VA_NP_IS_INPUT_MUTED = 1102;
......@@ -746,6 +759,37 @@ public:
void ServerSetAcousticMaterialParameters();
void ClientSetHomogeneousMediumSoundSpeed( const double dSoundSpeed );
void ServerSetHomogeneousMediumSoundSpeed();
double ClientGetHomogeneousMediumSoundSpeed();
void ServerGetHomogeneousMediumSoundSpeed();
void ClientSetHomogeneousMediumTemperature( const double dDegreesCentigrade );
void ServerSetHomogeneousMediumTemperature();
double ClientGetHomogeneousMediumTemperature();
void ServerGetHomogeneousMediumTemperature();
void ClientSetHomogeneousMediumStaticPressure( const double dPressurePascal );
void ServerSetHomogeneousMediumStaticPressure();
double ClientGetHomogeneousMediumStaticPressure();
void ServerGetHomogeneousMediumStaticPressure();
void ClientSetHomogeneousMediumRelativeHumidity( const double dRelativeHumidityPercent );
void ServerSetHomogeneousMediumRelativeHumidity();
double ClientGetHomogeneousMediumRelativeHumidity();
void ServerGetHomogeneousMediumRelativeHumidity();
void ClientSetHomogeneousMediumShiftSpeed( const VAVec3& v3TranslationSpeed );
void ServerSetHomogeneousMediumShiftSpeed();
VAVec3 ClientGetHomogeneousMediumShiftSpeed();
void ServerGetHomogeneousMediumShiftSpeed();
void ClientSetHomogeneousMediumParameters( const CVAStruct& oParams );
void ServerSetHomogeneousMediumParameters();
CVAStruct ClientGetHomogeneousMediumParameters( const CVAStruct& oArgs);
void ServerGetHomogeneousMediumParameters();
private:
VistaConnectionIP* m_pCommandChannel;
VistaConnectionIP* m_pHeadChannel;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment