Blender V2.61 - r43446
Classes | Public Member Functions | Static Public Member Functions | Public Attributes

KX_RayCast Class Reference

#include <KX_RayCast.h>

Inheritance diagram for KX_RayCast:
Inheritance graph
[legend]

List of all members.

Classes

class  Callback

Public Member Functions

 KX_RayCast (KX_IPhysicsController *ignoreController, bool faceNormal, bool faceUV)
virtual ~KX_RayCast ()
virtual void reportHit (PHY_RayCastResult *result)
virtual bool RayHit (KX_ClientObjectInfo *client)=0

Static Public Member Functions

static bool RayTest (PHY_IPhysicsEnvironment *physics_environment, const MT_Point3 &frompoint, const MT_Point3 &topoint, KX_RayCast &callback)

Public Attributes

bool m_hitFound
MT_Point3 m_hitPoint
MT_Vector3 m_hitNormal
const RAS_MeshObjectm_hitMesh
int m_hitPolygon
int m_hitUVOK
MT_Vector2 m_hitUV

Detailed Description

Defines a function for doing a ray cast.

eg KX_RayCast::RayTest(ignore_physics_controller, physics_environment, frompoint, topoint, result_point, result_normal, KX_RayCast::Callback<KX_MyClass>(this, data)

Calls myclass->RayHit(client, hit_point, hit_normal, data) for all client between frompoint and topoint

myclass->RayHit should return true to end the raycast, false to ignore the current client.

Returns true if a client was accepted, false if nothing found.

Definition at line 57 of file KX_RayCast.h.


Constructor & Destructor Documentation

KX_RayCast::KX_RayCast ( KX_IPhysicsController ignoreController,
bool  faceNormal,
bool  faceUV 
)

Definition at line 46 of file KX_RayCast.cpp.

virtual KX_RayCast::~KX_RayCast ( ) [inline, virtual]

Definition at line 69 of file KX_RayCast.h.


Member Function Documentation

virtual bool KX_RayCast::RayHit ( KX_ClientObjectInfo client) [pure virtual]

ray test callback. either override this in your class, or use a callback wrapper.

Implemented in KX_RayCast::Callback< T >.

Referenced by RayTest().

bool KX_RayCast::RayTest ( PHY_IPhysicsEnvironment physics_environment,
const MT_Point3 frompoint,
const MT_Point3 topoint,
KX_RayCast callback 
) [static]
void KX_RayCast::reportHit ( PHY_RayCastResult result) [virtual]

Member Data Documentation

Definition at line 60 of file KX_RayCast.h.

Referenced by KX_ConstraintActuator::RayHit(), RayTest(), and reportHit().

Definition at line 63 of file KX_RayCast.h.

Referenced by reportHit().

Definition at line 64 of file KX_RayCast.h.

Referenced by reportHit().

Definition at line 66 of file KX_RayCast.h.

Referenced by KX_MouseFocusSensor::RayHit(), and reportHit().

Definition at line 65 of file KX_RayCast.h.

Referenced by reportHit().


The documentation for this class was generated from the following files: