Re: [Plib-users] setTransform scaling problem
Brought to you by:
sjbaker
From: Steve B. <st...@sj...> - 2009-05-27 21:45:40
|
PLIB doesn't really support realtime scaling. It makes things like field of view culling & collision detection hideously expensive & complicated and it means that you can't use the same matrix for transforming vertices and normals without renormalising - which is also very bad. You should rescale the vertex array yourself and not do it in the transform. -- Steve ha...@th... wrote: > Hello > > I want to scale the tux from the tuxexample demo. (plib-examples-1.8.5) > I change the setTransform function to scale the tux. > The tux is not correct drawing. I tink the recalculating of the > bounding box for viewing have a bug. > I am using linux and plib 1.8.5 > (i have the same problem in my own project) > > static void update_motion () > { > static int frameno = 0 ; > > frameno++ ; > > sgCoord campos ; > sgCoord tuxpos ; > > /* > Spin Tux, make the camera pan sinusoidally left and right > */ > > sgSetCoord ( & campos, 0.0f, -5.0f, 1.0f, 24.0f * > (float)sin(frameno/100.0), 0.0f, 0.0f ) ; > sgSetCoord ( & tuxpos, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, frameno/100.0f ) ; > > ssgSetCamera ( & campos ) ; > // penguin -> setTransform ( & tuxpos ) ; // from > penguin -> setTransform ( & tuxpos ,10.0f,10.0f,10.0f) ; // to > } > > > thank you > > Harald Pichler > > ------------------------------------------------------------------------------ > Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT > is a gathering of tech-side developers & brand creativity professionals. Meet > the minds behind Google Creative Lab, Visual Complexity, Processing, & > iPhoneDevCamp as they present alongside digital heavyweights like Barbarian > Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com > _______________________________________________ > plib-users mailing list > pli...@li... > https://lists.sourceforge.net/lists/listinfo/plib-users |