Changeset 143 for trunk/VUT/GtpVisibility
- Timestamp:
- 06/21/05 18:14:30 (20 years ago)
- Location:
- trunk/VUT/GtpVisibility
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibility/include/DummyQueryManager.h
r65 r143 25 25 InfoContainer<NodeInfo> *visibleNodes, 26 26 InfoContainer<MeshInfo> *visibleGeometry, 27 bool relativeVisibility= false27 bool projectedPixels = false 28 28 ); 29 29 … … 35 35 InfoContainer<NodeInfo> *visibleNodes, 36 36 InfoContainer<MeshInfo> *visibleGeometry, 37 bool relativeVisibility= false37 bool projectedPixels = false 38 38 ); 39 39 -
trunk/VUT/GtpVisibility/include/QueryManager.h
r130 r143 41 41 If NULL no visible meshes are not evaluated. 42 42 43 @param relativeVisibilityIf true the visibility member for43 @param projectedPixels If true the visibility member for 44 44 NodeInfo and MeshInfo represent relative visibility; i.e. the number of visible 45 45 pixels divided by the the number of projected pixels. … … 51 51 InfoContainer<NodeInfo> *visibleNodes, 52 52 InfoContainer<MeshInfo> *visibleGeometry, 53 bool relativeVisibility= false53 bool projectedPixels = false 54 54 ) = 0; 55 55 … … 62 62 InfoContainer<NodeInfo> *visibleNodes, 63 63 InfoContainer<MeshInfo> *visibleGeometry, 64 bool relativeVisibility= false64 bool projectedPixels = false 65 65 ) = 0; 66 66 -
trunk/VUT/GtpVisibility/include/VisibilityInfo.h
r141 r143 14 14 { 15 15 public: 16 NodeInfo(HierarchyNode *node,const float v): mNode(node), mVisibility(v) {} 16 NodeInfo(HierarchyNode *node, const int projectedPixels, const int visiblePixels): 17 mNode(node)//, mProjectedPixels(projectedPixels), mVisiblePixels(visiblePixels) 18 {} 17 19 18 float GetVisibility() const {return mVisibility;} 19 void SetVisibility(float vis) { mVisibility = vis;} 20 bool operator<(const NodeInfo& rhs) const {return mNode < rhs.mNode;} 21 //bool operator>(const NodeInfo& rhs) const {return mNode > rhs.mNode;} 22 //bool operator==(const NodeInfo& rhs) const {return mNode == rhs.mNode;} 20 int GetVisiblePixels() const {return mVisiblePixels;} 21 int GetProjectedPixels() const {return mProjectedPixels;} 22 23 void SetVisiblePixels(int vis) {mVisiblePixels = vis;} 24 void SetProjectedPixels(int vis) {mProjectedPixels = vis;} 25 26 void SetNode(HierarchyNode *node) {mNode = node;} 27 HierarchyNode *GetNode() const {return mNode;} 28 29 //bool operator<(const NodeInfo& rhs) const {return mNode < rhs.mNode;} 23 30 24 31 protected: … … 26 33 /** pointer to the scene node */ 27 34 HierarchyNode *mNode; 28 /** node visibility can either be a number of visible pixels or relative 29 number of visible pixels (if the hardware queries will provide the 30 total number of ratsterized pixels */ 31 float mVisibility; 35 36 int mVisiblePixels; 37 int mProjectedPixels; 32 38 }; 33 39 … … 37 43 { 38 44 public: 39 MeshInfo(Mesh *mesh, const float v): mMesh(mesh), mVisibility(v) {} 45 MeshInfo(Mesh *mesh, const int projectedPixels, const int visiblePixels): 46 mMesh(mesh), mProjectedPixels(projectedPixels), mVisiblePixels(visiblePixels) 47 {} 40 48 41 float GetVisibility() const {return mVisibility;} 42 void SetVisibility(float vis) { mVisibility = vis;} 49 int GetVisiblePixels() const {return mVisiblePixels;} 50 int GetProjectedPixels() const {return mProjectedPixels;} 51 52 void SetVisiblePixels(float vis) { mVisiblePixels = vis;} 53 void SetProjectedPixels(float vis) { mProjectedPixels = vis;} 54 55 Mesh *GetMesh() const {return mMesh;} 56 void SetMesh(Mesh *mesh) {mMesh = mesh;} 43 57 44 58 bool operator<(const MeshInfo& rhs) const {return mMesh < rhs.mMesh;} … … 51 65 */ 52 66 Mesh *mMesh; 53 /** Node visibility can either be a number of visible pixels or relative 54 number of visible pixels (if the hardware queries will provide the 55 total number of ratsterized pixels. 56 */ 57 float mVisibility; 67 68 int mVisiblePixels; 69 int mProjectedPixels; 58 70 }; 59 71 60 72 //TODO: this define shall be replaced by template typedef 61 //#define InfoContainer std::vector62 #define InfoContainer std::set73 #define InfoContainer std::vector 74 //#define InfoContainer std::set 63 75 }; 64 76 -
trunk/VUT/GtpVisibility/src/DummyQueryManager.cpp
r141 r143 11 11 InfoContainer<NodeInfo> *visibleNodes, 12 12 InfoContainer<MeshInfo> *visibleGeometry, 13 bool relativeVisibility13 bool projectedPixels 14 14 ) 15 15 { 16 visibleNodes-> insert(NodeInfo(mHierarchyInterface->GetSceneRoot(), 1.0f));16 visibleNodes->push_back(NodeInfo(mHierarchyInterface->GetSceneRoot(), 0, 0)); 17 17 18 18 // HierarchyInterface::MeshIterator *mi = … … 30 30 InfoContainer<NodeInfo> *visibleNodes, 31 31 InfoContainer<MeshInfo> *visibleGeometry, 32 bool relativeVisibility32 bool projectedPixels 33 33 ) 34 34 { 35 visibleNodes-> insert(NodeInfo(mHierarchyInterface->GetSceneRoot(), 1.0f));35 visibleNodes->push_back(NodeInfo(mHierarchyInterface->GetSceneRoot(), 0, 0)); 36 36 37 37 // HierarchyInterface::MeshIterator *mi =
Note: See TracChangeset
for help on using the changeset viewer.