00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef __SCRIPTNODE_H_
00013 #define __SCRIPTNODE_H_
00014
00015 #include "scriptscenemanager.h"
00016
00017 #ifdef __WINDOWS__
00018 #pragma warning(disable:4290)
00019 #endif
00020
00021 namespace VRUT
00022 {
00024 class ScriptNode
00025 {
00026 private:
00028 Kernel *kernel;
00030 ScriptScene *ss;
00032 SCENE_ID sceneID;
00034 NODE_ID nodeID;
00035
00037 const SceneNode *getNode() throw(NodeScriptException, SceneScriptException);
00038
00039 public:
00040 ScriptNode(ScriptScene *_ss, SCENE_ID sid, NODE_ID nid)
00041 : ss(_ss), kernel(_ss->kernel), sceneID(sid), nodeID(nid) {}
00042
00043 NODE_ID GetID() throw(NodeScriptException, SceneScriptException)
00044 {
00045 return getNode()->GetID();
00046 }
00047
00048 const wxString & GetName() throw(NodeScriptException, SceneScriptException)
00049 {
00050 return getNode()->GetName();
00051 }
00052
00053 const wxString & GetUid() throw(NodeScriptException, SceneScriptException)
00054 {
00055 return getNode()->GetUid();
00056 }
00057
00058 const MATRIX * GetLocalTransMatrix() throw(NodeScriptException, SceneScriptException)
00059 {
00060 return getNode()->GetLocalTransMatrix();
00061 }
00062
00063 const MATRIX * GetWorldTransMatrix() throw(NodeScriptException, SceneScriptException)
00064 {
00065 return getNode()->GetWorldTransMatrix();
00066 }
00067
00068 const SceneNode::NodeIDList * GetChildren() throw(NodeScriptException, SceneScriptException)
00069 {
00070 return getNode()->GetChildren();
00071 }
00072
00073 NODE_ID GetParent() throw(NodeScriptException, SceneScriptException)
00074 {
00075 return getNode()->GetParent();
00076 }
00077
00078 bool IsValid() throw(NodeScriptException, SceneScriptException)
00079 {
00080 return getNode()->IsValid();
00081 }
00082
00083 bool IsActive() throw(NodeScriptException, SceneScriptException)
00084 {
00085 return getNode()->IsActive();
00086 }
00087
00088 SceneNode::SCENENODE_TYPE GetType() throw(NodeScriptException, SceneScriptException)
00089 {
00090 return getNode()->GetType();
00091 }
00092
00093 bool IsOfType(SceneNode::SCENENODE_TYPE _type) throw(NodeScriptException, SceneScriptException)
00094 {
00095 return getNode()->IsOfType(_type);
00096 }
00097
00098 };
00099
00100 }
00101
00102 #endif
00103