Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / EZro_objRotateSurfToSurf command usage ..

Author
Message
Frans
17
Years of Service
User Offline
Joined: 12th Sep 2008
Location: Netherlands
Posted: 11th Apr 2010 14:38
Hallo,

I need help on the EZro_objRotateSurfToSurf command usage in conjunction with EZro_findNormal on wich it builds.

Only found an abandoned post about it from 2005 wich led to the
package-included demo 09_PolyAlignment.dbpro.

Unfortunatly I\'m not able to draw any conclusions from it.
Is anybody willing to reach a helping hand?

I am using EZrotate Enhanced version 4.0

Kind regards,

Frans
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 12th Apr 2010 13:41
I'll help if I can

Some code or a rough idea what the problem is would help though...

Frans
17
Years of Service
User Offline
Joined: 12th Sep 2008
Location: Netherlands
Posted: 12th Apr 2010 16:00
I want to learn how to use EZro_objRotateSurfToSurf and understand EZro_findNormal's parameters for the following:

'There are' 2 objects of wich one is moving back and forth, and the other has to keep pointing to it al the time.
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 12th Apr 2010 19:09
I wouldn't use these commands for this purpose as there are much easier ways to do it... in fact this is remarkably difficult using these commands!

The help for EZro_objRotateSurfToSurf says the following (maybe it will help):
Quote: "
This command will rotate your object from any surface toward another surface by the angle specified. The surfaces are specified using normals. You can easily find the normal of a surface by using the EZro_FindNormal command.

An example usage of this command would be to rotate a ship to land on a landing pad. Find a normal for the surface of the ship that you want to land on the docking pad. You would then find a normal of the landing surface. In the parameter list shown below, the ship's surface normal would be ObjNormX#, ObjNormY#, ObjNormZ#. The landing pad's surface normal would be the SurfNormX#, SurfNormY#, SurfNormZ# parameters. Your ship would then rotate from its specified surface toward the landing surface by the angle specified in the final parameter.

SYNTAX
EZro_ObjRotateSurfToSurf ObjNo, ObjNormX#, ObjNormY#, ObjNormZ#, SurfNormX#, SurfNormY#, SurfNormZ#, angle#
"

You could only use this to point at another object if the other object also happened to be looking at the object you want to rotate...

If this is the purpose you want to use this command for then I would suggest there are many other better ways to achieve the same results. If this was just an example then it is not a very practical one.

In the interests of helping you understand the command better anyway I tried to whip up a short example for you but I got the following error for this command!?!?
"Could not understand command at line 70."


It highlights it anyway but then doesn't understand it...

Here is the full code I started but cannot test as it doesn't compile (so you too can sit and wonder...)


Hope it helps

Frans
17
Years of Service
User Offline
Joined: 12th Sep 2008
Location: Netherlands
Posted: 12th Apr 2010 19:43
Baxslash I am realy shocked by the amount off effort you put in trying to help me out here.
I shall study it and certainly will learn from it.

Many thanks,

Frans
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 12th Apr 2010 22:08
It's not all my own work, the function for getting vertex positions is borrowed from I don't know where at least and some is from other projects of my own!

Part of the fun of DBP for me is passing on what I have learned!



Frans
17
Years of Service
User Offline
Joined: 12th Sep 2008
Location: Netherlands
Posted: 12th Apr 2010 22:18
I have respect for what you just said.
Maybe one day I shall be able to contribute myself ...

Frans
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 12th Apr 2010 22:55
Where are you from by the way? I lived in Eindhoven (Aldenriel 12) for about two years (aged 5-7) and used to speak dutch quite well!

Frans
17
Years of Service
User Offline
Joined: 12th Sep 2008
Location: Netherlands
Posted: 13th Apr 2010 00:29
That's funny!
I was born in Amsterdam in 1947 but the last 20 years or so I live in Almere.

So lets talk dutch fro now on ..
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 13th Apr 2010 10:43
Quote: "So lets talk dutch fro now on .. "

hmmm... I don't think my dutch spelling (or speaking) would amount to much more than "Ik ben Engels" these days! Although I can still count up to about a thousand in dutch...

I just checked my spelling on babelfish and it was spot on so you never know!!

Frans
17
Years of Service
User Offline
Joined: 12th Sep 2008
Location: Netherlands
Posted: 13th Apr 2010 13:23
Goed zo, ik hoor van je!

Login to post a reply

Server time is: 2026-07-26 12:33:22
Your offset time is: 2026-07-26 12:33:22