Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
Trace&Visibility API

Modules

 Decals API
 

Data Structures

class  TraceContact
 collision and tracing WARNING: Non-managed, needs manual delete call, should not be ref'd More...
 
class  TraceParam
 
class  TraceSphere
 
class  TraceBox
 
class  TraceOBB
 
class  OcclusionQuery
 

Enumerations

enum  TraceFlags {
  BONES, ENTS, WORLD, ONLY_PHYSICS,
  WATER, PASSTRANSLUCENT, RAGDOLLS, VISTEST,
  NOTRACE, TRANSPARENT_OCCLUDERS
}
 
enum  TraceShape { LINE, BOX, OBB, SPHERE }
 

Functions

class TraceContact TraceLineToEntity (IEntity ent, vector start, vector end, out TraceContact contact)
 
proto volatile float TraceMove (TraceParam param, out IEntity cent, out float plane[4], out int surfparm, func filtercallback)
 
proto native int P2PVisibilityEx (vector from, vector to, int flags)
 
proto int SphereQuery (vector origin, float radius, out IEntity visents[], int ents, int fmask)
 finds all entities in a radius More...
 
proto native bool IsBoxVisible (vector mins, vector maxs, int flags)
 
proto int VisEntities (vector origin, vector look, float angle, float radius, out IEntity ents[2], int maxents, int fmask)
 

Variables

TraceParam TraceLineToEntity
 

Detailed Description

Enumeration Type Documentation

◆ TraceFlags

enum TraceFlags
Enumerator
BONES 
ENTS 
WORLD 
ONLY_PHYSICS 
WATER 
PASSTRANSLUCENT 
RAGDOLLS 
VISTEST 
NOTRACE 
TRANSPARENT_OCCLUDERS 

Definition at line 170 of file enworld.c.

◆ TraceShape

enum TraceShape
Enumerator
LINE 
BOX 
OBB 
SPHERE 

Definition at line 184 of file enworld.c.

Function Documentation

◆ IsBoxVisible()

proto native bool IsBoxVisible ( vector  mins,
vector  maxs,
int  flags 
)

tests if bbox is visible according to view-frustum and PVS

Parameters
flags& 1 - test also PVS
Returns
true/false is/isn't visible

◆ P2PVisibilityEx()

proto native int P2PVisibilityEx ( vector  from,
vector  to,
int  flags 
)

tests visibility

Parameters
from
to
flagsTraceFlags.VISTEST - TraceFlags.DETAIL - test agains detail brushes TraceFlags.ENT - test against brush entities TraceFlags.NOTRACE - doesn't test geometry (has meaning in conjuction with s TraceFlags.VISTEST)
Returns
true is visible/false not visibel

◆ SphereQuery()

proto int SphereQuery ( vector  origin,
float  radius,
out IEntity  visents[],
int  ents,
int  fmask 
)

finds all entities in a radius

◆ TraceLineToEntity()

class TraceContact TraceLineToEntity ( IEntity  ent,
vector  start,
vector  end,
out TraceContact  contact 
)

◆ TraceMove()

proto volatile float TraceMove ( TraceParam  param,
out IEntity  cent,
out float  plane[4],
out int  surfparm,
func  filtercallback 
)

traces line start->end, return 0..1 if trace was sucessfull. It take bboux from ent flag like in P2PVisibilityEx will be added OUTPUT:

Parameters
cent[out] traced entity
plane[out] traced polygon plane (X,Y,Z,D)
surfparm[out] traced surface parameters
Returns
value 0...1, percentage of a path traveled

◆ VisEntities()

proto int VisEntities ( vector  origin,
vector  look,
float  angle,
float  radius,
out IEntity  ents[2],
int  maxents,
int  fmask 
)

finds all visible entities (rought, according to a visibility. It is convinient for entitie selection where we want to do more precise visibility test)

Parameters
origin- position it is looked from
look- look direction
angle- view angle (usuably 90). -1 if we do not care about the view angle
ents- array to which entities will be stored
maxents- length of the array (prevents overflowing the array)
fmask- flag mask (SetFlags()). Entity must have all flags set. it is possible to use reserved flags like EntityFlags.USER1, EntityFlags.USER2, EntityFlags.USER6 for fast finding of entities in custom categories

Variable Documentation

◆ TraceLineToEntity

TraceParam TraceLineToEntity