Go to the documentation of this file.00001
00019
00020 class NxScene;
00021 class NxCapsuleController;
00022 class NxCapsuleControllerDesc;
00023 class NxD6Joint;
00024
00025 namespace Ovgl
00026 {
00027 extern "C"
00028 {
00029 class Actor;
00030 class Camera;
00031 class Light;
00032 class Prop;
00033 class Scene;
00034 class Mesh;
00035 class CMesh;
00036 class AudioEmitter;
00037 class AudioVoice;
00038 class Instance;
00039 class Effect;
00040 class Joint;
00041 class Vector3;
00042
00047 class __declspec(dllexport) RayHit
00048 {
00049 public:
00050 DWORD type;
00051 Ovgl::CMesh* cmesh;
00052 Ovgl::Prop* prop;
00053 Ovgl::Actor* actor;
00054 Ovgl::Vector3 loc_point;
00055 Ovgl::Vector3 ws_point;
00056 };
00057
00062 class __declspec(dllexport) Joint
00063 {
00064 public:
00065 Scene* scene;
00066 NxD6Joint* joint;
00067 void Release();
00068 };
00069
00074 class __declspec(dllexport) Camera
00075 {
00076 public:
00080 Scene* scene;
00084 CMesh* cmesh;
00088 Matrix44 projMat;
00092 std::vector<AudioVoice*> voices;
00097 void setPose( Matrix44* matrix );
00101 Matrix44 getPose();
00105 void Release();
00106 };
00107
00111 class __declspec(dllexport) Light
00112 {
00113 public:
00117 Scene* scene;
00121 CMesh* cmesh;
00125 Vector3 color;
00129 DWORD type;
00134 void setPose( Matrix44* matrix );
00138 Matrix44 getPose();
00142 void Release();
00143 };
00144
00149 class __declspec(dllexport) Prop
00150 {
00151 public:
00155 Scene* scene;
00159 Mesh* mesh;
00163 std::vector<CMesh*> bones;
00167 std::vector<Effect*> subsets;
00171 std::vector<Matrix44> matrices;
00175 std::vector<Joint*> joints;
00179 std::vector<Animation*> animations;
00185 void Update( int bone, Matrix44* matrix );
00190 void CreateJoints( DWORD bone );
00191
00192
00193
00194 Animation* CreateAnimation( float current, float start, float end );
00199 void setPose( Matrix44* matrix );
00203 Matrix44 getPose();
00207 void Release();
00208 };
00209
00214 class __declspec(dllexport) Object
00215 {
00216 public:
00220 Scene* scene;
00224 CMesh* cmesh;
00228 Mesh* mesh;
00232 std::vector<Effect*> subsets;
00237 void setPose( Matrix44* matrix );
00241 Matrix44 getPose();
00245 void Release();
00246 };
00247
00252 class __declspec(dllexport) Emitter
00253 {
00254 public:
00258 Scene* scene;
00262 CMesh* cmesh;
00267 void setPose( Matrix44* matrix );
00271 Matrix44 getPose();
00275 void Release();
00276 };
00277
00278 class __declspec(dllexport) Actor
00279 {
00280 public:
00284 NxCapsuleController* controller;
00288 NxCapsuleControllerDesc* desc;
00292 Scene* scene;
00296 Camera* camera;
00300 CMesh* cmesh;
00304 Mesh* mesh;
00308 Vector3 trajectory;
00312 Vector3 direction;
00316 Vector3 velocity;
00320 RayHit hit;
00324 bool crouch;
00328 bool grounded;
00332 void SetTrajectory( Vector3 vec );
00336 void SetDirection( Vector3 vec );
00341 void Jump( float force );
00345 void Release();
00346 };
00347
00352 class __declspec(dllexport) Scene
00353 {
00354 public:
00358 Instance* Inst;
00362 NxScene* physics_scene;
00366 std::vector<Object*> objects;
00370 std::vector<Light*> lights;
00374 std::vector<Camera*> cameras;
00378 std::vector<Prop*> props;
00382 std::vector<Actor*> actors;
00386 std::vector<Emitter*> emitters;
00393 Light* CreateLight( Matrix44* matirx, Vector4* color );
00398 Camera* CreateCamera( Matrix44* view_matrix );
00406 Actor* CreateActor( Mesh* mesh, float radius, float height, Matrix44* matirx );
00412 Prop* CreateProp( Mesh* mesh, Matrix44* matrix);
00418 Object* CreateObject( Mesh* mesh, Matrix44* matrix);
00423 Emitter* CreateEmitter( Matrix44* matrix );
00428 void Update( DWORD update_time );
00433 void Save( const std::string& file, DWORD flags );
00438 void Load( const std::string& file, DWORD flags );
00443 void Import_FBX( const std::string& file, DWORD flags );
00447 void Release();
00448 };
00449 }
00450 }