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


C++ PrintingContext类代码示例

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


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

示例1: printBox

static void printBox (PrintingContext &c, dxGeom *g)
{
    dVector3 sides;
    dGeomBoxGetLengths (g,sides);
    c.print ("type","box");
    c.print ("sides",sides);
}
开发者ID:Yanzqing,项目名称:BHumanCodeRelease,代码行数:7,代码来源:export-dif.cpp

示例2: 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

示例3: ToString

std::string FunctionCall::ToString( const PrintingContext& pctx ) const
{
    std::string tabs = pctx.Tabs();
    std::string str;
    
    if( !pctx.inlineWriting )
        str += tabs;
    
    str += myCalledFunction->GetName() + "( ";
    
    if( mySubOps.size() > 0 )
    {
        for( size_t i = 0; i < mySubOps.size()-1; i++ )
            str += mySubOps[i]->ToString( pctx.InlineWriting() ) + ", ";
        
        str += mySubOps[ mySubOps.size() - 1 ]->ToString( pctx.InlineWriting() );
    }
    
    str += " )";
    
    if( !pctx.inlineWriting )
        str += ";\n";
        
    return str;
}
开发者ID:Ziple,项目名称:ShadeGen,代码行数:25,代码来源:FunctionCall.cpp

示例4: printCapsule

static void printCapsule (PrintingContext &c, dxGeom *g)
{
    dReal radius,length;
    dGeomCapsuleGetParams (g,&radius,&length);
    c.print ("type","capsule");
    c.print ("radius",radius);
    c.print ("length",length);
}
开发者ID:Yanzqing,项目名称:BHumanCodeRelease,代码行数:8,代码来源:export-dif.cpp

示例5: printCylinder

static void printCylinder (PrintingContext &c, dxGeom *g)
{
    dReal radius,length;
    dGeomCylinderGetParams (g,&radius,&length);
    c.print ("type","cylinder");
    c.print ("radius",radius);
    c.print ("length",length);
}
开发者ID:Yanzqing,项目名称:BHumanCodeRelease,代码行数:8,代码来源:export-dif.cpp

示例6: printSlider

static void printSlider (PrintingContext &c, dxJoint *j)
{
    dxJointSlider *s = (dxJointSlider*) j;
    c.print ("axis1",s->axis1);
    c.print ("qrel",s->qrel,4);
    c.print ("offset",s->offset);
    printLimot (c,s->limot,-1);
}
开发者ID:Yanzqing,项目名称:BHumanCodeRelease,代码行数:8,代码来源:export-dif.cpp

示例7: printPlane

static void printPlane (PrintingContext &c, dxGeom *g)
{
    dVector4 e;
    dGeomPlaneGetParams (g,e);
    c.print ("type","plane");
    c.print ("normal",e);
    c.print ("d",e[3]);
}
开发者ID:Yanzqing,项目名称:BHumanCodeRelease,代码行数:8,代码来源:export-dif.cpp

示例8: printHinge

static void printHinge (PrintingContext &c, dxJoint *j)
{
    dxJointHinge *h = (dxJointHinge*) j;
    c.print ("anchor1",h->anchor1);
    c.print ("anchor2",h->anchor2);
    c.print ("axis1",h->axis1);
    c.print ("axis2",h->axis2);
    c.print ("qrel",h->qrel,4);
    printLimot (c,h->limot,-1);
}
开发者ID:Yanzqing,项目名称:BHumanCodeRelease,代码行数:10,代码来源:export-dif.cpp

示例9: 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

示例10: printPiston

static void printPiston (PrintingContext &c, dxJoint *j)
{
    dxJointPiston *rap = (dxJointPiston*) j;
    c.print ("anchor1",rap->anchor1);
    c.print ("anchor2",rap->anchor2);
    c.print ("axis1",rap->axis1);
    c.print ("axis2",rap->axis2);
    c.print ("qrel",rap->qrel,4);
    printLimot (c,rap->limotP,1);
    printLimot (c, rap->limotR, 2);
}
开发者ID:Yanzqing,项目名称:BHumanCodeRelease,代码行数:11,代码来源:export-dif.cpp

示例11: printPR

static void printPR (PrintingContext &c, dxJoint *j)
{
    dxJointPR *pr = (dxJointPR*) j;
    c.print ("anchor2",pr->anchor2);
    c.print ("axisR1",pr->axisR1);
    c.print ("axisR2",pr->axisR2);
    c.print ("axisP1",pr->axisP1);
    c.print ("qrel",pr->qrel,4);
    c.print ("offset",pr->offset);
    printLimot (c,pr->limotP,1);
    printLimot (c,pr->limotR,2);
}
开发者ID:Yanzqing,项目名称:BHumanCodeRelease,代码行数:12,代码来源:export-dif.cpp

示例12: printUniversal

static void printUniversal (PrintingContext &c, dxJoint *j)
{
    dxJointUniversal *u = (dxJointUniversal*) j;
    c.print ("anchor1",u->anchor1);
    c.print ("anchor2",u->anchor2);
    c.print ("axis1",u->axis1);
    c.print ("axis2",u->axis2);
    c.print ("qrel1",u->qrel1,4);
    c.print ("qrel2",u->qrel2,4);
    printLimot (c,u->limot1,1);
    printLimot (c,u->limot2,2);
}
开发者ID:Yanzqing,项目名称:BHumanCodeRelease,代码行数:12,代码来源:export-dif.cpp

示例13: printPU

static void printPU (PrintingContext &c, dxJoint *j)
{
    dxJointPU *pu = (dxJointPU*) j;
    c.print ("anchor1",pu->anchor1);
    c.print ("anchor2",pu->anchor2);
    c.print ("axis1",pu->axis1);
    c.print ("axis2",pu->axis2);
    c.print ("axisP",pu->axisP1);
    c.print ("qrel1",pu->qrel1,4);
    c.print ("qrel2",pu->qrel2,4);
    printLimot (c,pu->limot1,1);
    printLimot (c,pu->limot2,2);
    printLimot (c,pu->limotP,3);
}
开发者ID:Yanzqing,项目名称:BHumanCodeRelease,代码行数:14,代码来源:export-dif.cpp

示例14: printHinge2

static void printHinge2 (PrintingContext &c, dxJoint *j)
{
    dxJointHinge2 *h = (dxJointHinge2*) j;
    c.print ("anchor1",h->anchor1);
    c.print ("anchor2",h->anchor2);
    c.print ("axis1",h->axis1);
    c.print ("axis2",h->axis2);
    c.print ("v1",h->v1);	//@@@ much better to write out 'qrel' here, if it's available
    c.print ("v2",h->v2);
    c.print ("susp_erp",h->susp_erp);
    c.print ("susp_cfm",h->susp_cfm);
    printLimot (c,h->limot1,1);
    printLimot (c,h->limot2,2);
}
开发者ID:Yanzqing,项目名称:BHumanCodeRelease,代码行数:14,代码来源:export-dif.cpp

示例15: printGeomTransform

static void printGeomTransform (PrintingContext &c, dxGeom *g)
{
	dxGeom *g2 = dGeomTransformGetGeom (g);
	const dReal *pos = dGeomGetPosition (g2);
	dQuaternion q;
	dGeomGetQuaternion (g2,q);
	c.print ("type","transform");
	c.print ("pos",pos);
	c.print ("q",q,4);
	c.print ("geometry = {");
	c.indent++;
	printGeom (c,g2);
	c.indent--;
	c.print ("}");
}
开发者ID:NeoAnomaly,项目名称:xray,代码行数:15,代码来源:export-dif.cpp


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