miho / JCSG

Java implementation of BSP based CSG (Constructive Solid Geometry)
Other
177 stars 52 forks source link

Creating a Polygon #57

Closed co-ord closed 4 years ago

co-ord commented 4 years ago

Hi,

I am unable to reproduce the following example (found here)

List<Vector3d> vertices = new ArrayList<>();

vertices.add(Vector3d.xyz(0, 0, 0));
vertices.add(Vector3d.xyz(50, 25, 0));
vertices.add(Vector3d.xyz(100, 0, 0));
vertices.add(Vector3d.xyz(0, 100, 0));

List<Polygon> t = Polygon.fromConcavePoints(vertices);
CSG csg = CSG.fromPolygons(t);

All I get is this error:

This static method of interface Vector3d can only be accessed as Vector3d.xyz

Again, I might be doing something wrong and would really appreciate some help.

Respectfully

miho commented 4 years ago

Since this is a compilation error we need to know the Java version you are using.

co-ord commented 4 years ago

Thank you for the reply.

To be more specific, I am loading JCSG in Processing (example code provided here), which, I think, is using Java 8. Would that be a problem ?

co-ord commented 4 years ago

@miho Any help would be appreciated. Please tell me if you need more information regarding this issue.

miho commented 4 years ago

Have you tried with standard Java 8? I can't reproduce this behavior. So I assume it is Processing related.

co-ord commented 4 years ago

Alright, thank you for the feedback. I'll try to figure this out with the Processing guys.