Overview   Project   Class   Tree   Deprecated   Index 
0 A.D.
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD

graphics
Class CHFTracer

   in HFTracer.h
   in HFTracer.cpp

class CHFTracer


Field Summary
private float m_CellSize
          
private const u16* m_Heightfield
          
private float m_HeightScale
          
private u32 m_MapSize
          
private CTerrain* m_pTerrain
          
 
Constructor Summary
CHFTracer( CTerrain* pTerrain )
          RayTriIntersect: intersect a ray with triangle defined by vertices v0,v1,v2; return true if ray hits triangle at distance less than dist, or false otherwise
 
Method Summary
private bool CellIntersect( int cx, int cz, CVector3D& origin, CVector3D& dir, float& dist ) const
          RayIntersect: intersect ray with this heightfield; return true if intersection occurs (and fill in grid coordinates of intersection), or false otherwise
 bool RayIntersect( CVector3D& origin, CVector3D& dir, int& x, int& z, CVector3D& ipt ) const
          
private bool RayTriIntersect( const CVector3D& v0, const CVector3D& v1, const CVector3D& v2, const CVector3D& origin, const CVector3D& dir, float& dist ) const
          CellIntersect: test if ray intersects either of the triangles in the given cell - return hit result, and distance to hit, if hit occurred
 

Field Detail

m_CellSize

private float m_CellSize;

m_Heightfield

private const u16* m_Heightfield;

m_HeightScale

private float m_HeightScale;

m_MapSize

private u32 m_MapSize;

m_pTerrain

private CTerrain* m_pTerrain;


Constructor Detail

CHFTracer

public CHFTracer( CTerrain* pTerrain );
RayTriIntersect: intersect a ray with triangle defined by vertices v0,v1,v2; return true if ray hits triangle at distance less than dist, or false otherwise


Method Detail

CellIntersect

private bool CellIntersect( int cx, int cz, CVector3D& origin, CVector3D& dir, float& dist ) const;
RayIntersect: intersect ray with this heightfield; return true if intersection occurs (and fill in grid coordinates of intersection), or false otherwise

RayIntersect

public bool RayIntersect( CVector3D& origin, CVector3D& dir, int& x, int& z, CVector3D& ipt ) const;

RayTriIntersect

private bool RayTriIntersect( const CVector3D& v0, const CVector3D& v1, const CVector3D& v2, const CVector3D& origin, const CVector3D& dir, float& dist ) const;
CellIntersect: test if ray intersects either of the triangles in the given cell - return hit result, and distance to hit, if hit occurred

 Overview   Project   Class   Tree   Deprecated   Index 
0 A.D.
Generated on September 04, 2007 at 18:13
CppDoc v2.4.0
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD