当前位置: 首页>>代码示例>>C++>>正文


C++ Matrix3::ValidateFlags方法代码示例

本文整理汇总了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;
	*/
}
开发者ID:innovatelogic,项目名称:ilogic-vm,代码行数:33,代码来源:formation.cpp

示例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;
}
开发者ID:cwalther,项目名称:Plasma-nobink-test,代码行数:10,代码来源:plMaxNodeBase.cpp

示例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;
}
开发者ID:Asteral,项目名称:Plasma,代码行数:51,代码来源:plDistributor.cpp


注:本文中的Matrix3::ValidateFlags方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。