jPCT-AE 3D engine Wrapper

RichyK68

Active Member
Licensed User
Longtime User
Hi,

This is a great engine! I'd love to get pinch zoom working with the SurfaceTouch event but the JpctMotionEvent argument doesn't include pinch zoom, how would I implement this or is there already a library I can use for this?

Richard
 

RichyK68

Active Member
Licensed User
Longtime User
Don't worry, I've answered my own question...I should be looking at the JpctScaleEvent argument instead.
 

RichyK68

Active Member
Licensed User
Longtime User
Can anybody tell me why the scalefactor in the JpctScaleEvent structure is always returned as 1? It even does this in the demo. How do I find out how much the user has zoomed in or out?

Richard
 

alienhunter

Active Member
Licensed User
Longtime User
maybe a dumb question is this possible to have the library running under Java FX (B4J) ?
 

Reids

Member
Licensed User
Longtime User
Is it possible to merge with livewallpaper?
I tread put the example code to livewallpaper service but it force close, it would be great if this engine can be used as livewallpaper :)
 

shaxboz

Member
Licensed User
Longtime User
Great Work! Thanks! One question, Can I use image file like a background. I saw all your examples back is colors, Is it possible to use images like that background?
 

eps

Expert
Licensed User
Longtime User
The problem is not the JDK version (it only matters when you compile under Eclipse), it's because the sub has a name not compatible with the obfuscation mode. If you rename it Rendrer_FPS, that's OK.

Cheers for that, how did you work this out?
 

eps

Expert
Licensed User
Longtime User
I'm not sure to understand the question.

Ah, you mentioned that the name of the sub is not compatible with the obfuscation mode, how did you work that this was the case? i.e. rename from rendrerfps to rendrer_fps

I realise it was some time ago and may be blindingly obvious, but I can't quite see it. Just wanted to understand.
 

alienhunter

Active Member
Licensed User
Longtime User
Hi ,
did anyone managed to make a polyline in space ? i do not get it how to

http://www.jpct.net/jpct-ae/doc/com/threed/jpct/Polyline.html


B4X:
        Dim  ass As JpctSimpleVector
        Dim sss As Float
        Dim coords(3) As Float
        sss=0.4
        coords=Array As Float(sss,sss,sss)
        ass.Initialize5(coords)
      
        lines.Initialize(ass,SkyColor)

Parsing code. 0.01
Compiling code. 0.02
Compiling layouts code. 0.00
Generating R file. 0.02
Compiling generated Java code. Error
B4A line: 201
lines.Initialize(ass,SkyColor)
javac 1.7.0_45
src\b4a\example\main.java:513: error: inconvertible types
_lines.Initialize((com.threed.jpct.SimpleVector[])(_ass.getObject()),(com.threed.jpct.RGBColor)(_skycolor.getObject()));
^
required: SimpleVector[]
found: SimpleVector
1 error





thanks AH
 
Last edited:

Informatix

Expert
Licensed User
Longtime User
Hi ,
did anyone managed to make a polyline in space ? i do not get it how to

http://www.jpct.net/jpct-ae/doc/com/threed/jpct/Polyline.html


B4X:
        Dim  ass As JpctSimpleVector
        Dim sss As Float
        Dim coords(3) As Float
        sss=0.4
        coords=Array As Float(sss,sss,sss)
        ass.Initialize5(coords)
    
        lines.Initialize(ass,SkyColor)
Your error is explained in the log: "required: SimpleVector[], found: SimpleVector". The Initialize function needs an array of SimpleVector.
 
  • Like
Reactions: eps

alienhunter

Active Member
Licensed User
Longtime User
Your error is explained in the log: "required: SimpleVector[], found: SimpleVector". The Initialize function needs an array of SimpleVector.

sorry but how should this vector be defined ? that is what i do not get
thanks
 

ricardossy1

Member
Licensed User
Longtime User
The problem about "JpctPolyline" is that you can't create array of SimpleVector with the Project Wrapper of Alhowiriny


So one fix:

1°) With eclipse, Add this method in the class "JPolyline.java" in the Project Wrapper Source of Alhowiriny :

public SimpleVector[] essai(int dimension) {
SimpleVector[] ess=new SimpleVector[dimension];
return ess;
}


2°) With B4A, Use Pl_Line.essai(X) for create an array of X SimpleVector

Dim Pl_Line As JpctPolyline
Dim Pl_obj() As Object
Dim Pl_Tab(100) As JpctSimpleVector

Pl_obj=Pl_Line.essai(Pl_Tab.Length)
For i=0 To Pl_obj.Length-1
...
Pl_obj(i)=Pl_Tab(i)
Next
Pl_Line.update(Pl_obj)


3°) Good luck (it's not easy but it's work well)
 
Last edited:
Top