Whats the easiest way of defining a shape
and knowing if a point is with in it?
parden the crude pseduocode...
i want something like:
Shape1 = p1,p2,p3,p4,p5,p6,p7,p8,p9,p10
pnt = x,y
if (shape1 containes(pnt)) {
}
Anyone know of something like this?
Pete 2 2420
On Wed, 27 Aug 2003 23:04:32 GMT, "Pete" <p_*********@comcast.net> wrote: Whats the easiest way of defining a shape
Try using a std::vector for the points.
and knowing if a point is with in it?
parden the crude pseduocode... i want something like:
Shape1 = p1,p2,p3,p4,p5,p6,p7,p8,p9,p10
pnt = x,y
if (shape1 containes(pnt)) {
}
Anyone know of something like this?
What's the C++ question?
<ot>
E.g. count the number of crossing for a line through the point, or
walk the perimeter of the shape and check the direction to the point.
</ot>
Pete wrote: Whats the easiest way of defining a shape and knowing if a point is with in it?
parden the crude pseduocode... i want something like:
Shape1 = p1,p2,p3,p4,p5,p6,p7,p8,p9,p10
pnt = x,y
if (shape1 containes(pnt)) {
}
Anyone know of something like this?
Pete
This is question 2.03 of the comp.graphics.algorithms FAQ. http://www.exaflop.org/docs/cgafaq/ind.html
-Peter This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: David |
last post by:
i am using the imagepolygon function to create a shape on an image i have,
however i want to put more than just one polygon onto this image, i have no
idea how to do this. Do i have to call the...
|
by: smjmitchell |
last post by:
Hi All,
I am developing a application in VB 6.0. I need to plot a 3D mesh of
quadrilateral and triangular polygons. I have this working OK in
wireframe. The question I have is what is the...
|
by: Kristian Frost |
last post by:
Hi,
I'm trying to add, as you might guess, mouseclick listeners to the shapes
I am drawing using the GDI+ commands in a similar sort of way as could be
done with the old VB "shapes".
Problem is,...
|
by: alwayssmiling |
last post by:
Hi,
Im drawing some shapes on the image surface (i.e when im displaying the image ) with the help of graphics. Since i want to move thsese shapes from one place to other place in the...
|
by: weberwhennner |
last post by:
Hi All,
Since two days Ive been trying to draw lines and polygons interactively (using mouse clicks), but all ive found is some libraries that draw shapes using predefined cooredinates.
Ive...
| |
by: Number 11950 - GPEMC! Replace number with 11950 |
last post by:
Are polygonal buttons or perhaps polygons with tooltips and and click events
available in VS8 or is it too early yet?
Thanks in advance...
--
Timothy Casey GPEMC! >11950 is the...
|
by: Hypnotik |
last post by:
Hey everyone. I'm writing a program which allows the user to enter information about 2 shapes, either a square, triangle, or rectangle, then 'adds' the shaps together. The resulting shape is a...
|
by: weird0 |
last post by:
i have successfully emebedded visio drawing tool in my application.
Infinite number of shapes can be added to the drawing.
How can i write double click event handler for the the shapes added
to...
|
by: Sunny |
last post by:
Hi I have a div called shape on my page.
When I try to get its length using javascript in IE, everything works
fine.
But When I try it in Firefox it has element has no properties.
Here is the...
|
by: nttamdn |
last post by:
Anyone help me please.
I want anytime mousemove to one polygon, it's opacity becomes 0.3, and mouseout polygon, i'ts opacity return to 0 again. I means mousemove to show the polygon and hiding it...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| | |