source: GTP/trunk/App/Games/Jungle_Rumble/src/physic/physics/include/NxIntersectionRayPlane.h @ 1378

Revision 1378, 2.2 KB checked in by giegl, 18 years ago (diff)

GTPD - Jungle Rumble - integrate into GTP SVN structure

Line 
1#ifndef NX_INTERSECTION_RAY_PLANE
2#define NX_INTERSECTION_RAY_PLANE
3/** \addtogroup physics
4  @{
5*/
6
7#include "Nxp.h"
8#include "PhysXLoader.h"
9class NxRay;
10class NxPlane;
11
12        /**
13        \brief Segment-plane intersection test.
14       
15        Returns distance between v1 and impact point, as well as impact point on plane.
16
17        \warning #NxCreatePhysicsSDK() must be called before using this function.
18
19        \param[in] v1 First vertex of segment. <b>Range:</b> position vector
20        \param[in] v2 Second vertex of segment. <b>Range:</b> position vector
21        \param[in] plane Plane to test against. <b>Range:</b> See #NxPlane
22        \param[out] dist Distance from v1 to impact point (so pointOnPlane=Normalize(v2-v1)*dist).
23        \param[out] pointOnPlane Imapct point on plane.
24
25        <b>Platform:</b>
26        \li PC SW: Yes
27        \li PPU  : Yes
28        \li PS3  : Yes
29        \li XB360: Yes
30        */
31        NX_INLINE       void NX_CALL_CONV       NxSegmentPlaneIntersect(const NxVec3& v1, const NxVec3& v2,
32                const NxPlane& plane, NxReal& dist, NxVec3& pointOnPlane)
33                {
34                return NxGetUtilLib()->NxSegmentPlaneIntersect(v1,v2,plane,dist,pointOnPlane);
35                }
36
37        /**
38        \brief Ray-plane intersection test.
39       
40        Returns distance between ray origin and impact point, as well as impact point on plane.
41
42        \warning #NxCreatePhysicsSDK() must be called before using this function.
43
44        \param[in] ray Ray to test against plane. <b>Range:</b> See #NxRay
45        \param[in] plane Plane to test. <b>Range:</b> See #NxPlane
46        \param[out] dist Distance along ray to impact point (so pointOnPlane=Normalize(v2-v1)*dist).
47        \param[out] pointOnPlane Impact point on the plane.
48
49        \return True on intersection.
50
51        <b>Platform:</b>
52        \li PC SW: Yes
53        \li PPU  : Yes
54        \li PS3  : Yes
55        \li XB360: Yes
56        */
57        NX_INLINE       bool NX_CALL_CONV       NxRayPlaneIntersect(const NxRay& ray, const NxPlane& plane,
58                NxReal& dist, NxVec3& pointOnPlane)
59                {
60                return NxGetUtilLib()->NxRayPlaneIntersect(ray,plane,dist,pointOnPlane);
61                }
62
63/** @} */
64#endif
65
66
67//AGCOPYRIGHTBEGIN
68///////////////////////////////////////////////////////////////////////////
69// Copyright © 2005 AGEIA Technologies.
70// All rights reserved. www.ageia.com
71///////////////////////////////////////////////////////////////////////////
72//AGCOPYRIGHTEND
73
Note: See TracBrowser for help on using the repository browser.