1Topcop
|
  |
| Joined: 09 Jun 2009 |
| Total Posts: 6635 |
|
|
| 14 Aug 2012 06:55 PM |
So... the problem here is, the method should change Appearance to either a lined object, or filled. It doesn't do either, but it does color the Appearance. Not sure what to do to make it line, or fill Shape3D, so.. I turned here not knowing where else to turn. I'm sure it's a simple fix. No output.
// Le method public static void AMateri(int Type,Appearance Ap,Color3f color){ PolygonAttributes Poly = new PolygonAttributes(); if(Type==1){ Poly.setCullFace(PolygonAttributes.CULL_NONE); Ap.setPolygonAttributes(Poly); Material mat = new Material(); mat.setDiffuseColor(color); Ap.setMaterial(mat); }else{ Poly.setPolygonMode(PolygonAttributes.POLYGON_LINE); Ap.setPolygonAttributes(Poly); ColoringAttributes Color = new ColoringAttributes(); Color.setColor(color); Ap.setColoringAttributes(Color); } }
// Code that uses le method Point3f[] C = {p3f(0.0f,0.0f,0.0f),p3f(0.0f,1.0f,0.0f),p3f(1f,0f,1f)}; PointArray p = new PointArray(C.length,GeometryArray.COORDINATES); p.setCoordinates(0,C); Appearance a = new Appearance(); AMateri(2,a,rgbf(255f,0f,0f)); Shape3D s = new Shape3D(p,a); |
|
|
| Report Abuse |
|
|
|
| 14 Aug 2012 07:14 PM |
| here's a thought: go ask on a java forum |
|
|
| Report Abuse |
|
|
ShoeBox4
|
  |
| Joined: 06 Apr 2011 |
| Total Posts: 890 |
|
|
| 14 Aug 2012 07:16 PM |
@Dr
This is Scripting Helpers. This is a script, and the other users will hopefully try to debug it. I posted a PHP script here one time and had this same problem. Somebody saying "THIS IS FOR ROBLOX SCRIPTS ONLY!". Although most people were on my side, it was still irritating. And I believe coolbob44 helped me with it. So please, get out. |
|
|
| Report Abuse |
|
|
|
| 14 Aug 2012 07:40 PM |
Appearance a = new Appearance(); AMateri(2,a,rgbf(255f,0f,0f)); Shape3D s = new Shape3D(p,a);
Considering 'AMateri' doesn't return anything, I assume that's the issue. However, I don't have any experience with the Java3D library, so I can't be certain. |
|
|
| Report Abuse |
|
|
1Topcop
|
  |
| Joined: 09 Jun 2009 |
| Total Posts: 6635 |
|
|
| 14 Aug 2012 07:41 PM |
I can help you with PHP. I've masted it. Anyway, I don't know a Java Forum. |
|
|
| Report Abuse |
|
|
1Topcop
|
  |
| Joined: 09 Jun 2009 |
| Total Posts: 6635 |
|
|
| 14 Aug 2012 07:41 PM |
Doesn't have to return anything to use the method. The problem though is with PolygonAttributes I think. (crazyman32 posted O.O) |
|
|
| Report Abuse |
|
|
ShoeBox4
|
  |
| Joined: 06 Apr 2011 |
| Total Posts: 890 |
|
|
| 14 Aug 2012 07:43 PM |
| Haha my PHP was awhile back. Like 6 months or something. |
|
|
| Report Abuse |
|
|
|
| 14 Aug 2012 07:49 PM |
"This is Scripting Helpers. This is a script, and the other users will hopefully try to debug it. I posted a PHP script here one time and had this same problem. Somebody saying "THIS IS FOR ROBLOX SCRIPTS ONLY!". Although most people were on my side, it was still irritating. And I believe coolbob44 helped me with it. So please, get out."
Thisi s scripting helpers. This is not a script, this is a Java method and a code snipper most likely inside a Java class. It is not scripting.
Regardless, his is Roblox so one might think that for best results, you would ask for help with Lua, the language Roblox uses to script games. I didn't tell him to get out, I didn't tell him that nobody would/should help him, I told him to try a Java forum, since it would make a bit more sense to do so; java forums (and pretty much any other forum) is a lot more mature than Roblox's, and it would also be much more knowledgeable on the topic. Out of the select few here that do know Java, I don't know any that know/use Java3D anyway.
Lastly, don't tell me to get out. I've helped many people here over the years, and believe it not, I do know what I am doing, for the most part. I responded the way I did because not only is he asking a question about a language not pertaining to Roblox, it isn't even a general language question; it's for Java3D: a seperate API for a language that Roblox doesn't use.
kthx :D |
|
|
| Report Abuse |
|
|
1Topcop
|
  |
| Joined: 09 Jun 2009 |
| Total Posts: 6635 |
|
|
| 14 Aug 2012 07:54 PM |
Long reply. And I figured not too many people here wouldn't know what to do besides maybe crazyman32, or dr0 :P |
|
|
| Report Abuse |
|
|