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 - Hellfire

#1
Hello friends. How does JPCT-AE Vertex works on Object3D.addTriangle(...)?

public static Object3D createCube(float scale) {
Object3D o = new Object3D(12);
float size = scale / 2;

// FRONT
o.addTriangle(new SimpleVector(-size, size, size), new SimpleVector(-size, -size, size), new SimpleVector(size, size, size));
o.addTriangle(new SimpleVector(size, size, size), new SimpleVector(size, -size, size), new SimpleVector(-size, -size, size));

// BACK
o.addTriangle(new SimpleVector(-size, size, -size), new SimpleVector(-size, -size, -size), new SimpleVector(size, size, -size));
o.addTriangle(new SimpleVector(size, size, -size), new SimpleVector(size, -size, -size), new SimpleVector(-size, -size, -size));

// LEFT
o.addTriangle(new SimpleVector(-size, size, size), new SimpleVector(-size, -size, size), new SimpleVector(-size, size, -size));
o.addTriangle(new SimpleVector(-size, size, -size), new SimpleVector(-size, -size, -size), new SimpleVector(-size, -size, size));

// RIGHT
o.addTriangle(new SimpleVector(size, size, size), new SimpleVector(size, -size, size), new SimpleVector(size, size, -size));
o.addTriangle(new SimpleVector(size, size, -size), new SimpleVector(size, -size, -size), new SimpleVector(size, -size, size));

// UPPER
o.addTriangle(new SimpleVector(size, size, size), new SimpleVector(-size, size, size), new SimpleVector(size, size, -size));
o.addTriangle(new SimpleVector(size, size, -size), new SimpleVector(-size, size, -size), new SimpleVector(-size, size, size));

// LOWER
o.addTriangle(new SimpleVector(size, -size, size), new SimpleVector(-size, -size, size), new SimpleVector(size, -size, -size));
o.addTriangle(new SimpleVector(size, -size, -size), new SimpleVector(-size, -size, -size), new SimpleVector(-size, -size, size));
return o;
}

Result:
#2
Support / Re: How to display 2D image to 3D screen
November 22, 2022, 12:39:50 PM
Quote from: AeroShark333 on November 21, 2022, 10:27:21 PM
Hello welcome!

Quote from: Hellfire on November 21, 2022, 12:13:39 PM
Hello friends. How to display 2D Image to the camera?
I'am trying to make a Joystick
I'd recommend the blitting functions of the FrameBuffer:
https://www.jpct.net/jpct-ae/doc/com/threed/jpct/FrameBuffer.html#blit-com.threed.jpct.Texture-float-float-float-float-float-float-float-float-int-boolean-

I hope this helps :)
Thank you, its working, i didn't have the perfect texture though  ::) ::)
#3
Support / How to display 2D image to 3D screen
November 21, 2022, 12:13:39 PM
Hello friends. How to display 2D Image to the camera?
I'am trying to make a Joystick