#include <simgear/math/sg_geodesy.hxx>
#include <simgear/math/sg_types.hxx>
#include <simgear/misc/texcoord.hxx>
#include <simgear/math/sg_geodesy.hxx>
#include <simgear/math/sg_types.hxx>
#include <simgear/misc/texcoord.hxx>
- void calcMesh(const SGVec3d& cartCenter, double clon, double clat,
+ void calcMesh(const SGVec3d& cartCenter, const SGQuatd& orient,
+ double clon, double clat,
double height, double width, double tex_width);
void calcApronPt(int latIdx, int lonIdx, int latInner, int lonInner,
int destIdx, double tex_width);
double height, double width, double tex_width);
void calcApronPt(int latIdx, int lonIdx, int latInner, int lonInner,
int destIdx, double tex_width);
-void OceanMesh::calcMesh(const SGVec3d& cartCenter, double clon, double clat,
+void OceanMesh::calcMesh(const SGVec3d& cartCenter, const SGQuatd& orient,
+ double clon, double clat,
double height, double width, double tex_width)
{
// Calculate vertices. By splitting the tile up into 4 quads on a
double height, double width, double tex_width)
{
// Calculate vertices. By splitting the tile up into 4 quads on a
for (int i = 0; i < lonPoints; i++) {
geod[j][i] = SGGeod::fromDeg(startLon + i * longInc, lat);
SGVec3d cart = SGVec3d::fromGeod(geod[j][i]);
for (int i = 0; i < lonPoints; i++) {
geod[j][i] = SGGeod::fromDeg(startLon + i * longInc, lat);
SGVec3d cart = SGVec3d::fromGeod(geod[j][i]);
} else {
SG_LOG( SG_TERRAIN, SG_ALERT, "Ack! unknown use material name = Ocean");
}
OceanMesh grid;
// Calculate center point
SGVec3d cartCenter = SGVec3d::fromGeod(b.get_center());
} else {
SG_LOG( SG_TERRAIN, SG_ALERT, "Ack! unknown use material name = Ocean");
}
OceanMesh grid;
// Calculate center point
SGVec3d cartCenter = SGVec3d::fromGeod(b.get_center());
double clon = b.get_center_lon();
double clat = b.get_center_lat();
double height = b.get_height();
double width = b.get_width();
double clon = b.get_center_lon();
double clat = b.get_center_lat();
double height = b.get_height();
double width = b.get_width();
- grid.calcMesh(cartCenter, clon, clat, height, width, tex_width);
+ grid.calcMesh(cartCenter, hlOr, clon, clat, height, width, tex_width);
+ 2 * (latPoints - 1)));
fillDrawElementsWithApron(latPoints, lonPoints, drawElements->begin());
geometry->addPrimitiveSet(drawElements);
+ 2 * (latPoints - 1)));
fillDrawElementsWithApron(latPoints, lonPoints, drawElements->begin());
geometry->addPrimitiveSet(drawElements);
geode->addDrawable(geometry);
osg::MatrixTransform* transform = new osg::MatrixTransform;
transform->setName("Ocean");
geode->addDrawable(geometry);
osg::MatrixTransform* transform = new osg::MatrixTransform;
transform->setName("Ocean");