DayZ 1.26
DayZ Explorer by KGB
Загрузка...
Поиск...
Не найдено
Debug Shape API definition

Topics

 Diag menu API definition
 

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

enum  ShapeType {
  BBOX , LINE , SPHERE , CYLINDER ,
  DIAMOND , PYRAMID
}
 
enum  ShapeFlags {
  NOZBUFFER , NOZWRITE , WIREFRAME , TRANSP ,
  DOUBLESIDE , ONCE , NOOUTLINE , BACKFACE ,
  NOCULL , VISIBLE , ADDITIVE
}
 
enum  CollisionFlags
 

Функции

proto native void GetMatrix (out vector mat[4])
 
proto native void SetMatrix (vector mat[4])
 
proto native void SetDirection (vector direction)
 
proto native void SetPosition (vector position)
 Set the world position of the Effect.
 
proto native void SetColor (int color)
 
proto native void SetFlags (ShapeFlags flags)
 
proto native void Destroy ()
 Cleans up the Effect, including unregistering if needed.
 
static proto native Shape Create (ShapeType type, int color, ShapeFlags flags, vector p1, vector p2)
 
static proto native Shape CreateLines (int color, ShapeFlags flags, vector p[], int num)
 
static proto native Shape CreateTris (int color, ShapeFlags flags, vector p[], int num)
 
static proto native Shape CreateSphere (int color, ShapeFlags flags, vector origin, float radius)
 
static proto native Shape CreateFrustum (float horizontalAngle, float verticalAngle, float length, int color, ShapeFlags flags)
 
static proto native Shape CreateCylinder (int color, ShapeFlags flags, vector origin, float radius, float length)
 
static Shape CreateArrow (vector from, vector to, float size, int color, ShapeFlags flags)
 
static Shape CreateBridgeArrow (vector from, vector to, float size, int color, ShapeFlags flags)
 
static void CreateMatrix (vector mat[4])
 

Переменные

enum ShapeType ErrorEx
 

Destroy

Methods regarding automatic cleanup

void SetAutodestroy (bool auto_destroy)
 Sets whether Effect automatically cleans up when it stops.
 
bool IsAutodestroy ()
 Get whether Effect automatically cleans up when it stops.
 
bool IsPendingDeletion ()
 Get whether the Effect is queued up for being cleaned up.
 
bool CanDestroy ()
 Get whether the Effect can be destroyed right now.
 
void SetEnableEventFrame (bool enable)
 Enable Event_OnFrameUpdate for the effect.
 

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

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

◆ CollisionFlags

141{
142 FIRSTCONTACT, //<In many cases only collided=true/false is enough
143 NEARESTCONTACT //<We want only one, the nearest contact
144 ONLYSTATIC //<Only static objects
145 ONLYDYNAMIC //<Only dynamic objects
146 ONLYWATER //<Only water components (legacy support for "walk on geometry")
147 ALLOBJECTS //<Valid when CF_FIRST_CONTACT, we get first contact for each object
148}
Definition EntityAI.c:95
FIRSTCONTACT
Definition EnDebug.c:0
NEARESTCONTACT ONLYSTATIC ONLYDYNAMIC ONLYWATER ALLOBJECTS
Definition EnDebug.c:6

◆ ShapeFlags

Элементы перечислений
NOZBUFFER 
NOZWRITE 
WIREFRAME 
TRANSP 
DOUBLESIDE 
ONCE 
NOOUTLINE 
BACKFACE 
NOCULL 
VISIBLE 
ADDITIVE 
126{
127 NOZBUFFER, //< Do not compare z-buffer when render
128 NOZWRITE, //< Do not update z-buffer when render
129 WIREFRAME, //< Render just wire-frame outline. No solid faces
130 TRANSP, //< Is translucent
131 DOUBLESIDE, //< Double-sided (do not cull back-faces)
132 ONCE, //< Rendered just once and then it's automatically destroyed. Do not keep pointer to these!!
133 NOOUTLINE, //< Render just solid faces. No wire-frame outline.
134 BACKFACE, //< Render just back faces
135 NOCULL, //< Do not cull shapes by view frustum
136 VISIBLE, //< Make it visible. Set by default
137 ADDITIVE //< Additive blending (works with ShapeFlags.TRANSP)
138};
@ NOZWRITE
Definition EnDebug.c:128
@ NOOUTLINE
Definition EnDebug.c:133
@ DOUBLESIDE
Definition EnDebug.c:131
@ WIREFRAME
Definition EnDebug.c:129
@ BACKFACE
Definition EnDebug.c:134
@ NOCULL
Definition EnDebug.c:135
@ VISIBLE
Definition EnDebug.c:136
@ ADDITIVE
Definition EnDebug.c:137
@ TRANSP
Definition EnDebug.c:130
@ NOZBUFFER
Definition EnDebug.c:127
@ ONCE
Definition EnDebug.c:132

◆ ShapeType

Элементы перечислений
BBOX 
LINE 
SPHERE 
CYLINDER 
DIAMOND 
PYRAMID 
116{
117 BBOX, //< Just box
118 LINE, //< One or more lines
119 SPHERE, //< Sphere represented by triangle mesh
120 CYLINDER, //< Cylinder represented by triangle mesh
121 DIAMOND, //< Eight faced pyramid. Defined by bound-box, where middle part is equal to horizontal extents of box and top/bottom apogees lies on top/bottom side of box.
122 PYRAMID //< Four sided pyramid. Defined by bound-box, where base is equal to bottom side of box.
123};
@ SPHERE
Definition EnDebug.c:119
@ PYRAMID
Definition EnDebug.c:122
@ DIAMOND
Definition EnDebug.c:121
@ LINE
Definition EnDebug.c:118
@ BBOX
Definition EnDebug.c:117
@ CYLINDER
Definition EnDebug.c:120

Функции

◆ CanDestroy()

bool CanDestroy ( )
protected

Get whether the Effect can be destroyed right now.

Возвращает
bool Whether the Effect can be destroyed right now
268 {
269 return true;
270 }

◆ Create()

static proto native Shape Create ( ShapeType type,
int color,
ShapeFlags flags,
vector p1,
vector p2 )
static

Используется в CreateMatrix().

◆ CreateArrow()

static Shape CreateArrow ( vector from,
vector to,
float size,
int color,
ShapeFlags flags )
static
174 {
175 vector dir = to - from;
176 dir.Normalize();
177 vector dir1 = dir * size;
178 size = size * 0.5;
179
180 vector dir2 = dir.Perpend() * size;
181
182 vector pts[5];
183 pts[0] = from;
184 pts[1] = to;
185 pts[2] = to - dir1 - dir2;
186 pts[3] = to - dir1 + dir2;
187 pts[4] = to;
188
189 return CreateLines(color, flags, pts, 5);
190 }
Definition EnConvert.c:106
proto float Normalize()
Normalizes vector. Returns length.
vector Perpend()
Returns perpendicular vector. Perpendicular vector is computed as cross product between input vector ...
Definition EnConvert.c:209
static proto native Shape CreateLines(int color, ShapeFlags flags, vector p[], int num)

Перекрестные ссылки CreateLines(), vector::Normalize() и vector::Perpend().

◆ CreateBridgeArrow()

static Shape CreateBridgeArrow ( vector from,
vector to,
float size,
int color,
ShapeFlags flags )
static
193 {
194 vector dir = to - from;
195 dir.Normalize();
196
197 vector dir1 = Vector(0, 0, -size);
198 size = size * 0.5;
199
200 vector dir2 = dir.Perpend() * size;
201
202 vector pts[7];
203 pts[0] = from;
204 pts[1] = from + "0 0 1";
205 pts[2] = to + "0 0 1";
206 pts[3] = to;
207 pts[4] = to - dir1 - dir2;
208 pts[5] = to - dir1 + dir2;
209 pts[6] = to;
210
211 return CreateLines(color, flags, pts, 7);
212 }
proto native vector Vector(float x, float y, float z)
Vector constructor from components.

Перекрестные ссылки CreateLines(), vector::Normalize(), vector::Perpend() и Vector().

◆ CreateCylinder()

static proto native Shape CreateCylinder ( int color,
ShapeFlags flags,
vector origin,
float radius,
float length )
static

◆ CreateFrustum()

static proto native Shape CreateFrustum ( float horizontalAngle,
float verticalAngle,
float length,
int color,
ShapeFlags flags )
static

◆ CreateLines()

static proto native Shape CreateLines ( int color,
ShapeFlags flags,
vector p[],
int num )
static

Используется в CreateArrow() и CreateBridgeArrow().

◆ CreateMatrix()

static void CreateMatrix ( vector mat[4])
static
215 {
216 vector org = mat[3];
217 int flags = ShapeFlags.NOZWRITE|ShapeFlags.DOUBLESIDE|ShapeFlags.TRANSP|ShapeFlags.ONCE;
218 Create(ShapeType.LINE, 0xffff0000, flags, org, mat[0] * 0.5 + org);
219 Create(ShapeType.LINE, 0xff00ff00, flags, org, mat[1] * 0.5 + org);
220 Create(ShapeType.LINE, 0xff0000ff, flags, org, mat[2] * 0.5 + org);
221 }
static proto native Shape Create(ShapeType type, int color, ShapeFlags flags, vector p1, vector p2)
ShapeType
Definition EnDebug.c:116
ShapeFlags
Definition EnDebug.c:126

Перекрестные ссылки Create().

◆ CreateSphere()

static proto native Shape CreateSphere ( int color,
ShapeFlags flags,
vector origin,
float radius )
static

◆ CreateTris()

static proto native Shape CreateTris ( int color,
ShapeFlags flags,
vector p[],
int num )
static

◆ Destroy()

proto native void Destroy ( )

Cleans up the Effect, including unregistering if needed.

Заметки
Will stop the Effect and queue up the deletion in the callqueue
Is intended for usage from within the Effect itself, use SEffectManager.DestroyEffect when working from a pointer

Cleans up the Effect, including unregistering if needed.

215 {
216 // Already queued
217 if (IsPendingDeletion())
218 return;
219
220 // Mark it to prevent queuing it up multiple times or get stuck in a call loop
221 m_IsPendingDeletion = true;
222
223 // Stop it, so that the effects can clean up themselves
224 // Since if for example this is EffectParticle and the particle is looping
225 // It NEEDS to be stopped to clean up the Particle
226 Stop();
227
228 // Queue up the destroying, as we should not do it while we are accessing it here
229 if (GetGame())
230 {
232 }
233 }
void Stop()
Stops all elements this effect consists of.
Definition Effect.c:181
bool m_IsPendingDeletion
Whether the Destroy process has already been called.
Definition Effect.c:35
Manager class for managing Effect (EffectParticle, EffectSound)
Definition EffectManager.c:6
static void DestroyEffect(Effect effect)
Unregisters, stops and frees the Effect.
Definition EffectManager.c:271
proto native CGame GetGame()
bool IsPendingDeletion()
Get whether the Effect is queued up for being cleaned up.
Definition Effect.c:258
const int CALL_CATEGORY_GAMEPLAY
Definition tools.c:10

Перекрестные ссылки CALL_CATEGORY_GAMEPLAY, DestroyDamageTriggerEx(), SEffectManager::DestroyEffect(), GetGame(), IsPendingDeletion(), m_IsPendingDeletion, OnTriggerDestroyed() и Stop().

Используется в EntityLightSource::CheckLifetime(), EntityLightSource::HandleBrightnessFadeing(), EntityLightSource::HandleRadiusFadeing() и ~AreaDamageManager().

◆ GetMatrix()

proto native void GetMatrix ( out vector mat[4])

◆ IsAutodestroy()

bool IsAutodestroy ( )
protected

Get whether Effect automatically cleans up when it stops.

Возвращает
bool Whether Effect automatically cleans up when it stops
250 {
251 return m_IsAutodestroy;
252 }
bool m_IsAutodestroy
Whether the Effect cleans up after itself when stopped.
Definition Effect.c:33

Перекрестные ссылки m_IsAutodestroy.

◆ IsPendingDeletion()

bool IsPendingDeletion ( )
protected

Get whether the Effect is queued up for being cleaned up.

Возвращает
bool Whether the Effect is queued up for being cleaned up
259 {
260 return m_IsPendingDeletion;
261 }

Перекрестные ссылки m_IsPendingDeletion.

Используется в Destroy(), Entity::IsSetForDeletion() и EffectSound::SoundStop().

◆ SetAutodestroy()

void SetAutodestroy ( bool auto_destroy)
protected

Sets whether Effect automatically cleans up when it stops.

Заметки
This means that it will be unregistered from SEffectManager as well
Аргументы
auto_destroybool Whether Effect automatically cleans up when it stops
241 {
243 }

Перекрестные ссылки m_IsAutodestroy.

◆ SetColor()

proto native void SetColor ( int color)

Используется в InventoryItem::ReadVarsFromCTX().

◆ SetDirection()

proto native void SetDirection ( vector direction)

◆ SetEnableEventFrame()

void SetEnableEventFrame ( bool enable)
protected

Enable Event_OnFrameUpdate for the effect.

Заметки
Read SEffectManager.Event_OnFrameUpdate for more info
281 {
282 if ( enable )
283 {
285 }
286 else
287 {
289 }
290 }
void Event_OnFrameUpdate(float time_delta)
Event called on frame when enabled by SetEnableEventFrame(true)
Definition Effect.c:345
static ref ScriptInvoker Event_OnFrameUpdate
Static invoker for the SEffectManager.Event_OnFrameUpdate called form MissionGameplay....
Definition EffectManager.c:24

Перекрестные ссылки Event_OnFrameUpdate() и SEffectManager::Event_OnFrameUpdate.

Используется в EffEngineSmoke::EffEngineSmoke(), EffectSound::UpdateEvents() и ~Effect().

◆ SetFlags()

◆ SetMatrix()

proto native void SetMatrix ( vector mat[4])

◆ SetPosition()

proto native void SetPosition ( vector pos)

Set the world position of the Effect.

Предупреждения
Only sets the cached variable, for immediate effect use SetCurrent variant
Аргументы
posvector The world position for the Effect
439 {
440 m_Position = pos;
441 }
vector m_Position
Cached world position.
Definition Effect.c:41

Перекрестные ссылки m_Position.

Используется в Particle::AddAsChild(), EntityLightSource::AttachOnObject(), ScriptedWidgetEventHandler::CreateFollowedObject(), DynamicArea_Flare::EOnFrame(), DayZSpectator::EOnFrame(), ScriptedWidgetEventHandler::GetPosition(), EntityLightSource::HandleDancingShadows(), PointLightBase::OnFrameLightSource(), OnPlacementComplete(), ManBase::OnStoreLoad(), ItemBase::PlaceOnGround(), SetCurrentPosition(), TrapSpawnBase::SetupTrap(), SetupTrapPlayer(), ItemBase::SetupTrapPlayer(), Particle::StopParticle() и UnlockServer().

Переменные

◆ ErrorEx

enum ShapeType ErrorEx

Используется в AddModifier(), And(), ScriptedWidgetEventHandler::Apply(), GameInventory::AreChildrenAccessible(), Assert(), EntityLightSource::AttachOnMemoryPoint(), Entity::AttemptDestructionBehaviour(), WeaponParticlesBase::CheckParticleOverride(), SEffectManager::Cleanup(), ConstructData(), EmoteConstructor::ConstructEmotes(), CreateBleedingEffect(), Particle::CreateParticleEffect(), ParticleSource::CreateParticleEffect(), CreateParticleEx(), ParticleSource::CreateParticleEx(), CreateResultDataStructure(), CreditsLoader::CreateTestJson(), Weapon::CreateWeaponWithAmmo(), StaminaHandler::DepleteStamina(), ParticleSource::DestroyParticleEffect(), array< Class T >::DifferentAtPosition(), Effect(), SEffectManager::EffectRegister(), EmoteBase::EmoteFBStanceCheck(), ParticleSource::EOnFrame(), MenuDefaultCharacterData::EquipDefaultCharacter(), ImpactMaterials::EvaluateImpactEffect(), Math::Factorial(), Ammunition_Base::GetAmmoWeightByBulletType(), FireworksLauncher::GetColorSequence(), GetControlMappingInfo(), UIScriptedMenu::GetControlMappingInfo(), DayZPlayerCameraBase::GetCurrentSightInfo(), HitDirectionEffectBase::GetCurrentType(), Weapon_Base::GetCylinderRotation(), CreditsLoader::GetData(), DlcDataLoader::GetData(), UndergroundAreaLoader::GetData(), EffectAreaLoader::GetData(), UIScriptedMenu::GetData(), JsonMissionLoaderData::GetData(), FireworksLauncherClientEvent::GetExplParticleFromSequence(), AnniversaryFireworksLauncherClientEvent::GetExplParticleFromSequence(), GetLastClientMessage(), GetLastServerMessage(), GetLightPosition(), WorldData::GetLiquidTypeEnviroTemperature(), GetMemoryPointPosition(), Weapon::GetMuzzleStates(), ParticleList::GetParticleID(), ParticleList::GetParticleIDByName(), ParticleList::GetParticlePath(), GameplayEffectsData::GetProbabilities(), DayZProfilesOptions::GetProfileOptionDefaultBool(), DayZProfilesOptions::GetProfileOptionDefaultFloat(), DayZProfilesOptions::GetProfileOptionDefaultInt(), GetStringVariant(), Hologram::Hologram(), ScriptedWidgetEventHandler::Init(), Init(), InitCatchingItemData(), BleedChanceData::InitInfectedChanceMap(), CatchingContextTrapsBase::InitItemValues(), BleedChanceData::InitMeleeChanceMap(), Interact(), Hologram::IsBehindObstacle(), IsFacingFireplace(), IsParticlePlaying(), JsonFileLoader< Class T >::JsonLoadData(), JsonFileLoader< Class T >::JsonLoadFile(), LoadConfig(), ScriptedWidgetEventHandler::LoadContentList(), CfgGameplayHandler::LoadData(), CfgPlayerRestrictedAreaHandler::LoadData(), PlayerSpawnHandler::LoadData(), ScriptedWidgetEventHandler::LoadFilters(), NotificationSystem::LoadNotificationData(), LoadPlayerAttachmentIndexes(), AmmoTypesAPI::MagazineTypeToAmmoType(), WeaponParticlesBase::OnActivate(), ParticleSource::OnCheckAutoDelete(), MissionBase::OnClientNewEvent(), OnErrorThrown(), ActionDigInStash::OnFinishProgressServer(), OnFinishProgressServer(), ActionUnrestrainTargetHands::OnFinishProgressServer(), OnInit(), InventoryItem::OnQuantityChanged(), CfgGameplayHandler::OnRPC(), CfgPlayerRestrictedAreaHandler::OnRPC(), UndergroundAreaLoader::OnRPC(), CGame::OnRPC(), ParticleSource::OnToDelete(), Or(), PlayEmote(), SEffectManager::PlayOnObject(), PlayParticle(), DestructionEffectBase::PlayParticle(), PlayParticleEx(), IEntity::PlaySoundSetAtMemoryPoint(), HFSMBase< WeaponStateBase, WeaponEventBase, WeaponActionBase, WeaponGuardBase >::RandomizeFSMStateEx(), InventoryLocation::ReadFromContext(), GameplayEffectsData::RegisterData(), ParticleList::RegisterParticle(), ParticleList::RegisterParticleByFullPath(), SymptomManager::RegisterSymptom(), UIScriptedMenu::ResetAll(), ResetParticle(), RestartParticle(), CatchingResultBase::RollChanceSeeded(), TFModule::Run(), array::Run(), UIScriptedMenu::SaveData(), ScriptedWidgetEventHandler::SaveFilters(), Entity::SetAttachmentExclusionMaskSlot(), ManBase::SetHairLevelToHide(), YieldItemBase::SetRegistrationIdx(), SetupInitialTypes(), FireworksLauncherClientEvent::SetupLight(), AnniversaryFireworksLauncherClientEvent::SetupLight(), SetupProbabilityArray(), ItemOptics::ShowReddot(), EffectSound::SoundError(), SpawnAndSetupCatch(), Weapon::SpawnAttachedMagazine(), ObjectSpawnerHandler::SpawnObjects(), SpawnDataConverter::SpawnObjects(), SymptomManager::SpawnSymptom(), SEffectManager::Stop(), StopParticle(), ClientData::SyncEvent_PreprocessPlayerList(), EnProfilerTests::TestFuncCountData(), ScriptedWidgetEventHandler::TutorialKeybinds(), Land_WarheadStorage_PowerStation::UnregisterBunker(), UnregisterEntrance(), UnregisterPanel(), ParticleSource::UpdateState(), CatchingContextTrapsBase::UpdateUsedBait(), ValidateMuzzleArray() и WeaponParticlesBase::WeaponParticlesBase().