IPhysicalWorld::SRWIParams

#include

Public Member Functions

const SRWIParams & Init (const Vec3 &_org, const Vec3 &_dir, int _objtypes, unsigned int _flags, const SCollisionClass &_collclass, ray_hit *_hits, int _nMaxHits, IPhysicalEntity **_pSkipEnts=0, int _nSkipEnts=0, void *_pForeignData=0, int _iForeignData=0, ray_hit_cached *_phitLast=0, IPhysicalEntity **_pPortals=nullptr, int _nMaxPortals=0)

Public Attributes

void * pForeignData
int iForeignData
int(* OnEvent )(const EventPhysRWIResult *)
Vec3 org
Vec3 dir
int objtypes
unsigned int flags
ray_hit * hits
int nMaxHits
ray_hit_cached * phitLast
int nSkipEnts
IPhysicalEntity ** pSkipEnts
SCollisionClass collclass
IPhysicalEntity ** pPortals
int nMaxPortals

Detailed Description

RayWorldIntersection - steps through the entity grid and raytraces entities traces a finite ray from org along dir, obtypes has uses enum entity_query_flags flags - see enum rwi_flags results are returned in hits. hits[0] is the solid hit, rest are pierceable (negative hit distance means no hit) a hit is solid if ray's pierceability (set in flags) is >= material's piercebility (set in SetSurfaceParameters) OnEvent - optional personal callback to be called instead of the global one returns the total amount of hits detected (solid and pierceable) iCaller specifies which set of global (thread) variables to use; 0..MAX_PHYS_THREADS-1 are reserved for the physics own threads collclass is the collision filter for ignoring entities