Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - LeoMaheo

#1
Feedback / Re: Egon is that you on that picture?
May 07, 2009, 07:04:35 PM
He is going back to his cave.
#2
Support / Re: wireframe mode per object/mesh
April 05, 2009, 04:52:15 AM
Quote from: EgonOlsen on April 05, 2009, 12:15:22 AM
Something that will work for both (but is a bit ugly), is to render the World twice. Once in normal mode with all objects visible.
Then, iterate through all world objects, store their visibility,
set them to invisible except for the ones that you want to render in wireframe,
render the world again and draw it in wireframe,
reset all world objects to the correct visibility.

I did that, works fine (although wireframes are rendered on top of everything else), thanks.
#3
Feedback / Re: Egon is that you on that picture?
April 05, 2009, 04:08:50 AM
(Helge F., I hope you don't mind, but I think your real picture
would have attracted a few more people to jPCT than Egon Olsen's picture.
Because Egon looks neither intelligent nor emphatic,
and the name rhymes with egoistic.
Actually I was a little bit deterred when I had my first glance
at the jPCT forums and saw Egon's face everywhere.)
#4
Support / Re: wireframe mode per object/mesh
April 04, 2009, 09:21:17 PM
I'm also interested in rendering only some objects in wireframe.

The reason is I want to draw X recent postures of a ragdoll,
to simplify debugging of ragdoll-walking-code.
I believe I'd rather draw these postures in wireframes
(otherwise they tend to overlap and hide each other and other graphics).

( I'm a bit surprised there's a public function
IRenderer.drawWireframe(VisList visList, int ind, int color, FrameBuffer buffer)
but no way to obtain the relevant IRenderer instance ?? )

( Perhaps I should use the line-drawing-code provided in "createLine3D" here:
http://www.jpct.net/forum2/index.php/topic,1091.0.html
and draw a box-of-lines. )

(I hope you don't mind me waking this old thread :-)  )
#5
Feedback / Egon is that you on that picture?
March 23, 2009, 05:57:00 PM
Hi Egon,

Your picture (the man with the cigar), is that really you?

Magnus
#6
Feedback / Re: Fail-fast everywhere?
March 23, 2009, 05:53:35 PM
Oh, thanks for the information :-)
Works fine (well of course)
#7
Feedback / Fail-fast everywhere?
March 23, 2009, 05:10:51 AM
Hi!

Perhaps I'm being a bit pedantic, but:

I'd suggest that Matrix.setDump throw a RuntimeException if the passed float[] is not 16 elements,
instead of silently doing nothing?
(I lost a few minutes debugging my code.)

Fail-fast is the way to go, I believe.

Actually, I'd appreciate it if all functions threw RuntimeExceptions as quickly as possible,
when invoked with illegal input.

(Possibly this is even more important with closed source products,
since you cannot always tell from studying source code
how they functions internally and how they react to invalid input.)

Kind regards,
Magnus
#8
Now I've modified the rotation matrix to scale a cube into a cuboid. Below code works for me.

(I currently use no textures though;
perhaps texture coordinates are affected in some (inappropriate) manner. (?))

Thanks Egon for your quick reply :-)


box = Primitives.getCube(1f);
box.rotateY(Util.PI / 4); // cancel jPCT's default rotation around Y
Matrix scaler = new Matrix();
scaler.setDump(new float[]{
halfExtents.x, 0, 0, 0,
0, halfExtents.y, 0, 0,
0, 0, halfExtents.z, 0,
0, 0, 0, 1 });
box.getRotationMatrix().matMul(scaler);
box.rotateMesh();
box.build();
// Reset rotation matrix so above scaling is not applied twice:
box.getRotationMatrix().setIdentity();

#9
But isn't then width = depth? I don't want that.
(Perhaps I can modify the rotation matrix so it stretches the box?)
#10
Feedback / A call for cuboids (a.k.a. rectangles)
March 22, 2009, 10:21:41 PM
Hi!

I use JBullet to simulate walking ragdolls. Their body parts are cuboids.

I wish jPCT provided "native" cuboid support.
(Axis aligned cuboids I'd suggest :-))

(To some people: Some people refer to cuboids as rectangles.
Rectangles are however 2 dimensional and cuboids 3 dimensional.)

Kind regards,
Magnus