本文整理汇总了C++中Point3F::convolveInverse方法的典型用法代码示例。如果您正苦于以下问题:C++ Point3F::convolveInverse方法的具体用法?C++ Point3F::convolveInverse怎么用?C++ Point3F::convolveInverse使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Point3F
的用法示例。
在下文中一共展示了Point3F::convolveInverse方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: processTick
void SoftBody::processTick(const Move* move)
{
if (m_stopSimulation)
return;
Parent::processTick(move);
int nodesNum = m_physShapeSoft ? m_physShapeSoft->getNodesNum() : 0;
if (nodesNum>0)
{
//update obj box
mObjBox.minExtents.set( 10E30f, 10E30f, 10E30f);
mObjBox.maxExtents.set(-10E30f,-10E30f,-10E30f);
for (U32 i=0; i < nodesNum; i++)
{
Point3F physVertex = m_physShapeSoft->getNodePos(i);
mRenderWorldToObj.mulP(physVertex);
physVertex.convolveInverse(mObjScale);
mObjBox.minExtents.setMin(physVertex);
mObjBox.maxExtents.setMax(physVertex);
}
}
}
示例2: prepBatchRender
void SoftBody::prepBatchRender(SceneRenderState* state, S32 mountedImageIndex )
{
if (!m_physShapeSoft || m_physShapeSoft->getNodesNum()==0 || gFreezeSim || m_stopSimulation)
{
Parent::prepBatchRender(state,mountedImageIndex);
return;
}
TSShapeInstance* shapeInst = getShapeInstance();
S32 dl = 0;
const TSShape* shape = getShape();
const TSDetail * detail = &shape->details[dl];
S32 ss = detail->subShapeNum;
S32 od = detail->objectDetailNum;
U32 vertexStride = shape->getVertexSize();
S32 start = shape->subShapeFirstObject[ss];
S32 end = shape->subShapeNumObjects[ss] + start;
int physVertexIdx = 0;
for (S32 i=start; i<end; i++)
{
TSShapeInstance::MeshObjectInstance* meshOI = &shapeInst->mMeshObjects[i];
if (od >= meshOI->object->numMeshes)
continue;
TSMesh* mesh = meshOI->getMesh(od);
if (mesh)
{
mesh->setManualDynamic(true);
TSVertexBufferHandle& vb = meshOI->mVertexBuffer;
if (vb == NULL)
mesh->createVBIB(vb);
U8 *vertData = (U8*)vb.lock();
for(size_t i = 0;i<mesh->mNumVerts;i++)
{
Point3F physVertex = m_physShapeSoft->getNodePos(m_vertexBindingVec[physVertexIdx++]);
//transform into local coordinates
mRenderWorldToObj.mulP(physVertex);
physVertex.convolveInverse(mObjScale);
*((Point3F*)vertData) = physVertex;
vertData += vertexStride;
}
vb.unlock();
}
}
Parent::prepBatchRender(state,mountedImageIndex);
for (S32 i=start; i<end; i++)
{
TSShapeInstance::MeshObjectInstance* meshOI = &shapeInst->mMeshObjects[i];
if (od >= meshOI->object->numMeshes)
continue;
TSMesh* mesh = meshOI->getMesh(od);
if (mesh)
mesh->setManualDynamic(false);
}
}