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


C++ PrintingContext::printIndent方法代码示例

本文整理汇总了C++中PrintingContext::printIndent方法的典型用法代码示例。如果您正苦于以下问题:C++ PrintingContext::printIndent方法的具体用法?C++ PrintingContext::printIndent怎么用?C++ PrintingContext::printIndent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PrintingContext的用法示例。


在下文中一共展示了PrintingContext::printIndent方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: printGeom

static void printGeom (PrintingContext &c, dxGeom *g)
{
    unsigned long category = dGeomGetCategoryBits (g);
    if (category != (unsigned long)(~0)) {
        c.printIndent();
        fprintf (c.file,"category_bits = %lu\n",category);
    }
    unsigned long collide = dGeomGetCollideBits (g);
    if (collide != (unsigned long)(~0)) {
        c.printIndent();
        fprintf (c.file,"collide_bits = %lu\n",collide);
    }
    if (!dGeomIsEnabled (g)) {
        c.print ("disabled",1);
    }
    switch (g->type) {
        case dSphereClass: printSphere (c,g); break;
        case dBoxClass: printBox (c,g); break;
        case dCapsuleClass: printCapsule (c,g); break;
        case dCylinderClass: printCylinder (c,g); break;
        case dPlaneClass: printPlane (c,g); break;
        case dRayClass: printRay (c,g); break;
        case dConvexClass: printConvex (c,g); break;
        case dTriMeshClass: printTriMesh (c,g); break;
        case dHeightfieldClass: printHeightfieldClass (c,g); break;
    }
}
开发者ID:Yanzqing,项目名称:BHumanCodeRelease,代码行数:27,代码来源:export-dif.cpp

示例2: printLMotor

static void printLMotor (PrintingContext &c, dxJoint *j)
{
    dxJointLMotor *a = (dxJointLMotor*) j;
    c.print("num", a->num);
    c.printIndent();
    fprintf (c.file,"rel = {%d,%d,%d},\n",a->rel[0],a->rel[1],a->rel[2]);
    c.print ("axis1",a->axis[0]);
    c.print ("axis2",a->axis[1]);
    c.print ("axis3",a->axis[2]);
    for (int i=0; i<3; i++) printLimot (c,a->limot[i],i+1);
}
开发者ID:Yanzqing,项目名称:BHumanCodeRelease,代码行数:11,代码来源:export-dif.cpp

示例3: printLimot

static void printLimot (PrintingContext &c, dxJointLimitMotor &limot, int num)
{
    if (num >= 0) {
        c.printIndent();
        fprintf (c.file,"limit%d = {\n",num);
    }
    else {
        c.print ("limit = {");
    }
    c.indent++;
    c.print ("low_stop",limot.lostop);
    c.print ("high_stop",limot.histop);
    c.printNonzero ("bounce",limot.bounce);
    c.print ("ODE = {");
    c.indent++;
    c.printNonzero ("stop_erp",limot.stop_erp);
    c.printNonzero ("stop_cfm",limot.stop_cfm);
    c.indent--;
    c.print ("},");
    c.indent--;
    c.print ("},");

    if (num >= 0) {
        c.printIndent();
        fprintf (c.file,"motor%d = {\n",num);
    }
    else {
        c.print ("motor = {");
    }
    c.indent++;
    c.printNonzero ("vel",limot.vel);
    c.printNonzero ("fmax",limot.fmax);
    c.print ("ODE = {");
    c.indent++;
    c.printNonzero ("fudge_factor",limot.fudge_factor);
    c.printNonzero ("normal_cfm",limot.normal_cfm);
    c.indent--;
    c.print ("},");
    c.indent--;
    c.print ("},");
}
开发者ID:Yanzqing,项目名称:BHumanCodeRelease,代码行数:41,代码来源:export-dif.cpp


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