本文整理汇总了C++中PrintingContext::print方法的典型用法代码示例。如果您正苦于以下问题:C++ PrintingContext::print方法的具体用法?C++ PrintingContext::print怎么用?C++ PrintingContext::print使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PrintingContext
的用法示例。
在下文中一共展示了PrintingContext::print方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: printBox
static void printBox (PrintingContext &c, dxGeom *g)
{
dVector3 sides;
dGeomBoxGetLengths (g,sides);
c.print ("type","box");
c.print ("sides",sides);
}
示例2: 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);
}
示例3: 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);
}
示例4: 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);
}
示例5: 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]);
}
示例6: 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);
}
示例7: 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);
}
示例8: 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);
}
示例9: 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);
}
示例10: 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);
}
示例11: 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);
}
示例12: printLimot
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);
}
示例13: 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 ("}");
}
示例14: 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;
}
}
示例15: printTriMesh
static void printTriMesh (PrintingContext &c, dxGeom * /*g*/)
{
c.print ("type","trimesh");
//@@@ i don't think that the trimesh accessor functions are really
// sufficient to read out all the triangle data, and anyway we
// should have a method of not duplicating trimesh data that is
// shared.
}