How to control point size

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

How to control point size

ThomasR
Hi,

With IndexMode = POINTS, how to make them larger or smaller? For IndexMode = LINES, would the WireFrame
RenderState still be needed to change the line width?

Tom

Reply | Threaded
Open this post in threaded view
|

Re: How to control point size

gouessej
Administrator
Hi

Look at JoglRenderer.setupPointParameters() & setupLineParameters() + WireframeState.setLineWidth() & Point.setPointSize().
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: How to control point size

ThomasR
Hi,

Can this be changed dynamically, eg. user decides they want the points to get bigger or smaller interactively?

Looks like this would apply to everything in the canvas. Would it be possible, at some point, for two different meshes set to
IndexMode.Point to have differenct point sizes, or line widths for that matter?

Tom
Reply | Threaded
Open this post in threaded view
|

Re: How to control point size

gouessej
Administrator
A render state of a node only affects its children as it is stated in the Java documentation of the class com.ardor3d.renderer.state.RenderState. Therefore, I don't see the problem. If two distinct sets of meshes with two distinct parent nodes use two distinct render states (even two distinct instances of the same type), it will work as expected.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: How to control point size

ThomasR
I definitely understand this, and read the Javadoc wherever its available. It just doesn't seem there's
PointState to describe the PointSize if I set the IndexMode of a Mesh to IndexMode.Points. So I
have to explicitly create a Point -> Mesh. I was just trying to keep things as general as possible using
IndexMode on the most general class. Thanks for your interaction!

Tom
Reply | Threaded
Open this post in threaded view
|

Re: How to control point size

ThomasR
...and patience!
Reply | Threaded
Open this post in threaded view
|

Re: How to control point size

gouessej
Administrator
In reply to this post by ThomasR
You're welcome. It's very late in France now. I'll investigate and I'll suggest a solution tomorrow.
Julien Gouesse | Personal blog | Website