![]() |
|
|||||||
| Development Help Help for building applications or diagnosing problems with WWJ |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Aug 2005
Posts: 337
![]() |
How would I have the intersections of polygons appear in a different colors? For example color where two polygons overlap yellow and where three red?
Is working with a custom GLU tessellCallBack and override combine method the customary way in JOGL? How might I do this with WWJ shapes? |
|
|
|
|
|
#2 |
|
WWJ Consultant
Join Date: Jun 2005
Location: Saint-Paul de Vence, Alpes Maritimes, France
Posts: 3,412
![]() |
If you are referring to surface shapes, you may use some transparency so that the intersection will show through. Is it about air space shapes?
|
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Aug 2005
Posts: 337
![]() |
Yes, I use the alpha now for that so two intersecting yellow circles just get more yellow. What I'd like is for them to become red in the intersections.
|
|
|
|
|
|
#4 |
|
WWJ Consultant
Join Date: Jun 2005
Location: Saint-Paul de Vence, Alpes Maritimes, France
Posts: 3,412
![]() |
I don't think there is any easy way to do that. What you could do is compute the two shapes intersection and overlay a third shape over the intersection with a different color.
|
|
|
|
|
|
#5 |
|
WWJ Dev. Team
Join Date: May 2007
Posts: 449
![]() |
Hi Nigel, as Patrick says, there's no easy way to do that with the WWJ surface shapes. I can think of two approaches to solving this:
1. Patrick's suggestion of computing the intersection and drawing a new shapes. If you can compute the intersection in app code, this is a straightforward solution. 2. Override the surface shape rendering code add add this behavior. I would use the stencil buffer to distinguish which pixels contain intersecting shapes. Then simply draw your desired intersection color wherever the stencil values are greater than your desired number of intersections. There's no example stencil buffer code in WWJ. For that, refer to http://www.opengl.org/resources/code...s/node117.html You'll want to add your functionality by extending the appropriate SurfaceShape, then overriding the method doRenderToRegion(). This method is responsible for rasterizing the shape into each tile (remember, surface shapes are drawn into a tile pyramid now). Thanks, Dave |
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| A method to compute the area of a spherical polygon | Jason_Steven | Developers' Corner | 13 | 02-13-2012 02:01 AM |
| How to fill color in a polygon? | Jason_Steven | Developers' Corner | 6 | 11-26-2008 04:09 AM |
| How to make a glitter polygon | Jason_Steven | Developers' Corner | 1 | 11-24-2008 05:22 PM |
| 2d Polygon | rnrivas | Development Help | 4 | 11-20-2007 08:21 PM |
| Interesting mathmatical question and polygon extrusion opacity | Hactic | Developers' Corner | 3 | 09-20-2007 02:11 PM |