added amb1715 - tracehull

--HG--
branch : sourcemod-1.0.x
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/branches/sourcemod-1.0.x%402208
This commit is contained in:
David Anderson
2008-05-29 03:50:36 +00:00
parent 505687f748
commit e04d7f6b0c
2 changed files with 246 additions and 18 deletions
+113 -18
View File
@@ -1,7 +1,7 @@
/**
* vim: set ts=4 :
* =============================================================================
* SourceMod (C)2004-2007 AlliedModders LLC. All rights reserved.
* SourceMod (C)2004-2008 AlliedModders LLC. All rights reserved.
* =============================================================================
*
* This file is part of the SourceMod/SourcePawn SDK.
@@ -154,25 +154,48 @@ native TR_GetPointContentsEnt(entindex, const Float:pos[3]);
* Starts up a new trace ray using a global trace result.
*
* @param pos Starting position of the ray.
* @param vec Depending on RayType, it will be used as the ending point, or the direction angle.
* @param vec Depending on RayType, it will be used as the
* ending point, or the direction angle.
* @param flags Trace flags.
* @param rtype Method to calculate the ray direction.
* @noreturn
*/
native TR_TraceRay(const Float:pos[3], const Float:vec[3], flags, RayType:rtype);
native TR_TraceRay(const Float:pos[3],
const Float:vec[3],
flags,
RayType:rtype);
/**
* Starts up a new trace ray using a global trace result and a customized trace ray filter.
*
* Calling TR_TraceRayFilter or TR_TraceRayFilterEx from inside a filter function is
* currently not allowed and may not work.
* Starts up a new trace hull using a global trace result.
*
* @param pos Starting position of the ray.
* @param vec Depending on RayType, it will be used as the ending point, or the direction angle.
* @param vec Ending position of the ray.
* @param mins Hull minimum size.
* @param maxs Hull maximum size.
* @param flags Trace flags.
* @noreturn
*/
native TR_TraceHull(const Float:pos[3],
const Float:vec[3],
const Float:mins[3],
const Float:maxs[3],
flags);
/**
* Starts up a new trace ray using a global trace result and a customized
* trace ray filter.
*
* Calling TR_Trace*Filter or TR_Trace*FilterEx from inside a filter
* function is currently not allowed and may not work.
*
* @param pos Starting position of the ray.
* @param vec Depending on RayType, it will be used as the ending
* point, or the direction angle.
* @param flags Trace flags.
* @param rtype Method to calculate the ray direction.
* @param filter Function to use as a filter.
* @param data Arbitrary data value to pass through to the filter function.
* @param data Arbitrary data value to pass through to the filter
* function.
* @noreturn
*/
native TR_TraceRayFilter(const Float:pos[3],
@@ -181,26 +204,74 @@ native TR_TraceRayFilter(const Float:pos[3],
RayType:rtype,
TraceEntityFilter:filter,
any:data=0);
/**
* Starts up a new trace hull using a global trace result and a customized
* trace ray filter.
*
* Calling TR_Trace*Filter or TR_Trace*FilterEx from inside a filter
* function is currently not allowed and may not work.
*
* @param pos Starting position of the ray.
* @param vec Depending on RayType, it will be used as the ending
* point, or the direction angle.
* @param mins Hull minimum size.
* @param maxs Hull maximum size.
* @param flags Trace flags.
* @param filter Function to use as a filter.
* @param data Arbitrary data value to pass through to the filter
* function.
* @noreturn
*/
native TR_TraceHullFilter(const Float:pos[3],
const Float:vec[3],
const Float:mins[3],
const Float:maxs[3],
flags,
TraceEntityFilter:filter,
any:data=0);
/**
* Starts up a new trace ray using a new trace result.
*
* @param pos Starting position of the ray.
* @param vec Depending on RayType, it will be used as the ending point, or the direction angle.
* @param vec Depending on RayType, it will be used as the ending
* point, or the direction angle.
* @param flags Trace flags.
* @param rtype Method to calculate the ray direction.
* @return Ray trace handle, which must be closed via CloseHandle().
*/
native Handle:TR_TraceRayEx(const Float:pos[3], const Float:vec[3], flags, RayType:rtype);
native Handle:TR_TraceRayEx(const Float:pos[3],
const Float:vec[3],
flags,
RayType:rtype);
/**
* Starts up a new trace ray using a new trace result and a customized trace ray filter.
*
* Calling TR_TraceRayFilter or TR_TraceRayFilterEx from inside a filter function is
* currently not allowed and may not work.
* Starts up a new trace hull using a new trace result.
*
* @param pos Starting position of the ray.
* @param vec Depending on RayType, it will be used as the ending point, or the direction angle.
* @param vec Ending position of the ray.
* @param mins Hull minimum size.
* @param maxs Hull maximum size.
* @param flags Trace flags.
* @return Ray trace handle, which must be closed via CloseHandle().
*/
native Handle:TR_TraceHullEx(const Float:pos[3],
const Float:vec[3],
const Float:mins[3],
const Float:maxs[3],
flags);
/**
* Starts up a new trace ray using a new trace result and a customized
* trace ray filter.
*
* Calling TR_Trace*Filter or TR_TraceRay*Ex from inside a filter
* function is currently not allowed and may not work.
*
* @param pos Starting position of the ray.
* @param vec Depending on RayType, it will be used as the ending
* point, or the direction angle.
* @param flags Trace flags.
* @param rtype Method to calculate the ray direction.
* @param filter Function to use as a filter.
@@ -213,6 +284,30 @@ native Handle:TR_TraceRayFilterEx(const Float:pos[3],
RayType:rtype,
TraceEntityFilter:filter,
any:data=0);
/**
* Starts up a new trace hull using a new trace result and a customized
* trace ray filter.
*
* Calling TR_Trace*Filter or TR_Trace*FilterEx from inside a filter
* function is currently not allowed and may not work.
*
* @param pos Starting position of the ray.
* @param vec Ending position of the ray.
* @param mins Hull minimum size.
* @param maxs Hull maximum size.
* @param flags Trace flags.
* @param filter Function to use as a filter.
* @param data Arbitrary data value to pass through to the filter function.
* @return Ray trace handle, which must be closed via CloseHandle().
*/
native Handle:TR_TraceHullFilterEx(const Float:pos[3],
const Float:vec[3],
const Float:mins[3],
const Float:maxs[3],
flags,
TraceEntityFilter:filter,
any:data=0);
/**
* Returns the time fraction from a trace result (1.0 means no collision).