Dayz 1.25
Dayz Code Explorer by KGB
Загрузка...
Поиск...
Не найдено
Trace&Visibility API

Topics

 Decals API
 

Структуры данных

class  TraceContact
 collision and tracing WARNING: Non-managed, needs manual delete call, should not be ref'd Подробнее...
 
class  TraceParam
 
class  TraceSphere
 
class  TraceBox
 
class  TraceOBB
 
class  OcclusionQuery
 

Перечисления

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

Функции

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
 
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)
 

Переменные

TraceParam TraceLineToEntity
 

Подробное описание

Перечисления

◆ TraceFlags

Элементы перечислений
BONES 
ENTS 
WORLD 
ONLY_PHYSICS 
WATER 
PASSTRANSLUCENT 
RAGDOLLS 
VISTEST 
NOTRACE 
TRANSPARENT_OCCLUDERS 
171{
172 BONES, //< tests collision geometries around bones of animated objects
173 ENTS, //< tests entities
174 WORLD, //< tests world bounding box
176 WATER, //< tests collision with water surface
177 PASSTRANSLUCENT,//< Do not intersects with entities with EntityFlags.TRANSLUCENT set
178 RAGDOLLS, //< tests ragdolls
179 VISTEST, //< performs visibility test first. Not necessary for entities receiving EntityEvent.VISIBLE, because there is a certainty that a camera will see them
180 NOTRACE,
182};
@ TRANSPARENT_OCCLUDERS
Definition EnWorld.c:181
@ ONLY_PHYSICS
Definition EnWorld.c:175
@ WORLD
Definition EnWorld.c:174
@ PASSTRANSLUCENT
Definition EnWorld.c:177
@ ENTS
Definition EnWorld.c:173
@ WATER
Definition EnWorld.c:176
@ VISTEST
Definition EnWorld.c:179
@ NOTRACE
Definition EnWorld.c:180
@ RAGDOLLS
Definition EnWorld.c:178
@ BONES
Definition EnWorld.c:172

◆ TraceShape

Элементы перечислений
LINE 
BOX 
OBB 
SPHERE 
185{
186 LINE,
187 BOX,
188 OBB,
189 SPHERE
190};
@ BOX
Definition EnWorld.c:187
@ SPHERE
Definition EnWorld.c:189
@ LINE
Definition EnWorld.c:186
@ OBB
Definition EnWorld.c:188

Функции

◆ IsBoxVisible()

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

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

Аргументы
flags& 1 - test also PVS
Возвращает
true/false is/isn't visible

◆ P2PVisibilityEx()

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

tests visibility

Аргументы
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)
Возвращает
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:

Аргументы
cent[out] traced entity
plane[out] traced polygon plane (X,Y,Z,D)
surfparm[out] traced surface parameters
Возвращает
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)

Аргументы
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

Переменные

◆ TraceLineToEntity

TraceParam TraceLineToEntity