本文整理汇总了C++中LLStrider::getSkip方法的典型用法代码示例。如果您正苦于以下问题:C++ LLStrider::getSkip方法的具体用法?C++ LLStrider::getSkip怎么用?C++ LLStrider::getSkip使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLStrider
的用法示例。
在下文中一共展示了LLStrider::getSkip方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: updateFaceData
void LLViewerJointMesh::updateFaceData(LLFace *face, F32 pixel_area, BOOL damp_wind, bool terse_update)
{
mFace = face;
if (!mFace->getVertexBuffer())
{
return;
}
LLStrider<LLVector3> verticesp;
LLStrider<LLVector3> normalsp;
LLStrider<LLVector2> tex_coordsp;
LLStrider<F32> vertex_weightsp;
LLStrider<LLVector4> clothing_weightsp;
LLStrider<U16> indicesp;
// Copy data into the faces from the polymesh data.
if (mMesh && mValid)
{
if (mMesh->getNumVertices())
{
stop_glerror();
face->getGeometryAvatar(verticesp, normalsp, tex_coordsp, vertex_weightsp, clothing_weightsp);
stop_glerror();
face->getVertexBuffer()->getIndexStrider(indicesp);
stop_glerror();
verticesp += mMesh->mFaceVertexOffset;
tex_coordsp += mMesh->mFaceVertexOffset;
normalsp += mMesh->mFaceVertexOffset;
vertex_weightsp += mMesh->mFaceVertexOffset;
clothing_weightsp += mMesh->mFaceVertexOffset;
const U32* __restrict coords = (U32*) mMesh->getCoords();
const U32* __restrict tex_coords = (U32*) mMesh->getTexCoords();
const U32* __restrict normals = (U32*) mMesh->getNormals();
const U32* __restrict weights = (U32*) mMesh->getWeights();
const U32* __restrict cloth_weights = (U32*) mMesh->getClothingWeights();
const U32 num_verts = mMesh->getNumVertices();
U32 i = 0;
const U32 skip = verticesp.getSkip()/sizeof(U32);
U32* __restrict v = (U32*) verticesp.get();
U32* __restrict n = (U32*) normalsp.get();
if (terse_update)
{
for (S32 i = num_verts; i > 0; --i)
{
//morph target application only, only update positions and normals
v[0] = coords[0];
v[1] = coords[1];
v[2] = coords[2];
coords += 3;
v += skip;
}
for (S32 i = num_verts; i > 0; --i)
{
n[0] = normals[0];
n[1] = normals[1];
n[2] = normals[2];
normals += 3;
n += skip;
}
}
else
{
U32* __restrict tc = (U32*) tex_coordsp.get();
U32* __restrict vw = (U32*) vertex_weightsp.get();
U32* __restrict cw = (U32*) clothing_weightsp.get();
do
{
v[0] = *(coords++);
v[1] = *(coords++);
v[2] = *(coords++);
v += skip;
tc[0] = *(tex_coords++);
tc[1] = *(tex_coords++);
tc += skip;
n[0] = *(normals++);
n[1] = *(normals++);
n[2] = *(normals++);
n += skip;
vw[0] = *(weights++);
vw += skip;
cw[0] = *(cloth_weights++);
cw[1] = *(cloth_weights++);
cw[2] = *(cloth_weights++);
cw[3] = *(cloth_weights++);
cw += skip;
//.........这里部分代码省略.........