source: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/SceneQuery.h @ 3101

Revision 3101, 923 bytes checked in by mattausch, 16 years ago (diff)

depth queries not working

RevLine 
[2764]1#ifndef _SCENEQUERY_H__
2#define _SCENEQUERY_H__
3
4#include "common.h"
5#include "AxisAlignedBox3.h"
6
[2800]7
[2776]8namespace CHCDemoEngine
[2764]9{
10
[2778]11class RenderTraverser;
[3101]12class RenderState;
[2778]13
[2764]14/** A simple class that computes the first intersection of a horizontal ray with
15        the scene. Can be used to "drop" objects in the scene.
16*/
17class SceneQuery
18{
19public:
20
[3101]21        SceneQuery(const AxisAlignedBox3 &sceneBox, RenderTraverser *traverser,
22                       RenderState *state);
[2843]23
[2796]24        ~SceneQuery() { DEL_ARRAY_PTR(mDepth); }
[2806]25        /** Calculates intersection of vertical ray at position pt.x, pt.y and
26            stores the intersection point if valid. returns true if the intersection
27                is valid.
28        */
[2764]29        bool CalcIntersection(Vector3 &pt);
30
[2806]31
[2764]32protected:
33
[2778]34        void Prepare(RenderTraverser *traverser);
[2764]35
36        ///////////
37
38        AxisAlignedBox3 mSceneBox;
[2796]39
[2808]40        //unsigned char *mDepth;
41        float *mDepth;
[3101]42
43        RenderState *mRenderState;
[2764]44};
45
46}
47
48#endif
Note: See TracBrowser for help on using the repository browser.