List of all members.
Detailed Description
Definition at line 32 of file Patch.
Constructor & Destructor Documentation
seamless::Patch::Patch |
( |
| ) |
|
seamless::Patch::Patch |
( |
const Patch & |
rhs, |
|
|
const osg::CopyOp & |
copyop = osg::CopyOp::SHALLOW_COPY |
|
) |
| |
seamless::Patch::~Patch |
( |
| ) |
[protected] |
Member Function Documentation
BoundingSphere seamless::Patch::computeBound |
( |
| ) |
const [virtual] |
Definition at line 262 of file Patch.cpp.
{
BoundingSphere bsphere;
if (!_trile[0][0].valid())
return bsphere;
BoundingBox bb;
bb.init();
for (int res = 0; res < 2; ++res)
for (int i = 0; i < 4; ++i)
bb.expandBy(_trile[res][i]->getBoundingBox());
for (int strip = 0; strip < 4; ++strip)
for (int i = 0; i < 4; ++i)
bb.expandBy(_strip[strip][i]->getBoundingBox());
if (!bb.valid())
return bsphere;
bsphere.expandBy(bb);
return bsphere;
}
void seamless::Patch::dirtyVertexData |
( |
| ) |
|
Dirty vertex data. A convenience method.
Definition at line 90 of file Patch.cpp.
{
Geometry::ArrayData& vdata = _data->vertexData;
if (vdata.array.valid())
vdata.array->dirty();
}
const Data* seamless::Patch::getData |
( |
| ) |
const [inline] |
Definition at line 70 of file Patch.
Data* seamless::Patch::getData |
( |
| ) |
[inline] |
Definition at line 69 of file Patch.
float seamless::Patch::getEdgeError |
( |
const osg::Vec3 & |
eye, |
|
|
int |
edge |
|
) |
| [virtual] |
float seamless::Patch::getErrorThreshold |
( |
| ) |
const [inline] |
Definition at line 91 of file Patch.
float seamless::Patch::getPatchError |
( |
const osg::Vec3 & |
eye | ) |
|
Get patch error. This is the maximum of the edge errors.
- Parameters:
-
eye | The eyepoint in local coordinates. |
Definition at line 218 of file Patch.cpp.
{
float epsilon = getEdgeError(eye, 0);
for (int i = 1; i < 4; ++i)
epsilon = maximum(epsilon, getEdgeError(eye, i));
return epsilon;
}
PatchSet * seamless::Patch::getPatchSet |
( |
| ) |
const |
void seamless::Patch::init |
( |
| ) |
[virtual] |
Definition at line 133 of file Patch.cpp.
{
for (int res = 0; res < 2; ++res)
{
for (int trile = 0; trile < 4; ++trile)
{
Geometry* geom = new Geometry;
geom->setUseVertexBufferObjects(true);
_data->setGeometryAttributes(geom);
geom->addPrimitiveSet(_patchSet->trilePset[res][trile]);
_trile[res][trile] = new Geode;
_trile[res][trile]->addDrawable(geom);
}
}
for (int j = 0; j < 4; ++j)
{
for (int i = 0; i < 4; ++i)
{
Geometry* geom = new Geometry;
geom->setUseVertexBufferObjects(true);
_data->setGeometryAttributes(geom);
geom->addPrimitiveSet(_patchSet->stripPset[j][i]);
_strip[j][i] = new Geode;
_strip[j][i]->addDrawable(geom);
}
}
}
seamless::Patch::META_Node |
( |
seamless |
, |
|
|
Patch |
|
|
) |
| |
void seamless::Patch::releaseGLObjects |
( |
osg::State * |
= 0 | ) |
const [virtual] |
void seamless::Patch::resizeGLObjectBuffers |
( |
unsigned int |
maxSize | ) |
[virtual] |
void seamless::Patch::setData |
( |
Data * |
data | ) |
[inline] |
Definition at line 71 of file Patch.
void seamless::Patch::setErrorThreshold |
( |
float |
threshold | ) |
[inline] |
Set error threshold between high and low resolution LOD. Default is .5.
Definition at line 90 of file Patch.
void seamless::Patch::setPatchSet |
( |
PatchSet * |
patchSet | ) |
|
virtual void seamless::Patch::traverse |
( |
osg::NodeVisitor & |
nv | ) |
[virtual] |
Member Data Documentation
Definition at line 96 of file Patch.
The documentation for this class was generated from the following files:
- /home/cube/sources/osgearth/src/osgEarthDrivers/engine_seamless/Patch
- /home/cube/sources/osgearth/src/osgEarthDrivers/engine_seamless/Patch.cpp