Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/scriptimprovements/src/lib/script_engine/lua_vector.h @ 10607

Last change on this file since 10607 was 10562, checked in by snellen, 18 years ago

LuaVector is now really added to te repository

File size: 1.1 KB
Line 
1/*
2   orxonox - the future of 3D-vertical-scrollers
3
4   Copyright (C) 2004 orx
5
6   This program is free software; you can redistribute it and/or modify
7   it under the terms of the GNU General Public License as published by
8   the Free Software Foundation; either version 2, or (at your option)
9   any later version.
10
11### File Specific:
12   main-programmer: Silvan Nellen
13   co-programmer: ...
14*/
15
16/*!
17 * @file lua_vector.h
18 * A class derived of Vector to be used in Lua
19 *
20 * It does the same as Vector, but it is a BaseObject and therefore can be made scriptable.
21*/
22
23#ifndef __LUA_VECTOR_H_
24#define __LUA_VECTOR_H_
25
26
27#include "base_object.h"
28#include "vector.h"
29
30//! 3D LuaVector
31/**
32        A special class to handle 3D Vectors in Lua
33*/
34class LuaVector : public Vector, public BaseObject {
35
36//! Declare an ObjectList...
37  ObjectListDeclaration(LuaVector);
38
39public:
40  LuaVector(float x, float y, float z): Vector(z,y,z) {  this->registerObject(this, LuaVector::_objectList); }
41  LuaVector(): Vector(0,0,0) {}
42 
43  float getX(){return this->x;}
44  float getY(){return this->y;}
45  float getZ(){return this->z;}
46
47};
48
49
50#endif /* _LUA_VECTOR_H */
Note: See TracBrowser for help on using the repository browser.