Logo Search packages:      
Sourcecode: qcake version File versions  Download package


                          scripting.hpp  -  description
    begin                : Mit Sep 19 13:11:41 CEST 2007
    copyright            : (C) 2007 by Harald Krippel
    email                : harald@the-develop.net

 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *

      @author Harald Krippel <harald@the-develop.net>

#include <QtGui>

class FolderListItem;
class splaModel;

class QcakeScriptApi : public QObject


  static QcakeScriptApi *theInstance(QObject *parent=0);

    /** construtor */
  QcakeScriptApi(QObject *parent=0);
    /** destructor */
  void Init (FolderListItem *item);
  void Redraw ();
//  int getRef ( int id , FolderListItem *item);

  public slots: // these functions (slots) will be available in Qt Script

  splaModel *getModel ( int i );
  float getPositionX(int hh);
  float getPositionY(int hh);
  float getPositionZ(int hh);
  float getPositionH(int hh);
  float getPositionP(int hh);
  float getPositionR(int hh);
  float getJoystick ( int js,int a );
  int getJoyButton (int js);
  int getRef ( int id );
  void addRelTorque ( int hh, float velx, float vely, float velz );
  void addRelForce ( int hh, float velx, float vely, float velz );
  int switchScene ( int hh);
  int switchCamera ( int hh);
  void setSequence ( int hh, int sequence, int mode );
  void setAngularVel ( int hh, float velx, float vely, float velz );
  void setLinVel ( int hh, float velx, float vely, float velz );
  void setRotation ( int hh, float h, float p, float r );
  void rotation ( int hh, float h, float p, float r );
  void setPosition ( int hh, float x, float y, float z, float h, float p, float r );
  void playSound ( int hh);
  void stopSound ( int hh);
  int getMouse ( int a );
  int getMouseButton (void);
  float get3DMouse ( int a );
  QString getAttribute ( int hh, char * attr);
  int setAttribute ( int hh, char * attr, char * value);
  int getKey ();
  int srand (unsigned int seed);
  float rand ();
  int astarFindPath (int pl,int sx,int sy,int tx,int ty);
  int astarReadPathX (int pl,int sx);
  int astarReadPathY (int pl,int sy);
  int astarReadMap (const QString &file);
  int astarReadMapValue (int x, int y);
  int astarInit (int mapWidth, int mapHeight , int tileSize, int numberPeople);
  int tmpobjInit (int hh, float x , float y, float z, float h , float p, float r, int id);
  void debug(const QString &msg);

  FolderListItem *inititem;  // id from tree

   static QcakeScriptApi *theInstancePtr;



Generated by  Doxygen 1.6.0   Back to index