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.


Topics - HammerNL

Pages: [1]
1
Support / How to draw a simple 2D line onto my jPCT Framebuffer?
« on: September 04, 2013, 02:53:21 pm »
Hi,

I'm developing a little 3D game in which you drive a car through a 3D world. In the upper left corner I'm displaying a fuel indicator, which is of course in simple flat 2D.

I'm using framebuffer.blit() to put the indicator itself directly on top of every frame, which is working fine.
However, inside the fuel indicator I need to draw a line, that actually indicates the level of fuel.

In the desktop version of jPCT, FrameBuffer has a getGraphics() method. But, since on Android there is no AWT, this method does not exist there. Now how do I draw my simple line?

Tnx!

2
Support / Rotate a group of objects from one vector to another
« on: April 23, 2013, 03:38:41 pm »
Hi,

I have a group of Object3D's which I want to rotate "as a whole" into a different direction.

First, I'm giving all the objects the same rotation pivot point.
Then, I come up with a single SimpleVector which represents the current direction of the object group.
Then, after some calculations, I come up with a new SimpleVector, which indicates the desired new direction of my objects.

My question now is, how to use these 2 vectors to rotate my objects?

So let's say:

Code: [Select]
Object3D[] group = something1;
SimpleVector original = something2;
SimpleVector destination = something3;

for (Object3D o: group)
{
   // what to do with o?
}

Tnx!

Pages: [1]