Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Development

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 09-20-2010, 01:57 PM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

Defined in map.h/map.cpp
Code:
bool LineIntersectsZone(VERTEX start, VERTEX end, float step, VERTEX *result, FACE **on = NULL) const;
Will check if there are any obstacles in between the points defined by the start and end vertices, returning true if there is an obstacle.

I believe the result vertex is the point of collision, and the face 'on' is the triangle that was hit.

Code:
float Map::FindBestZ( NodeRef node_r, VERTEX p1, VERTEX *result, FACE **on) const
Given vertex p1, will return the 'best' Z value for that point. Basically it will cast a ray downwards from point p1 and if it intersects
something, then will return the Z of the face it intersected.

If it finds no ground beneath the given point, it will try again from 10 Z units higher up.

If you look in waypoints.cpp and pathing.cpp, you will find examples of both functions in use.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 10:42 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3