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

API adaption

parent 643f72a8
......@@ -21,7 +21,7 @@
#include <string>
// Vorwrtsdeklarationen
class IVACore;
class IVAInterface;
/**
* Diese abstrakte Klasse definiert die Schnittstelle fr eine Shell
......@@ -42,7 +42,7 @@ public:
virtual ~IVALuaShell();
// Kern-Instanz setzen
virtual void SetCoreInstance(IVACore* pVACore)=0;
virtual void SetCoreInstance( IVAInterface* pVACore ) = 0;
// Ausgabe-Stream setzen
virtual void SetOutputStream(std::ostream* posStdOut)=0;
......
This diff is collapsed.
......@@ -15,8 +15,7 @@
#include "VALuaCoreObject.h"
#include <VACore.h>
#include <VACoreVersion.h>
#include <VA.h>
#include <VistaTools/VistaFileSystemFile.h>
#include <VistaBase/VistaTimeUtils.h>
......@@ -27,7 +26,7 @@
// TODO: Memory-Leak wenn Core berschrieben wird
static IVACore* pGlobalVACore = NULL;
static IVAInterface* pGlobalVACore = NULL;
static std::ostream* pGlobalStdOut = NULL;
static std::ostream* pGlobalStdErr = NULL;
static std::atomic< int > g_iGlobalStatus = 0;
......@@ -137,37 +136,37 @@ static int lMan( lua_State *L )
<< std::endl << std::endl
<< " Listeners:" << std::endl << std::endl
<< " [int] core:CreateListener( name, auralizationMode ) Creates a new listener and returns its ID" << std::endl
<< " [int] core:DeleteListener( listenerID ) Delete listener and return 0 if a listener successfully deleted, else return -1" << std::endl
<< " [string] core:GetListenerName( listenerID ) Get listener name" << std::endl
<< " core:SetListenerName( listenerID, name ) Set listener name" << std::endl
<< " [int] core:GetListenerAuralizationMode( listenerID ) Return listener auralization mode " << std::endl
<< " core:SetListenerAuralizationMode( listenerID, auralizationMode ) Set listener auralization mode" << std::endl
<< " [int] core:GetActiveListener() Return active listeners ID" << std::endl
<< " core:SetActiveListener( listenerID ) Set active listener" << std::endl
<< " SoundReceivers:" << std::endl << std::endl
<< " [int] core:CreateSoundReceiver( name, auralizationMode ) Creates a new SoundReceiver and returns its ID" << std::endl
<< " [int] core:DeleteSoundReceiver( SoundReceiverID ) Delete SoundReceiver and return 0 if a SoundReceiver successfully deleted, else return -1" << std::endl
<< " [string] core:GetSoundReceiverName( SoundReceiverID ) Get SoundReceiver name" << std::endl
<< " core:SetSoundReceiverName( SoundReceiverID, name ) Set SoundReceiver name" << std::endl
<< " [int] core:GetSoundReceiverAuralizationMode( SoundReceiverID ) Return SoundReceiver auralization mode " << std::endl
<< " core:SetSoundReceiverAuralizationMode( SoundReceiverID, auralizationMode ) Set SoundReceiver auralization mode" << std::endl
<< " [int] core:GetActiveSoundReceiver() Return active SoundReceivers ID" << std::endl
<< " core:SetActiveSoundReceiver( SoundReceiverID ) Set active SoundReceiver" << std::endl
<< std::endl << std::endl
<< " core:SetListenerPosition( listenerID, x,y,z ) Set listener position" << std::endl
<< " core:SetListenerOrientationYPR( listenerID, yaw, pitch, roll) Set listener orientation (yaw, pitch, roll)" << std::endl
<< " core:SetListenerOrientationVU( listenerID, vx, vy, vz, ux, uy, uz ) Set listener orientation (view- and up-vector)" << std::endl
<< " core:SetListenerPositionOrientationYPR( listenerID, x, y, z, yaw, pitch, roll ) Set listener position and orientation (yaw-pitch-roll)" << std::endl
<< " core:SetListenerPositionOrientationVU( listenerID, px, py, pz, vx, vy, vz, ux, uy, uz ) Set listener position and orientation (position-, view- and up-vector)" << std::endl
<< " core:SetListenerPositionOrientationVelocityYPR( listenerID, x, y, z, yaw, pitch, roll, vx, velx, vely, velz ) Set listener position, orientation (yaw-pitch-roll) and velocity" << std::endl
<< " core:SetListenerPositionOrientationVelocityVU( listenerID, px, py, pz, vx, vy, vz, ux, uy, uz, vx, velx, vely, velz ) Set listener position, orientation (position-, view- and up-vector) and velocity" << std::endl
<< " x,y,z = core:GetListenerPosition( listenerID ) Get listener position" << std::endl
<< " yaw,pitch,roll = core:GetListenerOrientationYPR( listenerID ) Get listener orientation (yaw-pitch-roll angle)" << std::endl
<< " vx,vy,vz,ux,uy,uz = core:GetListenerOrientationVU( listenerID ) Get listener orientation (view- and up- vector)" << std::endl
<< " x,y,z,yaw,pitch,roll = core:GetListenerPositionOrientationYPR( listenerID ) Get listener position and orientation (yaw-pitch-roll)" << std::endl
<< " px,py,pz,vx,vy,vz,ux,uy,uz = core:GetListenerPositionOrientationVU( listenerID ) Get listener position and orientation (position-, view- and up-vector)" << std::endl
<< " x,y,z,yaw,pitch,roll,velx,vely,velz = core:GetListenerPositionOrientationVelocityYPR( listenerID ) Get listener position, orientation (yaw-pitch-roll) and velocity" << std::endl
<< " px,py,pz,vx,vy,vz,ux,uy,uz,velx,vely,velz = core:GetListenerPositionOrientationVelocityVU( listenerID ) Get listener position, orientation (position-, view- and up-vector) and velocity" << std::endl
<< " core:SetSoundReceiverPosition( SoundReceiverID, x,y,z ) Set SoundReceiver position" << std::endl
<< " core:SetSoundReceiverOrientationYPR( SoundReceiverID, yaw, pitch, roll) Set SoundReceiver orientation (yaw, pitch, roll)" << std::endl
<< " core:SetSoundReceiverOrientationVU( SoundReceiverID, vx, vy, vz, ux, uy, uz ) Set SoundReceiver orientation (view- and up-vector)" << std::endl
<< " core:SetSoundReceiverPositionOrientationYPR( SoundReceiverID, x, y, z, yaw, pitch, roll ) Set SoundReceiver position and orientation (yaw-pitch-roll)" << std::endl
<< " core:SetSoundReceiverPositionOrientationVU( SoundReceiverID, px, py, pz, vx, vy, vz, ux, uy, uz ) Set SoundReceiver position and orientation (position-, view- and up-vector)" << std::endl
<< " core:SetSoundReceiverPositionOrientationVelocityYPR( SoundReceiverID, x, y, z, yaw, pitch, roll, vx, velx, vely, velz ) Set SoundReceiver position, orientation (yaw-pitch-roll) and velocity" << std::endl
<< " core:SetSoundReceiverPositionOrientationVelocityVU( SoundReceiverID, px, py, pz, vx, vy, vz, ux, uy, uz, vx, velx, vely, velz ) Set SoundReceiver position, orientation (position-, view- and up-vector) and velocity" << std::endl
<< " x,y,z = core:GetSoundReceiverPosition( SoundReceiverID ) Get SoundReceiver position" << std::endl
<< " yaw,pitch,roll = core:GetSoundReceiverOrientationYPR( SoundReceiverID ) Get SoundReceiver orientation (yaw-pitch-roll angle)" << std::endl
<< " vx,vy,vz,ux,uy,uz = core:GetSoundReceiverOrientationVU( SoundReceiverID ) Get SoundReceiver orientation (view- and up- vector)" << std::endl
<< " x,y,z,yaw,pitch,roll = core:GetSoundReceiverPositionOrientationYPR( SoundReceiverID ) Get SoundReceiver position and orientation (yaw-pitch-roll)" << std::endl
<< " px,py,pz,vx,vy,vz,ux,uy,uz = core:GetSoundReceiverPositionOrientationVU( SoundReceiverID ) Get SoundReceiver position and orientation (position-, view- and up-vector)" << std::endl
<< " x,y,z,yaw,pitch,roll,velx,vely,velz = core:GetSoundReceiverPositionOrientationVelocityYPR( SoundReceiverID ) Get SoundReceiver position, orientation (yaw-pitch-roll) and velocity" << std::endl
<< " px,py,pz,vx,vy,vz,ux,uy,uz,velx,vely,velz = core:GetSoundReceiverPositionOrientationVelocityVU( SoundReceiverID ) Get SoundReceiver position, orientation (position-, view- and up-vector) and velocity" << std::endl
<< std::endl << std::endl
<< " Portals:" << std::endl << std::endl
<< " [String] core:GetPortalName( portalID ) Return portal name" << std::endl
<< " core:SetPortalName( portalID, name ) Set portal name" << std::endl
<< " SoundPortals:" << std::endl << std::endl
<< " [String] core:GetSoundPortalName( portalID ) Return portal name" << std::endl
<< " core:SetSoundPortalName( portalID, name ) Set portal name" << std::endl
<< std::endl << std::endl
......@@ -264,37 +263,37 @@ static int lHelp( lua_State *L )
<< std::endl << std::endl
<< " Listeners:" << std::endl << std::endl
<< " [int] core:CreateListener( name, auralizationMode ) Creates a new listener and returns its ID" << std::endl
<< " [int] core:DeleteListener( listenerID ) Delete listener and return 0 if a listener successfully deleted, else return -1" << std::endl
<< " [string] core:GetListenerName( listenerID ) Get listener name" << std::endl
<< " core:SetListenerName( listenerID, name ) Set listener name" << std::endl
<< " [int] core:GetListenerAuralizationMode( listenerID ) Return listener auralization mode " << std::endl
<< " core:SetListenerAuralizationMode( listenerID, auralizationMode ) Set listener auralization mode" << std::endl
<< " [int] core:GetActiveListener() Return active listeners ID" << std::endl
<< " core:SetActiveListener( listenerID ) Set active listener" << std::endl
<< " SoundReceivers:" << std::endl << std::endl
<< " [int] core:CreateSoundReceiver( name, auralizationMode ) Creates a new SoundReceiver and returns its ID" << std::endl
<< " [int] core:DeleteSoundReceiver( SoundReceiverID ) Delete SoundReceiver and return 0 if a SoundReceiver successfully deleted, else return -1" << std::endl
<< " [string] core:GetSoundReceiverName( SoundReceiverID ) Get SoundReceiver name" << std::endl
<< " core:SetSoundReceiverName( SoundReceiverID, name ) Set SoundReceiver name" << std::endl
<< " [int] core:GetSoundReceiverAuralizationMode( SoundReceiverID ) Return SoundReceiver auralization mode " << std::endl
<< " core:SetSoundReceiverAuralizationMode( SoundReceiverID, auralizationMode ) Set SoundReceiver auralization mode" << std::endl
<< " [int] core:GetActiveSoundReceiver() Return active SoundReceivers ID" << std::endl
<< " core:SetActiveSoundReceiver( SoundReceiverID ) Set active SoundReceiver" << std::endl
<< std::endl << std::endl
<< " core:SetListenerPosition( listenerID, x,y,z ) Set listener position" << std::endl
<< " core:SetListenerOrientationYPR( listenerID, yaw, pitch, roll) Set listener orientation (yaw, pitch, roll)" << std::endl
<< " core:SetListenerOrientationVU( listenerID, vx, vy, vz, ux, uy, uz ) Set listener orientation (view- and up-vector)" << std::endl
<< " core:SetListenerPositionOrientationYPR( listenerID, x, y, z, yaw, pitch, roll ) Set listener position and orientation (yaw-pitch-roll)" << std::endl
<< " core:SetListenerPositionOrientationVU( listenerID, px, py, pz, vx, vy, vz, ux, uy, uz ) Set listener position and orientation (position-, view- and up-vector)" << std::endl
<< " core:SetListenerPositionOrientationVelocityYPR( listenerID, x, y, z, yaw, pitch, roll, velx,vely,velz ) Set listener position, orientation (yaw-pitch-roll) and velocity" << std::endl
<< " core:SetListenerPositionOrientatioVelocitynVU( listenerID, px, py, pz, vx, vy, vz, ux, uy, uz, velx,vely,velz ) Set listener position, orientation (position-, view- and up-vector) and velocity" << std::endl
<< " x,y,z = core:GetListenerPosition( listenerID ) Get listener position" << std::endl
<< " yaw,pitch,roll = core:GetListenerOrientationYPR( listenerID ) Get listener orientation (yaw-pitch-roll angle)" << std::endl
<< " vx,vy,vz,ux,uy,uz = core:GetListenerOrientationVU( listenerID ) Get listener orientation (view- and up- vector)" << std::endl
<< " x,y,z,yaw,pitch,roll = core:GetListenerPositionOrientationYPR( listenerID ) Get listener position and orientation (yaw-pitch-roll)" << std::endl
<< " px,py,pz,vx,vy,vz,ux,uy,uz = core:GetListenerPositionOrientationVU( listenerID ) Get listener position and orientation (position-, view- and up-vector)" << std::endl
<< " x,y,z,yaw,pitch,roll,velx,vely,velz = core:GetListenerPositionOrientationVelocityYPR( listenerID ) Get listener position, orientation (yaw-pitch-roll) and velocity" << std::endl
<< " px,py,pz,vx,vy,vz,ux,uy,uz,velx,vely,velz = core:GetListenerPositionOrientationVelocityVU( listenerID ) Get listener position, orientation (position-, view- and up-vector) and velocity" << std::endl
<< " core:SetSoundReceiverPosition( SoundReceiverID, x,y,z ) Set SoundReceiver position" << std::endl
<< " core:SetSoundReceiverOrientationYPR( SoundReceiverID, yaw, pitch, roll) Set SoundReceiver orientation (yaw, pitch, roll)" << std::endl
<< " core:SetSoundReceiverOrientationVU( SoundReceiverID, vx, vy, vz, ux, uy, uz ) Set SoundReceiver orientation (view- and up-vector)" << std::endl
<< " core:SetSoundReceiverPositionOrientationYPR( SoundReceiverID, x, y, z, yaw, pitch, roll ) Set SoundReceiver position and orientation (yaw-pitch-roll)" << std::endl
<< " core:SetSoundReceiverPositionOrientationVU( SoundReceiverID, px, py, pz, vx, vy, vz, ux, uy, uz ) Set SoundReceiver position and orientation (position-, view- and up-vector)" << std::endl
<< " core:SetSoundReceiverPositionOrientationVelocityYPR( SoundReceiverID, x, y, z, yaw, pitch, roll, velx,vely,velz ) Set SoundReceiver position, orientation (yaw-pitch-roll) and velocity" << std::endl
<< " core:SetSoundReceiverPositionOrientatioVelocitynVU( SoundReceiverID, px, py, pz, vx, vy, vz, ux, uy, uz, velx,vely,velz ) Set SoundReceiver position, orientation (position-, view- and up-vector) and velocity" << std::endl
<< " x,y,z = core:GetSoundReceiverPosition( SoundReceiverID ) Get SoundReceiver position" << std::endl
<< " yaw,pitch,roll = core:GetSoundReceiverOrientationYPR( SoundReceiverID ) Get SoundReceiver orientation (yaw-pitch-roll angle)" << std::endl
<< " vx,vy,vz,ux,uy,uz = core:GetSoundReceiverOrientationVU( SoundReceiverID ) Get SoundReceiver orientation (view- and up- vector)" << std::endl
<< " x,y,z,yaw,pitch,roll = core:GetSoundReceiverPositionOrientationYPR( SoundReceiverID ) Get SoundReceiver position and orientation (yaw-pitch-roll)" << std::endl
<< " px,py,pz,vx,vy,vz,ux,uy,uz = core:GetSoundReceiverPositionOrientationVU( SoundReceiverID ) Get SoundReceiver position and orientation (position-, view- and up-vector)" << std::endl
<< " x,y,z,yaw,pitch,roll,velx,vely,velz = core:GetSoundReceiverPositionOrientationVelocityYPR( SoundReceiverID ) Get SoundReceiver position, orientation (yaw-pitch-roll) and velocity" << std::endl
<< " px,py,pz,vx,vy,vz,ux,uy,uz,velx,vely,velz = core:GetSoundReceiverPositionOrientationVelocityVU( SoundReceiverID ) Get SoundReceiver position, orientation (position-, view- and up-vector) and velocity" << std::endl
<< std::endl << std::endl
<< " Portals:" << std::endl << std::endl
<< " [String] core:GetPortalName( portalID ) Return portal name" << std::endl
<< " core:SetPortalName( portalID, name ) Set portal name" << std::endl
<< " SoundPortals:" << std::endl << std::endl
<< " [String] core:GetSoundPortalName( portalID ) Return portal name" << std::endl
<< " core:SetSoundPortalName( portalID, name ) Set portal name" << std::endl
<< std::endl << std::endl
......@@ -514,7 +513,7 @@ CVALuaShellImpl::CVALuaShellImpl()
// VACore Literale definieren
const std::vector<CVAIntLiteral>& oLits = IVACore::GetLiterals();
const std::vector<CVAIntLiteral>& oLits = IVAInterface::GetLiterals();
for( size_t i = 0; i < oLits.size(); i++ )
{
lua_pushinteger( L, oLits[ i ].iValue );
......@@ -530,12 +529,12 @@ CVALuaShellImpl::~CVALuaShellImpl()
ClearTimer();
}
IVACore* CVALuaShellImpl::GetCoreInstance()
IVAInterface* CVALuaShellImpl::GetCoreInstance()
{
return pGlobalVACore;
}
void CVALuaShellImpl::SetCoreInstance( IVACore* pVACore )
void CVALuaShellImpl::SetCoreInstance( IVAInterface* pVACore )
{
pGlobalVACore = pVACore;
......
......@@ -16,6 +16,8 @@
#include "VALuaShell.h"
class IVAInterface;
extern "C"
{
#include "lua.h"
......@@ -36,9 +38,9 @@ public:
~CVALuaShellImpl();
// TODO: Wie bauen?
static IVACore* GetCoreInstance();
static IVAInterface* GetCoreInstance();
void SetCoreInstance( IVACore* pVACore );
void SetCoreInstance( IVAInterface* pVACore );
void SetOutputStream( std::ostream* posStdOut );
void SetErrorStream( std::ostream* posStdErr );
......
Supports Markdown
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