DayZ 1.24
Loading...
Searching...
No Matches
DayZPhysics Class Reference

Private Member Functions

void DayZPhysics ()
 
void ~DayZPhysics ()
 

Static Private Member Functions

static proto bool RaycastRV (vector begPos, vector endPos, out vector contactPos, out vector contactDir, out int contactComponent, set< Object > results=NULL, Object with=NULL, Object ignore=NULL, bool sorted=false, bool ground_only=false, int iType=ObjIntersectView, float radius=0.0, CollisionFlags flags=CollisionFlags.NEARESTCONTACT)
 Raycasts world by given parameters.
 
static proto bool GetHitSurface (Object other, vector begPos, vector endPos, string surface)
 
static proto bool GetHitSurfaceAndLiquid (Object other, vector begPos, vector endPos, string surface, out int liquidType)
 
static proto bool RaycastRVProxy (notnull RaycastRVParams in, out notnull array< ref RaycastRVResult > results, array< Object > excluded=null)
 
static proto bool RayCastBullet (vector begPos, vector endPos, PhxInteractionLayers layerMask, Object ignoreObj, out Object hitObject, out vector hitPosition, out vector hitNormal, out float hitFraction)
 
static proto bool SphereCastBullet (vector begPos, vector endPos, float radius, PhxInteractionLayers layerMask, Object ignoreObj, out Object hitObject, out vector hitPosition, out vector hitNormal, out float hitFraction)
 
static proto bool GeometryOverlapBullet (vector transform[4], dGeom geometry, PhxInteractionLayers layerMask, notnull CollisionOverlapCallback callback)
 
static proto bool EntityOverlapBullet (vector transform[4], IEntity entity, PhxInteractionLayers layerMask, notnull CollisionOverlapCallback callback)
 
static proto bool EntityOverlapSingleBullet (vector transform[4], IEntity entity, PhxInteractionLayers layerMask, notnull CollisionOverlapCallback callback)
 
static proto bool SphereOverlapBullet (vector position, float radius, PhxInteractionLayers layerMask, notnull CollisionOverlapCallback callback)
 
static proto bool CylinderOverlapBullet (vector transform[4], vector extents, PhxInteractionLayers layerMask, notnull CollisionOverlapCallback callback)
 
static proto bool CapsuleOverlapBullet (vector transform[4], float radius, float height, PhxInteractionLayers layerMask, notnull CollisionOverlapCallback callback)
 
static proto bool BoxOverlapBullet (vector transform[4], vector extents, PhxInteractionLayers layerMask, notnull CollisionOverlapCallback callback)
 

Detailed Description

Definition at line 123 of file DayZPhysics.c.

Constructor & Destructor Documentation

◆ DayZPhysics()

void DayZPhysics::DayZPhysics ( )
inlineprivate

Definition at line 125 of file DayZPhysics.c.

125{}

◆ ~DayZPhysics()

void DayZPhysics::~DayZPhysics ( )
inlineprivate

Definition at line 126 of file DayZPhysics.c.

126{}

Member Function Documentation

◆ BoxOverlapBullet()

static proto bool DayZPhysics::BoxOverlapBullet ( vector transform[4],
vector extents,
PhxInteractionLayers layerMask,
notnull CollisionOverlapCallback callback )
staticprivate

◆ CapsuleOverlapBullet()

static proto bool DayZPhysics::CapsuleOverlapBullet ( vector transform[4],
float radius,
float height,
PhxInteractionLayers layerMask,
notnull CollisionOverlapCallback callback )
staticprivate

◆ CylinderOverlapBullet()

static proto bool DayZPhysics::CylinderOverlapBullet ( vector transform[4],
vector extents,
PhxInteractionLayers layerMask,
notnull CollisionOverlapCallback callback )
staticprivate

◆ EntityOverlapBullet()

static proto bool DayZPhysics::EntityOverlapBullet ( vector transform[4],
IEntity entity,
PhxInteractionLayers layerMask,
notnull CollisionOverlapCallback callback )
staticprivate

◆ EntityOverlapSingleBullet()

static proto bool DayZPhysics::EntityOverlapSingleBullet ( vector transform[4],
IEntity entity,
PhxInteractionLayers layerMask,
notnull CollisionOverlapCallback callback )
staticprivate

◆ GeometryOverlapBullet()

static proto bool DayZPhysics::GeometryOverlapBullet ( vector transform[4],
dGeom geometry,
PhxInteractionLayers layerMask,
notnull CollisionOverlapCallback callback )
staticprivate

◆ GetHitSurface()

static proto bool DayZPhysics::GetHitSurface ( Object other,
vector begPos,
vector endPos,
string surface )
staticprivate

◆ GetHitSurfaceAndLiquid()

static proto bool DayZPhysics::GetHitSurfaceAndLiquid ( Object other,
vector begPos,
vector endPos,
string surface,
out int liquidType )
staticprivate

◆ RayCastBullet()

static proto bool DayZPhysics::RayCastBullet ( vector begPos,
vector endPos,
PhxInteractionLayers layerMask,
Object ignoreObj,
out Object hitObject,
out vector hitPosition,
out vector hitNormal,
out float hitFraction )
staticprivate

◆ RaycastRV()

static proto bool DayZPhysics::RaycastRV ( vector begPos,
vector endPos,
out vector contactPos,
out vector contactDir,
out int contactComponent,
set< Object > results = NULL,
Object with = NULL,
Object ignore = NULL,
bool sorted = false,
bool ground_only = false,
int iType = ObjIntersectView,
float radius = 0.0,
CollisionFlags flags = CollisionFlags.NEARESTCONTACT )
staticprivate

Raycasts world by given parameters.

Parameters
begPosvector Begin position of raycast (e.g. player position)
endPosvector End position of raycast (e.g. player direction)
contactPosvector out, world position of first contact
contactDirvector out, direction of first contact (available only when object is hitted)
contactComponentint out, object component index (available only when object is hitted)
resultsset<Object> out, set of objects hitted by raycast. Can be NULL if not needed
withObject Ignores the object from collision. Used only when ground_only is false. Can be NULL if not needed
ignoreObject Ignores the object from collision. Used only when ground_only is false. Can be NULL if not needed
sortedbool Default value is false, used only if ground_only = false
ground_only\bool raycasts only ground (ignores all objects). Default value is false if not needed.
iTypeint, type of intersection, possible values ObjIntersectFire(0), ObjIntersectView(1), ObjIntersectGeom(2), ObjIntersectIFire(3), ObjIntersectNone(4)
radiusfloat Radius of the ray, default value set to 0
Returns
bool return true if raycast hits ground or object
// raycast test
PlayerBase player = g_Game.GetPlayer();
if (player)
{
vector begPos = player.GetPosition();
vector endPos = begPos + (player.GetDirection() * 100);
Object with;
Object ignore;
bool sorted;
int iType;
float radius;
if ( GetGame().Raycast(begPos, endPos, contactPos, contactDir, contactComponent, results, with, ignore, sorted, ground_only, iType, radius) )
{
Print(begPos);
Print(endPos);
Print(with);
Print(ignore);
Print(sorted);
Print(radius);
Print( GetGame().Raycast(begPos, endPos, contactPos, contactDir, contactComponent, results, with, ignore, sorted, ground_only, iType, radius) );
}
}
>> vector begPos = 0x00000000dd62df30 {<750.573,49.8043,2167.25>}
>> vector endPos = 0x00000000dd62df3c {<849.589,49.8043,2181.25>}
>> vector contactPos = 0x00000000dd62df48 {<751.068,49.8043,2167.32>}
>> vector contactDir = 0x00000000dd62df54 {<0.987203,2.04891e-08,0.139505>}
>> int contactComponent = 8
>> Object with = NULL
>> Object ignore = NULL
>> bool sorted = 0
>> bool ground_only = 0
>> int iType = 0
>> float radius = 0
>> 1
DayZGame g_Game
Definition DayZGame.c:3528
proto native CGame GetGame()
proto void Print(void var)
Prints content of variable to console/log.

Referenced by PoweredOptic_Base::DoMeasurement(), ItemBase::DoMeasurement(), WeaponDebug::DrawLineOfFire(), WeaponDebug::DrawLineOfFireCameraHybrid(), WeaponDebug::DrawLineOfFireMuzzleToHit(), Event_OnClick(), PluginBase::Event_OnClick(), PluginBase::Event_OnClickMiddle(), PluginBase::Event_OnDoubleClick(), PluginBase::Event_OnDrag(), FloatingCrossHair(), ManBase::GetAimPosition(), UIScriptedMenu::GetCameraLookDir(), GetCeilingHeight(), UIScriptedMenu::GetMouseLookDir(), PluginBase::GetMousePositionInScene(), GetProjectedCursorPos3d(), Hologram::GetProjectionEntityPosition(), AreaDamageBase::GetRaycastedHitZone(), HitZoneSelection(), HitZoneSelectionRaycast(), Hologram::IsBaseViable(), Hologram::IsInTerrain(), IsObjectObstructedFilterEx(), IsUnderRoofEx(), UIScriptedMenu::OnClick(), ScriptConsoleItemsTab::OnClick(), ScriptConsoleItemsTab::OnDoubleClick(), Hologram::SetOnGround(), and DeveloperTeleport::TeleportAtCursor().

◆ RaycastRVProxy()

◆ SphereCastBullet()

static proto bool DayZPhysics::SphereCastBullet ( vector begPos,
vector endPos,
float radius,
PhxInteractionLayers layerMask,
Object ignoreObj,
out Object hitObject,
out vector hitPosition,
out vector hitNormal,
out float hitFraction )
staticprivate

◆ SphereOverlapBullet()

static proto bool DayZPhysics::SphereOverlapBullet ( vector position,
float radius,
PhxInteractionLayers layerMask,
notnull CollisionOverlapCallback callback )
staticprivate

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