Re: Static BBox doesn't work

New Message Reply Date view Thread view Subject view Author view

Wade Olsen (wade++at++slack.shoreline-studios.com)
Wed, 15 Oct 1997 17:32:57 -0700


Marcus,

Thanks for your prompt response. As you suggested I moved the setBound
call after I've bound the geoset attributes:

  // Create the geoset
  pfGeoSet * gset = new pfGeoSet;

  gset->setPrimType(PFGS_TRISTRIPS);
  gset->setPrimLengths( lengths );
  gset->setNumPrims(1);
  gset->setAttr(PFGS_COORD3, PFGS_PER_VERTEX, verts_a, 0);
  gset->setAttr(PFGS_COLOR4, PFGS_OVERALL, colors, 0);
  gset->setGState(gstate);

  //==== Create Bounding Box ====//
  pfBox * bbox = performerNew(pfBox, 1);
  bbox->min.set(-1, -1, -1);
  bbox->min.set(1, 1, 1);

  // If the line below is uncommented, A wacky bounding sphere
  // ends up the geode.
  //
  gset->setBound( bbox, PFBOUND_STATIC );

But I still have the same problem. Any other ideas? The bounding
volume is still wacky as shown by this scene graph dump:

[0:0]pfScene pfId=129 0x18076e40 {
    trav masks: cull=0xffffffff draw=0xffffffff isect=0xffffffff
    bsphere: ctr(0.500000, 0.500000, 0.500000) rad=-1.000000
    Num Children: 1
  [1:0]pfGeode pfId=128 0x18079890 {
      trav masks: cull=0xffffffff draw=0xffffffff isect=0xffffffff
      bsphere: ctr(0.500000, 0.500000, 0.500000) rad=-1.000000
      Num pfGeoSets: 1
    [2:0]
        GeoSet: 0x180797e0 {
          Primitive: PFGS_TRISTRIPS, NON-INDEXED, pfPrims=1, glPrims=2, verts=4
            Attribute Bindings:
                PFGS_COLOR4=PFGS_OVERALL PFGS_NORMAL3=PFGS_OFF PFGS_TEXCOORD2=PFGS_OFF Packed=0
          Attribute List Pointers:
            PFGS_COORD3: 0x180797a0
            PFGS_COLOR4: 0x18076a00
            PFGS_NORMAL3: 0x0
            PFGS_TEXCOORD2: 0x0
            PackedAttrs: 0x0
          Attribute Index List Pointers:
            PFGS_COLOR4: 0x0
            PFGS_NORMAL3: 0x0
            PFGS_TEXCOORD2: 0x0
            PFGS_COORD3: 0x0
          Strip Lengths: 4
          Overall Color 0: R: 1.000000 G: 1.000000 B: 1.000000 A: 1.000000

          Coord 0: X: -0.510000 Y: -0.500000 Z: 0.000000
          Coord 1: X: 0.500000 Y: -0.500000 Z: 0.000000
          Coord 2: X: -0.500000 Y: 0.000000 Z: 0.000000
          Coord 3: X: 0.500000 Y: 0.000000 Z: 0.000000

        } GeoSet: 0x180797e0
    [2:0]
  [1:0]} pfGeode 128 0x18079890
[0:0]} pfScene 129 0x18076e40

Thanks for your time,

Wade

Marcus Barnes writes:
    On Oct 13, 12:28pm, Wade Olsen wrote:
> Is there some other issue beyond the just calling
>
> gset->setBound( bbox, PFBOUND_STATIC );
>
> that I nead to be aware of?
     
    call this _after_ you've bound your gset attributes. you want performer to
    calculate the box initially or the box will be nil.
     
    Regards.
    --
    + Marcus Barnes, Technical Staff mailto:marcus++at++multigen.com +
    + Multigen Inc. http://www.multigen.com +
    + 550 S. Winchester Blvd. phoneto:1-408-556-2654 +
    + Suite 500 San Jose CA 95128 faxto:1-408-261-4102 +

-- 
-----------------------------
Wade Olsen, Shoreline Studios
e-mail:	wade++at++shoreline-studios.com
phone:	650-969-7896
fax:	650-969-7864
www:	http://www.shoreline-studios.com
=======================================================================
List Archives, FAQ, FTP:  http://www.sgi.com/Technology/Performer/
            Submissions:  info-performer++at++sgi.com
        Admin. requests:  info-performer-request++at++sgi.com

New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:56:05 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.