本文整理汇总了C++中Matrix3::ValidateFlags方法的典型用法代码示例。如果您正苦于以下问题:C++ Matrix3::ValidateFlags方法的具体用法?C++ Matrix3::ValidateFlags怎么用?C++ Matrix3::ValidateFlags使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Matrix3
的用法示例。
在下文中一共展示了Matrix3::ValidateFlags方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetFollowerMatrix
Matrix3 FormationBhvr::GetFollowerMatrix(TimeValue t,int which)
{
//we are using 4 Point3's to represent the matrix..
Point3 point;
Matrix3 matrix;
pblock->GetValue(follower_matrix1, 0,point,FOREVER,which);
matrix.SetRow(0,point);
pblock->GetValue(follower_matrix2, 0,point,FOREVER,which);
matrix.SetRow(1,point);
pblock->GetValue(follower_matrix3, 0,point,FOREVER,which);
matrix.SetRow(2,point);
pblock->GetValue(follower_matrix4, 0,point,FOREVER,which);
matrix.SetRow(3,point);
matrix.ValidateFlags();
return matrix;
//Note that when this code was written that the Matrix3 paramblock
//parameter wasn't working correctly in R4 at the time this was written.
/*
if(which<0||which>=GetFollowerCount(t))
return NULL;
Matrix3 mat;
pblock->GetValue(follower_matrix,t,mat,FOREVER,which);
return mat;
*/
}
示例2: GetOTM
Matrix3 plMaxNodeBase::GetOTM(TimeValue t)
{
// objectTM = otm * nodeTM
// otm = objectTM * Inverse(nodeTM)
Matrix3 objectTM = GetObjectTM(t);
Matrix3 nodeTM = GetNodeTM(t);
Matrix3 otm = objectTM * Inverse(nodeTM);
otm.ValidateFlags();
return otm;
}
示例3: ISetupNormals
BOOL plDistributor::ISetupNormals(plMaxNode* node, Mesh* mesh, BOOL radiateNorm) const
{
const char* dbgNodeName = node->GetName();
UVVert *normMap = mesh->mapVerts(kNormMapChan);
int numNormVerts = mesh->getNumMapVerts(kNormMapChan);
if( !mesh->mapSupport(kNormMapChan) || !mesh->mapVerts(kNormMapChan) || !mesh->mapFaces(kNormMapChan) )
{
mesh->setMapSupport(kNormMapChan);
mesh->setNumMapVerts(kNormMapChan, mesh->getNumVerts());
mesh->setNumMapFaces(kNormMapChan, mesh->getNumFaces());
}
int i;
if( radiateNorm )
{
Matrix3 otm = node->GetOTM();
Matrix3 invOtm = Inverse(otm);
invOtm.SetTrans(Point3(0,0,0));
invOtm.ValidateFlags();
for( i = 0; i < mesh->getNumVerts(); i++ )
{
Point3 pos = mesh->getVert(i) * otm;
pos = pos * invOtm;
mesh->setMapVert(kNormMapChan, i, pos);
}
}
else
{
mesh->checkNormals(true);
for( i = 0; i < mesh->getNumVerts(); i++ )
{
Point3 norm = mesh->getNormal(i);
mesh->setMapVert(kNormMapChan, i, norm);
}
}
TVFace* mapFaces = mesh->mapFaces(kNormMapChan);
Face* faces = mesh->faces;
for( i = 0; i < mesh->getNumFaces(); i++ )
{
mapFaces[i].setTVerts(faces[i].getVert(0), faces[i].getVert(1), faces[i].getVert(2));
}
return true;
}