source: GTP/trunk/App/Demos/Illum/pathmap/Entity.h @ 2197

Revision 2197, 1.2 KB checked in by szirmay, 17 years ago (diff)
Line 
1#pragma once
2
3#include <vector>
4#include "Vector.hpp"
5#include "Radion.hpp"
6#include "RenderStrategy.h"
7#include "SubEntity.h"
8
9class Entity
10{
11        friend class SubEntity;
12        friend class DepthRenderStrategy;
13        friend class FinalCompositionRenderStrategy;
14        D3DXMATRIX      modelWorldTransform;    //!< modeling transform
15        D3DXMATRIX      inverseTransposedModelWorldTransform;   //!< IT modeling transform for surface normal transformation
16
17        char name[256];
18        char prmFileName[256];
19        Mesh* mesh;
20        unsigned int nNearClusters;
21
22        std::vector<SubEntity*> subEntities;
23
24        float surfaceArea;
25public:
26        Entity(Mesh* baseMesh, const char* entityName, const char* prmFileName, const D3DXMATRIX& trafo, int nNearClusters);
27        ~Entity(void);
28
29        void renderPRM( std::vector<Radion>& clusterRadions, unsigned int clusterId);
30        void normalizePRM();
31        void clearPRM();
32        void drawAllSubEntities(const RenderStrategy& renderStrategy);
33        float getSurfaceArea();
34
35        void findNearClusters(const std::vector<Radion>& starters, unsigned int nClusters);
36
37        void gatherRayTraceEntities(std::vector<Intersectable*>& rayTraceEntities);
38
39        const Material* sampleSurface(Radion& sample);
40
41        void loadPRM();
42        void savePRM();
43
44        void saveSceneInfo(std::ofstream& psf);
45};
Note: See TracBrowser for help on using the repository browser.