OCone question



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 27/03/2011 at 18:29, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   12 
    Platform:   Windows  ; Mac  ;  
    Language(s) :     C++  ;

    ---------
    I am trying to draw a cone to the screen using BaseDraw::DrawPolygonObject()

    Here's the code I use

      
    PolygonObject* cone = NULL;  
      cone = (PolygonObject* )GeneratePrimitive(bh->GetDocument(), Ocone, BaseContainer(), 1.0, FALSE, NULL);  
      if (!cone) return;  
      
    bd->DrawPolygonObject(bh, cone, DRAWOBJECT_0, NULL, red);  
      
    

    it works fine except for one small glitch.  When the cone is drawn to the viewport,  it is drawn as a cylinder..  LOL   Is this a bug or am I doing somethign wrong..  I even tried to go in and adjust the tip radius to see if it was just messed up but that didn't work.

    Any help would be greatly appreciated.

    Thanks,

    Shawn



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 28/03/2011 at 00:58, xxxxxxxx wrote:

    hello,
    may you have to pass a basecontainer with correct value to generate primitive

    all the best
    Franz



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 28/03/2011 at 02:15, xxxxxxxx wrote:

    Thanks Franz,  That fixed it.

      
    BaseContainer bcCone;  
      bcCone.SetReal(PRIM_CONE_TRAD, 0.0);  
      
      PolygonObject* cone = NULL;  
      cone = (PolygonObject* )GeneratePrimitive(bh->GetDocument(), Ocone, bcCone, 1.0, FALSE, NULL);  
      if (!cone) return;  
    

Log in to reply