csEngineTools Class Reference
This is a class with static helper functions for working on engine data. More...
#include <cstool/enginetools.h>
Static Public Member Functions | |
static float | FindShortestDistance (const csVector3 &source, iSector *sourceSector, const csVector3 &dest, iSector *destSector, float maxradius) |
Given two positions in the world, try to find the shortest distance (using portals if needed) between them and return the final squared distance. |
Detailed Description
This is a class with static helper functions for working on engine data.
Definition at line 33 of file enginetools.h.
Member Function Documentation
|
Given two positions in the world, try to find the shortest distance (using portals if needed) between them and return the final squared distance. Note! This function will ignore all portals if the source and destination sectors are the same. Even if there might be a possible shorter path between the two positions using some space warping portal. An exception to this is if the distance is greater then the max distance. In that case this function will attempt to try out portals in the current sector to see if there is a shorter path anyway. Note that this routine will ignore visibility. It will simply calculate the distance between the two points through some portal path. However, this function will check if the portal is oriented towards the source point (i.e it doesn't ignore visibility with regards to backface culling). Note that this function only considers the center point of a portal for calculating the distance. This might skew results with very big portals. This function will correctly account for space warping portals.
|
The documentation for this class was generated from the following file:
- cstool/enginetools.h
Generated for Crystal Space by doxygen 1.4.4