osgEarth 2.1.1
Functions | Variables

seamless::anonymous_namespace{Patch.cpp} Namespace Reference

Functions

void getEdge (const Patch *patch, Vec3 &p1, Vec3 &p2, int edgeNo)

Variables

int edgeCoords [4][2][2]

Function Documentation

void seamless::anonymous_namespace{Patch.cpp}::getEdge ( const Patch *  patch,
Vec3 &  p1,
Vec3 &  p2,
int  edgeNo 
) [inline]

Definition at line 193 of file Patch.cpp.

{
    PatchSet* ps = patch->getPatchSet();
    int psRes = ps->getResolution(); // patch dimension - 1
    int coords[2][2];
    for (int j = 0; j < 2; ++j)
        for (int i = 0; i < 2; ++i)
            coords[j][i] = edgeCoords[edgeNo][j][i] * psRes;
    Vec3Array* verts
        = static_cast<Vec3Array*>(patch->getData()->vertexData.array.get());
    p1 = (*verts)[ps->makeIndex(coords[0][0], coords[0][1])];
    p2 = (*verts)[ps->makeIndex(coords[1][0], coords[1][1])];
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

int seamless::anonymous_namespace{Patch.cpp}::edgeCoords[4][2][2]
Initial value:
 {{{0, 0}, {1, 0}},
                           {{1, 0}, {1, 1}},
                           {{1, 1}, {0, 1}},
                           {{0, 1}, {0,0}}}

Definition at line 187 of file Patch.cpp.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines