Jump to content

colrectangles: how to?


Recommended Posts

Posted

You can do whatever you want to... you can even use dxDrawLine3D to make boundaries, dxDrawImage to show points in corners or markers... Do whatever you think suites you.

Posted

You can do whatever you want to... you can even use dxDrawLine3D to make boundaries, dxDrawImage to show points in corners or markers... Do whatever you think suites you.

Posted

I can't believe you cannot do basic rectangle coordinate maths.

As 50p said, the x,y settings you feed in are your point #3 world co-ordinates. Let's call them 100,200.

Then get the other extreme co-ordinates, point #2. I'll name them x2 and y2. Let's say they come out as 400,700.

to get width, it's as simple as x2 - x (300). To get depth, y2 - y (500).

Giving you:

myCol = createColRectangle ( 100.0, 200.0, 300.0, 500.0 )

or

local x, y, x2, y2 = 100.0, 200.0, 400.0, 700.0
myCol = createColRectangle ( x, y, x2 - x, y2 - y )

Posted

I can't believe you cannot do basic rectangle coordinate maths.

As 50p said, the x,y settings you feed in are your point #3 world co-ordinates. Let's call them 100,200.

Then get the other extreme co-ordinates, point #2. I'll name them x2 and y2. Let's say they come out as 400,700.

to get width, it's as simple as x2 - x (300). To get depth, y2 - y (500).

Giving you:

myCol = createColRectangle ( 100.0, 200.0, 300.0, 500.0 )

or

local x, y, x2, y2 = 100.0, 200.0, 400.0, 700.0
myCol = createColRectangle ( x, y, x2 - x, y2 - y )

Posted

This is the kind of stuff you're taught when you're about 8 or 9, you really should know it.

Posted

This is the kind of stuff you're taught when you're about 8 or 9, you really should know it.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...