Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
envisual.c
Go to the documentation of this file.
1 
6 proto native vobject GetObject(string name);
8 
14 proto native void ReleaseObject(vobject object, int flag = 0);
15 
17 proto native int GetNumAnimFrames(vobject anim);
18 
20 proto string vtoa(vobject vobj);
21 
27 proto int GetObjectMaterials(vobject object, string materials[]);
28 
29 // dynamic model creation (for dynamic aabb triggers)
30 //proto void CreateModel(IEntity ent, vector mins, vector maxs);
31 //proto void RemoveModel(IEntity ent);
32 
34 proto vobject CreateXOB(int nsurfaces, int nverts[], int numindices[], string materials[]);
35 proto void UpdateVertsEx(notnull IEntity ent, int surf, vector verts[], float uv[]);
36 proto void UpdateIndices(vobject obj, int surf, int indices[]);
37 
38 proto native void SetBone(notnull IEntity ent, int bone, vector angles, vector trans, float scale);
39 proto native bool SetBoneMatrix(notnull IEntity ent, int bone, vector mat[4]);
40 proto native void SetBoneGlobal(notnull IEntity ent, int bone, vector mat[4]);
41 proto native bool GetBoneMatrix(notnull IEntity ent, int bone, vector mat[4]);
42 proto native bool GetBoneLocalMatrix(notnull IEntity ent, int bone, vector mat[4]);
43 
44 proto native void SetAnimFrame(notnull IEntity ent, int slot, float frame);
45 
48 class BoneMask
49 {
50  int Mask[8]
51 }
52 
53 enum AnimFlags
54 {
56  ONCE,
61  BLENDOUT,
62 
64  USER,
65 
67  RESET,
68 
72  FORCEFPS,
73 
75  NOANIMEND,
76 
79 };
80 
81 proto native void SetAnimSlot(notnull IEntity ent, int slot, vobject anim, float blendin, float blendout, BoneMask mask, int fps, AnimFlags flags);
82 
83 // changes a mask and does the blending if the blendin is set
84 proto native void ChangeAnimSlotMask(notnull IEntity ent, int slot, float blendin, BoneMask mask);
85 
86 // changes animation framerate to fps param
87 proto native void ChangeAnimSlotFPS(notnull IEntity ent, int slot, int fps);
88 
89 // set mask for a channel. There are 12 chanels and mask is using first for bits 0..3
90 proto native void SetAnimMask(notnull IEntity ent, int mask);
91 
92 // clears chanal mask, return bits which were cleared
93 proto native int ClearAnimMask(notnull IEntity ent, int mask);
94 
95 //vrati nastavene bity tech kanalu, ktere maji nastavenou animaci, nejsou na konci
96 // a pro ktere byla nastavena vstupni maska.
97 //Je tim mozno se dotazat na stav vice slotu najednou
98 proto native int IsAnimSlotPlaying(notnull IEntity ent, int mask);
99 //mask - 16bitu, pro 16 anim slotu. Maximalni hodnota je tedy 0xffff!
100 
101 //sets how much this morph affect object
102 proto native bool SetMorphState(notnull IEntity ent, string morph, float value);
103 //morph name
104 //value 0...1
106 
107 
114 {
117 
120 
123 
126 
129 
132 
135 
138 
141 
144 
147 
150 
153 
156 
159 
162 
165 
168 
171 
174 
177 
180 
183 
186 
189 
192 
195 };
196 
197 // return total count of active particles in all emitors
198 // internally does a sum
199 // HasActiveParticles is better when just needing to check if there are any active
200 proto native int GetParticleCount(notnull IEntity ent);
201 
202 // return if there are any active particles
203 proto bool HasActiveParticle(notnull IEntity ent);
204 
206 {
207  return GetParticleCount(ent);
208 }
209 
211 {
212  return HasActiveParticle(ent);
213 }
214 
215 // gets name of defined emitors in a particle effect
216 // return number of emitors and their names in an array (max defines max. emitors to return)
217 proto int GetParticleEmitors(notnull IEntity ent, out string emitors[], int max);
218 
219 // return number of emitors
220 proto int GetParticleEmitorCount(notnull IEntity ent);
221 
222 // sets a parametr of the particle emitor
223 // if the emitor == - 1, it sets the parameter for all emitors
224 proto void SetParticleParm(notnull IEntity ent, int emitor, EmitorParam parameter, void value);
225 
226 //gets parameter of particle emitor
227 proto void GetParticleParm(notnull IEntity ent, int emitor, EmitorParam parameter, out void value);
228 
229 //gets original parameter of particle emitor
230 proto void GetParticleParmOriginal(notnull IEntity ent, int emitor, EmitorParam parameter, out void value);
231 
232 //Force-changes particle emitor position to the current one.
233 //Used for sudden changes of particle position to avoid spreading emitted
234 //particles between previous and the new one position
235 proto native void ResetParticlePosition(notnull IEntity ent);
236 
237 //Restart particle effect to its default state. This means no
238 //particles, timer reset and so on. Usefull for implementing
239 //particle cache.
240 proto native void RestartParticle(notnull IEntity ent);
242 
243 
GRAVITY_SCALE_RND
@ GRAVITY_SCALE_RND
Float R/W.
Definition: envisual.c:152
LIFETIME_BY_ANIM
@ LIFETIME_BY_ANIM
Bool R/W.
Definition: envisual.c:167
ClearAnimMask
proto native int ClearAnimMask(notnull IEntity ent, int mask)
IsAnimSlotPlaying
proto native int IsAnimSlotPlaying(notnull IEntity ent, int mask)
SIZE
@ SIZE
Float R/W.
Definition: envisual.c:131
CURRENT_TIME
@ CURRENT_TIME
current efector's time. Float R/W
Definition: envisual.c:182
BLENDOUT
class BoneMask BLENDOUT
SetAnimMask
proto native void SetAnimMask(notnull IEntity ent, int mask)
REPEAT
@ REPEAT
should efector repeate after time up? Bool R/W
Definition: envisual.c:179
NOANIMHOOKS
class BoneMask NOANIMHOOKS
Animhooks will not be called.
SetAnimSlot
proto native void SetAnimSlot(notnull IEntity ent, int slot, vobject anim, float blendin, float blendout, BoneMask mask, int fps, AnimFlags flags)
VELOCITY
@ VELOCITY
Float R/W.
Definition: envisual.c:122
ChangeAnimSlotFPS
proto native void ChangeAnimSlotFPS(notnull IEntity ent, int slot, int fps)
GetParticleCount
proto native int GetParticleCount(notnull IEntity ent)
GetObjectMaterials
proto int GetObjectMaterials(vobject object, string materials[])
RANDOM_ROT
@ RANDOM_ROT
rotate in random direction. Bool R/W
Definition: envisual.c:140
SetBoneMatrix
proto native bool SetBoneMatrix(notnull IEntity ent, int bone, vector mat[4])
GetBoneMatrix
proto native bool GetBoneMatrix(notnull IEntity ent, int bone, vector mat[4])
vobject
Definition: proto.c:48
ReleaseObject
proto native void ReleaseObject(vobject object, int flag=0)
GetParticleEmitors
proto int GetParticleEmitors(notnull IEntity ent, out string emitors[], int max)
AVELOCITY
@ AVELOCITY
Float R/W.
Definition: envisual.c:128
SetBone
proto native void SetBone(notnull IEntity ent, int bone, vector angles, vector trans, float scale)
vtoa
proto string vtoa(vobject vobj)
Returns name of visual object.
EFFECT_TIME
@ EFFECT_TIME
efector's total time. Float R/W
Definition: envisual.c:176
GetParticleEmitorCount
proto int GetParticleEmitorCount(notnull IEntity ent)
EmitorParam
EmitorParam
Definition: envisual.c:113
CreateXOB
proto vobject CreateXOB(int nsurfaces, int nverts[], int numindices[], string materials[])
Dynamic MeshObject.
NOANIMEND
class BoneMask NOANIMEND
EntityEvent.ANIMEND will not be called.
IEntity
Definition: enentity.c:164
GetNumAnimFrames
proto native int GetNumAnimFrames(vobject anim)
Returns number of frames, if the object is animation.
BIRTH_RATE_RND
@ BIRTH_RATE_RND
Float R/W.
Definition: envisual.c:158
ParticleHasActive
bool ParticleHasActive(IEntity ent)
Definition: envisual.c:210
BoneMask
Definition: envisual.c:48
GetParticleParmOriginal
proto void GetParticleParmOriginal(notnull IEntity ent, int emitor, EmitorParam parameter, out void value)
LIFETIME
@ LIFETIME
Float R/W.
Definition: envisual.c:161
vector
Definition: enconvert.c:105
FORCEFPS
class BoneMask FORCEFPS
RAND_FRAME
@ RAND_FRAME
Bool R/W.
Definition: envisual.c:173
ChangeAnimSlotMask
proto native void ChangeAnimSlotMask(notnull IEntity ent, int slot, float blendin, BoneMask mask)
RestartParticle
proto native void RestartParticle(notnull IEntity ent)
SORT
@ SORT
Bool R/W.
Definition: envisual.c:188
SPRING
@ SPRING
Float R/W.
Definition: envisual.c:194
ACTIVE_PARTICLES
@ ACTIVE_PARTICLES
number of active particles. Int R
Definition: envisual.c:185
ONCE
class BoneMask ONCE
animation is played only once and then if freezes at the last frame. EntityEvent.ANIMEND is called
ANIM_ONCE
@ ANIM_ONCE
Bool R/W.
Definition: envisual.c:170
STRETCH
@ STRETCH
Float R/W.
Definition: envisual.c:134
VELOCITY_RND
@ VELOCITY_RND
Float R/W.
Definition: envisual.c:125
USER
class BoneMask USER
animation waits on the first frame. Frame is set by calling SetFrame()
SetMorphState
proto native bool SetMorphState(notnull IEntity ent, string morph, float value)
AIR_RESISTANCE
@ AIR_RESISTANCE
Float R/W.
Definition: envisual.c:143
LIFETIME_RND
@ LIFETIME_RND
Float R/W.
Definition: envisual.c:164
name
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
GetObject
proto native vobject GetObject(string name)
Loads object from data, or gets it from cache. Object must be released when not used.
GRAVITY_SCALE
@ GRAVITY_SCALE
Float R/W.
Definition: envisual.c:149
UpdateVertsEx
proto void UpdateVertsEx(notnull IEntity ent, int surf, vector verts[], float uv[])
ParticleGetCount
int ParticleGetCount(IEntity ent)
Definition: envisual.c:205
SetParticleParm
proto void SetParticleParm(notnull IEntity ent, int emitor, EmitorParam parameter, void value)
BIRTH_RATE
@ BIRTH_RATE
Float R/W.
Definition: envisual.c:155
SetBoneGlobal
proto native void SetBoneGlobal(notnull IEntity ent, int bone, vector mat[4])
GetParticleParm
proto void GetParticleParm(notnull IEntity ent, int emitor, EmitorParam parameter, out void value)
AIR_RESISTANCE_RND
@ AIR_RESISTANCE_RND
Float R/W.
Definition: envisual.c:146
GetBoneLocalMatrix
proto native bool GetBoneLocalMatrix(notnull IEntity ent, int bone, vector mat[4])
CONEANGLE
@ CONEANGLE
Vector3 R/W.
Definition: envisual.c:116
WIND
@ WIND
Bool R/W.
Definition: envisual.c:191
EMITOFFSET
@ EMITOFFSET
Vector3 R/W.
Definition: envisual.c:119
RANDOM_ANGLE
@ RANDOM_ANGLE
begin with random rotation. Bool R/W
Definition: envisual.c:137
RESET
class BoneMask RESET
forces animation to start from begining (including blending)
ResetParticlePosition
proto native void ResetParticlePosition(notnull IEntity ent)
SetAnimFrame
proto native void SetAnimFrame(notnull IEntity ent, int slot, float frame)
HasActiveParticle
proto bool HasActiveParticle(notnull IEntity ent)
UpdateIndices
proto void UpdateIndices(vobject obj, int surf, int indices[])