20 #include "vtdata/RoadMap.h"
21 #include "vtdata/HeightField.h"
24 #define ROAD_CLUSTER 16
38 return (
class LinkGeom *)m_connect[n].pLink;
40 void BuildIntersection();
42 vtMesh *GenerateGeometry();
44 FPoint3 GetUnitLinkVector(
int i);
45 const FPoint3 &GetAdjacentRoadpoint(
int iLinkNumber);
68 enum normal_direction {
93 out.x = m_rect.left + in.x * (m_rect.right - m_rect.left);
94 out.y = m_rect.bottom + in.y * (m_rect.top - m_rect.bottom);
129 FPoint3 FindPointAlongRoad(
float fDistance);
135 float offset_left,
float offset_right,
136 float height_left,
float height_right,
138 float u1,
float u2,
float uv_scale,
139 normal_direction nd);
152 std::vector<FLine3> m_Lanes;
172 void BuildIntersections();
173 void AddMeshToGrid(
vtMesh *pMesh,
int iMatIdx);
174 vtGroup *GenerateGeometry(
bool do_texture,
bool progress_callback(
int) = NULL);
176 vtGroup *GetGroup() {
return m_pGroup; }
177 void SetHeightOffGround(
float fHeight) { s_fHeight = fHeight; }
178 void DetermineSurfaceAppearance();
180 void SetLodDistance(
float fDistance);
181 float GetLodDistance();
184 static float s_fHeight;
198 void _CreateMaterials(
bool do_texture);
199 void _GatherExtents();
202 vtMaterialArrayPtr m_pMats;
204 vtLOD *m_pRoads[ROAD_CLUSTER][ROAD_CLUSTER];
207 float m_fLodDistance;
209 typedef osg::ref_ptr<vtRoadMap3d> vtRoadMap3dPtr;