C# Class Universe.Physics.OpenDynamicsEngine.ODERayCastRequestManager

Processes raycast requests as ODE is in a state to be able to do them. This ensures that it's thread safe and there will be no conflicts. Requests get returned by a different thread then they were requested by.
显示文件 Open project: Virtual-Universe/Virtual-Universe Class Usage Examples

Protected Properties

Property Type Description
ContactgeomsArray System.IntPtr
contactsPerCollision int
m_PendingRayRequests List
m_PendingRequests List

Public Methods

Method Description
ODERayCastRequestManager ( ODEPhysicsScene pScene ) : System
ProcessQueuedRequests ( ) : int

Process all queued raycast requests

QueueRequest ( System.Vector3 position, System.Vector3 direction, float length, RaycastCallback retMethod ) : void

Queues a raycast

QueueRequest ( System.Vector3 position, System.Vector3 direction, float length, int count, RayCallback retMethod ) : void

Queues a raycast

Protected Methods

Method Description
NearSpace ( IntPtr space, IntPtr g1, IntPtr g2 ) : void
RayCast ( ODERayCastRequest req ) : void

Method that actually initiates the raycast

RayCast ( ODERayRequest req ) : void

Method that actually initiates the raycast

Private Methods

Method Description
Dispose ( ) : void

Dereference the creator scene so that it can be garbage collected if needed.

GetCurContactGeom ( int index, d &newcontactgeom ) : bool

Method Details

NearSpace() protected method

protected NearSpace ( IntPtr space, IntPtr g1, IntPtr g2 ) : void
space System.IntPtr
g1 System.IntPtr
g2 System.IntPtr
return void

ODERayCastRequestManager() public method

public ODERayCastRequestManager ( ODEPhysicsScene pScene ) : System
pScene ODEPhysicsScene
return System

ProcessQueuedRequests() public method

Process all queued raycast requests
public ProcessQueuedRequests ( ) : int
return int

QueueRequest() public method

Queues a raycast
public QueueRequest ( System.Vector3 position, System.Vector3 direction, float length, RaycastCallback retMethod ) : void
position System.Vector3 Origin of Ray
direction System.Vector3 Ray normal
length float Ray length
retMethod RaycastCallback Return method to send the results
return void

QueueRequest() public method

Queues a raycast
public QueueRequest ( System.Vector3 position, System.Vector3 direction, float length, int count, RayCallback retMethod ) : void
position System.Vector3 Origin of Ray
direction System.Vector3 Ray normal
length float Ray length
count int Ray count
retMethod RayCallback Return method to send the results
return void

RayCast() protected method

Method that actually initiates the raycast
protected RayCast ( ODERayCastRequest req ) : void
req ODERayCastRequest
return void

RayCast() protected method

Method that actually initiates the raycast
protected RayCast ( ODERayRequest req ) : void
req ODERayRequest
return void

Property Details

ContactgeomsArray protected_oe property

protected IntPtr,System ContactgeomsArray
return System.IntPtr

contactsPerCollision protected_oe property

ODE contact array to be filled by the collision testing
protected int contactsPerCollision
return int

m_PendingRayRequests protected_oe property

Pending Raycast Requests
protected List m_PendingRayRequests
return List

m_PendingRequests protected_oe property

Pending Raycast Requests
protected List m_PendingRequests
return List