This class contains a set of objects that make up a 3D scene. More...
#include <OvglScene.h>
Public Member Functions | |
Light * | CreateLight (Matrix44 *matirx, Vector4 *color) |
Camera * | CreateCamera (Matrix44 *view_matrix) |
Actor * | CreateActor (Mesh *mesh, float radius, float height, Matrix44 *matirx) |
Prop * | CreateProp (Mesh *mesh, Matrix44 *matrix) |
Object * | CreateObject (Mesh *mesh, Matrix44 *matrix) |
Emitter * | CreateEmitter (Matrix44 *matrix) |
void | Update (DWORD update_time) |
void | Save (const std::string &file, DWORD flags) |
void | Load (const std::string &file, DWORD flags) |
void | Import_FBX (const std::string &file, DWORD flags) |
void | Release () |
Public Attributes | |
Instance * | Inst |
NxScene * | physics_scene |
std::vector< Object * > | objects |
std::vector< Light * > | lights |
std::vector< Camera * > | cameras |
std::vector< Prop * > | props |
std::vector< Actor * > | actors |
std::vector< Emitter * > | emitters |
This class contains a set of objects that make up a 3D scene.
Scenes contain all the 3D objects that you will see on the screen such as lights, cameras, props, and actors. They also maintain the physics scene and objects.
This function adds a Ovgl::Actor to the scene.
mesh | The mesh object that will be displayed for the actor. |
radius | The radius of the actor's capsule within the physics scene which is the distance at which a character comes in contact with objects in the character's vertical plane. |
height | The hieght of the actor's capsule within the physics scene which is the distance at which a character comes in contact with objects in the character's horizontal plane. |
matrix | The matrix which defines the the starting pose of the actor. |
This function adds a Ovgl::Camera to the scene.
matrix | The matrix which defines the the starting pose of the camera. |
This function adds a Ovgl::Emitter to the scene.
matrix | The matrix which defines the starting pose of the emitter. |
This function adds a Ovgl::Light to the scene.
This function adds a Ovgl::Prop to the scene.
mesh | The mesh that will be displayed for the object. |
matrix | The matrix which defines the pose of the object. |
This function adds a Ovgl::Prop to the scene.
mesh | The mesh that will be displayed for the prop. |
matrix | The matrix which defines the the starting pose of the prop. |
void Ovgl::Scene::Import_FBX | ( | const std::string & | file, |
DWORD | flags | ||
) |
This function loads a scene from the FBX format.
file | The file to load. |
void Ovgl::Scene::Load | ( | const std::string & | file, |
DWORD | flags | ||
) |
This function loads a scene from the engine's native format.
file | The file to load. |
void Ovgl::Scene::Release | ( | ) |
This function will release control of all memory associated with the scene and any objects within it. It will also remove any reference to it from the Ovgl::Instance.
void Ovgl::Scene::Save | ( | const std::string & | file, |
DWORD | flags | ||
) |
This function saves all objects in the scene out to the engine's native format.
file | The file to save. |
void Ovgl::Scene::Update | ( | DWORD | update_time ) |
This function updates the animations, audio emition points, and the physics objects of the scene.
update_time | The amount of time that has passed since the last scene update. |
std::vector<Actor*> Ovgl::Scene::actors |
This array contains all actors within the scene..
std::vector<Camera*> Ovgl::Scene::cameras |
This array contains all cameras within the scene..
std::vector<Emitter*> Ovgl::Scene::emitters |
This array contains all emitters within the scene..
This is a pointer to the Ovgl instance that created the scene.
std::vector<Light*> Ovgl::Scene::lights |
This array contains all lights within the scene..
std::vector<Object*> Ovgl::Scene::objects |
This array contains all static objects on the set.
NxScene* Ovgl::Scene::physics_scene |
This is a pointer to the PhysX scene.
std::vector<Prop*> Ovgl::Scene::props |
This array contains all props within the scene..