31 #ifndef INCLUDE_ARTICULATION_SCENE_H_ 32 #define INCLUDE_ARTICULATION_SCENE_H_ 34 #include <gpu_coverage/Light.h> 35 #include <gpu_coverage/Material.h> 36 #include <gpu_coverage/Mesh.h> 37 #include <gpu_coverage/Node.h> 38 #include <gpu_coverage/Animation.h> 39 #include <gpu_coverage/CameraPanorama.h> 40 #include <gpu_coverage/CameraPerspective.h> 41 #include <gpu_coverage/Image.h> 42 #include <gpu_coverage/Programs.h> 66 Scene(
const aiScene *
const aiScene,
const std::string& dir);
86 const bool hasTesselationShader =
false)
const;
116 typedef std::vector<CameraPerspective*>
Cameras;
179 void toDot(
const char* dotFilePath)
const;
182 void collectNodes(
Node * node);
Textures textures
Vector of mesh textures of the scene.
Definition: Scene.h:130
std::vector< Material * > Materials
Vector of materials of the scene.
Definition: Scene.h:118
Cameras cameras
Vector of cameras of the sceene.
Definition: Scene.h:127
PanoramaCameras panoramaCameras
Vector of panorama cameras of the scene.
Definition: Scene.h:128
void toDot(const char *dotFilePath) const
Write the scene graph structure as a GraphViz Dot file for debugging.
Locations of light source shader variables.
Definition: Programs.h:125
size_t endFrame
Last animation frame, see getEndFrame().
Definition: Scene.h:186
Meshes meshes
Vector of meshes of the scene.
Definition: Scene.h:126
Scene(const aiScene *const aiScene, const std::string &dir)
Constructor.
Materials materials
Vector of materials of the scene.
Definition: Scene.h:131
std::vector< Animation * > Animations
Vector of animations of the scene.
Definition: Scene.h:121
const Channels & getChannels() const
Definition: Scene.h:163
CameraPanorama * makePanoramaCamera(Node *const camera)
Adds a new panorama camera to the scene and returns a pointer.
Scene graph corresponding to Assimp's aiScene.
Definition: Scene.h:59
Scene graph node, corresponding to Assimp's aiNode.
Definition: Node.h:52
const size_t & getStartFrame() const
Returns the start frame of the animation.
Definition: Scene.h:148
CameraPerspective * findCamera(const std::string &name) const
Finds a camera by name, returns NULL if not found.
Locations of material shader variables.
Definition: Programs.h:142
Node * root
Root node of the scene graph.
Definition: Scene.h:134
std::vector< CameraPerspective * > Cameras
Vector of cameras of the sceene.
Definition: Scene.h:116
const size_t & getEndFrame() const
Returns the last frame of the animation.
Definition: Scene.h:155
void render(const AbstractCamera *const camera, const LocationsMVP *const locationsMVP, const LocationsLight *const locationsLight=NULL, const LocationsMaterial *const locationsMaterial=NULL, const bool hasTesselationShader=false) const
Render the scene with the current shader.
Perspective projection camera.
Definition: CameraPerspective.h:45
std::vector< Light * > Lights
Vector of light sources of the scene.
Definition: Scene.h:117
Node * findNode(const std::string &name) const
Finds a node by name, returns NULL if not found.
std::vector< Mesh * > Meshes
Vector of meshes of the scene.
Definition: Scene.h:119
Locations of model, view, and projection shader variables.
Definition: Programs.h:104
std::vector< Image * > Textures
Vector of mesh textures of the scene.
Definition: Scene.h:120
virtual ~Scene()
Destructor.
Animations animations
Vector of animations of the scene.
Definition: Scene.h:132
const size_t & getNumFrames() const
Returns the number of animation frames.
Definition: Scene.h:141
Definition: AbstractCamera.h:41
Node * getRoot() const
Get the root node of the scene graph.
Definition: Scene.h:171
Abstract superclass for all cameras.
Definition: AbstractCamera.h:48
std::vector< Channel * > Channels
Vector of animation channels of the scene.
Definition: Scene.h:124
Represents a mesh material corresponding to Assimp's aiMaterial.
Definition: Material.h:43
size_t startFrame
First animation frame, see getStartFrame().
Definition: Scene.h:185
std::map< std::string, Node * > NodeMap
Map mapping node names to node pointers.
Definition: Scene.h:123
size_t numFrames
Number of animation frames, see getNumFrames().
Definition: Scene.h:184
Material * findMaterial(const std::string &name) const
Finds a material by name, returns NULL if not found.
std::vector< CameraPanorama * > PanoramaCameras
Vector of panorama cameras of the scene.
Definition: Scene.h:122
Channels channels
Vector of animation channels of the scene.
Definition: Scene.h:133
Omnidirectional panorama camera.
Definition: CameraPanorama.h:44
NodeMap nodeMap
Map mapping node names to node pointers.
Definition: Scene.h:125
gpu_coverage::Node * lampNode
Scene graph node where the first light source is attached.
Definition: Scene.h:135
Lights lights
Vector of light sources of the scene.
Definition: Scene.h:129