DayZ 1.24
|
Classes | |
class | IEntity |
class | ParamEnum |
class | Attribute |
Enumerations | |
enum | EntityEvent { TOUCH , VISIBLE , NOTVISIBLE , FRAME , POSTFRAME , INIT , JOINTBREAK , SIMULATE , POSTSIMULATE , PHYSICSMOVE , CONTACT , EXTRA , ANIMEVENT , SOUNDEVENT , PHYSICSSTEADY , USER , ENTER , LEAVE , ALL } |
Entity events for event-mask, or throwing event from code. More... | |
enum | EntityFlags { VISIBLE , SOLID , TRIGGER , TOUCHTRIGGERS , SYNCHRONIZATION_DIRTY , FEATURE , TRANSLUCENT , WATER , ACTIVE , STATIC , USER1 , USER2 , USER3 , USER4 , USER5 , USER6 } |
Entity flags. More... | |
Variables | |
string | ParamEnum::m_Key |
string | ParamEnum::m_Value |
string | ParamEnum::m_Desc |
string | m_Key |
string | m_Value |
string | m_Desc |
string | Attribute::m_DefValue |
string | Attribute::m_UiWidget |
can be "editbox", "combobox", "spinbox", "slider", "font", "fileeditbox", "colorPicker", "flags", "resourceNamePicker" | |
string | Attribute::m_RangeScale |
defined as "MIN_VALUE MAX_VALUE STEP" eg. "1 100 0.5" | |
string | Attribute::m_Desc |
ref ParamEnumArray | Attribute::m_Enums |
Only ints and floats are currently supported. Array can be defined this way: { ParamEnum("Choice 1", "1"), ParamEnum("Choicen 2", "2") }. | |
class Attribute | m_Style |
can be "box", "sphere", "cylinder", "pyramid", "diamond" or custom style name | |
string | m_Category |
folder structure eg. StaticEntities/Walls | |
string | m_Description |
class purpose description | |
vector | m_SizeMin |
min vector of a bounding box | |
vector | m_SizeMax |
max vector of a bounding box | |
string | m_Color |
string | m_Color2 |
bool | m_Visible |
bool | m_Insertable |
bool | m_DynamicBox |
Transformation methods | |
Setting and getting of entity transformation | |
proto external void | IEntity::GetTransform (out vector mat[]) |
Returns transformation of Entity. It returns only so much vectors as array is big. | |
proto external void | IEntity::GetRenderTransform (out vector mat[]) |
Returns render transformation of Entity. Must pass in vector array size of 4. | |
proto external void | IEntity::GetLocalTransform (out vector mat[]) |
Returns local transformation of Entity. It returns only so much vectors as array is big. | |
proto native external vector | IEntity::GetTransformAxis (int axis) |
Returns one row of Entity transformation matrix. | |
proto native external void | IEntity::SetTransform (vector mat[4]) |
Sets entity transformation. | |
proto native external vector | IEntity::GetOrigin () |
Returns origin of Entity. | |
proto external vector | IEntity::GetLocalPosition () |
Returns local position of Entity. | |
proto native external vector | IEntity::GetYawPitchRoll () |
Returns orientation of Entity in world space (Yaw, Pitch, Roll) | |
proto native external vector | IEntity::GetAngles () |
Same as GetYawPitchRoll, but returns rotation vector around X, Y and Z axis. | |
proto native external vector | IEntity::GetLocalYawPitchRoll () |
Returns local orientation when it's in hierarchy (Yaw, Pitch, Roll) | |
proto native external vector | IEntity::GetLocalAngles () |
Same as GetLocalYawPitchRoll, but returns rotation vector around X, Y and Z axis. | |
proto native external void | IEntity::SetYawPitchRoll (vector angles) |
Sets angles for entity (Yaw, Pitch, Roll) | |
proto native external void | IEntity::SetAngles (vector angles) |
Same as SetYawPitchRoll, but sets rotation around X, Y and Z axis. | |
proto native external void | IEntity::SetOrigin (vector orig) |
Sets origin for entity. | |
proto native external float | IEntity::GetScale () |
proto native external void | IEntity::SetScale (float scale) |
proto native external vector | IEntity::VectorToParent (vector vec) |
Transforms local vector to world space. | |
proto native external vector | IEntity::CoordToParent (vector coord) |
Transforms local position to world space. | |
proto native external vector | IEntity::VectorToLocal (vector vec) |
Transforms world space vector to local space. | |
proto native external vector | IEntity::CoordToLocal (vector coord) |
Transforms world space position to local space. | |
Name/ID methods | |
proto native int | IEntity::GetID () |
Return unique entity ID. | |
proto native void | IEntity::SetID (int id) |
Set unique entity ID. | |
proto native void | IEntity::SetName (string name) |
proto native external owned string | IEntity::GetName () |
Hierarchy methods | |
Scene hierarchy management | |
proto native external bool | IEntity::AddChild (notnull IEntity child, int pivot, bool positionOnly=false) |
Adds child entity to this entity. | |
proto native external bool | IEntity::RemoveChild (notnull IEntity child, bool keepTransform=false) |
Removes child entity from hierarchy. | |
proto native bool | IEntity::IsHierarchyPositionOnly () |
Returns if the hierarchy component was created with positionOnly. | |
proto native int | IEntity::GetHierarchyPivot () |
Returns the hierarchy component pivot. | |
proto native IEntity | IEntity::GetParent () |
Returns pointer to parent Entity in hierarchy. | |
proto native IEntity | IEntity::GetChildren () |
Returns pointer to first child Entity in hierarchy. | |
proto native IEntity | IEntity::GetSibling () |
Returns pointer to next child Entity on the same hierarchy. | |
proto external void | IEntity::GetBounds (out vector mins, out vector maxs) |
Returns local bounding box of model on Entity. | |
proto external void | IEntity::GetWorldBounds (out vector mins, out vector maxs) |
Returns quantized world-bound-box of Entity. | |
Visual component methods | |
Manipulation with visual component - model, particle effect etc | |
proto native external void | IEntity::SetObject (vobject object, string options) |
proto native vobject | IEntity::GetVObject () |
Returns visual object set to this Entity. No reference is added. | |
proto native external int | IEntity::Animate (float speed, int loop) |
Updates animation (either xob, or particle, whatever) | |
proto native external int | IEntity::AnimateEx (float speed, int loop, out vector lin, out vector ang) |
Updates animation (either xob, or particle, whatever) | |
proto native external int | IEntity::SetCameraMask (int mask) |
Sets visibility mask for cameras, where Entity will be rendered. | |
proto native external void | IEntity::FilterNextTrace () |
When called, the Entity is excluded from consequent TraceMove/TraceLine. | |
proto native external int | IEntity::Update () |
Entity events for event-mask, or throwing event from code.
Enumerator | |
---|---|
TOUCH | entity was touched by other entity |
VISIBLE | entity is visible, so part of the rendering other WorldClass extra frame index result false should be rendered, true shoudn't be rendered Entity is visible. Is rendered if there is some attached object and event EntityEvent.VISIBLE is invoked, when event mask is set. |
NOTVISIBLE | entity is not visible, will not be part of rendering other WorldClass extra frame index |
FRAME | new frame event, called each frame other WorldClass extra frame index |
POSTFRAME | event at the end of each frame or when entity is moved during the frame other WorldClass |
INIT | event called after the world is created, including all entities other WorldClass |
JOINTBREAK | |
SIMULATE | |
POSTSIMULATE | |
PHYSICSMOVE | |
CONTACT | |
EXTRA | |
ANIMEVENT | |
SOUNDEVENT | |
PHYSICSSTEADY | |
USER | |
ENTER | |
LEAVE | |
ALL | Mask of all events. |
Definition at line 43 of file EnEntity.c.
Entity flags.
Enumerator | |
---|---|
VISIBLE | entity is visible, so part of the rendering other WorldClass extra frame index result false should be rendered, true shoudn't be rendered Entity is visible. Is rendered if there is some attached object and event EntityEvent.VISIBLE is invoked, when event mask is set. |
SOLID | Is collidable by various trace methods. |
TRIGGER | Is not collidable, but invokes touch events. |
TOUCHTRIGGERS | Interacts with triggers. |
SYNCHRONIZATION_DIRTY | Entity wants to synchronize (network) |
FEATURE | Scene rendering hint for dominant objects that are not culled by standard way. |
TRANSLUCENT | Used by tracing methods. When tracing with TraceFlags.PASSTRANSLUCENT, then this entity is ignored. Used for glass for example. |
WATER | Used by tracing methods. Traceable only with flag TraceFlags.WATER. |
ACTIVE | Tells that this entity has to be actively updated by engine, its EntityEvent.FRAME has to be called etc. |
STATIC | Static objects are included in the query. Tells that this entity will represent mostly static object, so we can use more precise but slower methods for scene-tree linking. Also it tells to scene tree that he can count with this entity as tree-split hint. |
USER1 | Flags for custom usage and filterings. |
USER2 | |
USER3 | |
USER4 | |
USER5 | |
USER6 |
Definition at line 113 of file EnEntity.c.
|
protected |
Adds child entity to this entity.
child | IEntity Pointer to entity which become our child |
pivot | int Pivot is pivot index, or -1 for center of parent. |
positionOnly | bool When set to true, the orientation will still be in WS. |
bool
True when entity has been attached. False otherwise. Updates animation (either xob, or particle, whatever)
|
protected |
Updates animation (either xob, or particle, whatever)
|
inlineprivate |
Definition at line 828 of file EnEntity.c.
References Attribute::m_DefValue, Attribute::m_Desc, Attribute::m_Enums, Attribute::m_RangeScale, and Attribute::m_UiWidget.
|
protected |
Clears event mask.
e | int event mask |
int
event mask
|
protected |
Clear Entity flags. Returns cleared flags.
flags | int flags to be set |
recursively | flags will be recursively applied to children of hierarchy too |
int
cleared flags void EditorAttribute | ( | string | style, |
string | category, | ||
string | description, | ||
vector | sizeMin, | ||
vector | sizeMax, | ||
string | color, | ||
string | color2 = "0 0 0 0", | ||
bool | visible = true, | ||
bool | insertable = true, | ||
bool | dynamicBox = false ) |
Definition at line 851 of file EnEntity.c.
References m_Category, m_Color, m_Color2, m_Description, m_DynamicBox, m_Insertable, m_SizeMax, m_SizeMin, m_Style, and m_Visible.
|
inlineprotected |
When called, the Entity is excluded from consequent TraceMove/TraceLine.
Definition at line 3 of file EnEntity.c.
Same as GetYawPitchRoll, but returns rotation vector around X, Y and Z axis.
Returns local bounding box of model on Entity.
[out] | mins | vector minimum point of bounding box |
[out] | maxs | vector maximum point of bounding box |
|
private |
|
private |
Returns pointer to first child Entity in hierarchy.
Referenced by GetAttachedChildren().
|
protected |
|
protected |
Return unique entity ID.
int
unique entity ID Same as GetLocalYawPitchRoll, but returns rotation vector around X, Y and Z axis.
Returns local transformation of Entity. It returns only so much vectors as array is big.
mat | vector [1...4] matrix to be get |
|
private |
|
private |
Returns pointer to parent Entity in hierarchy.
|
private |
|
private |
Returns pointer to next child Entity on the same hierarchy.
Returns visual object set to this Entity. No reference is added.
Returns quantized world-bound-box of Entity.
[out] | mins | vector minimum point of bounding box |
[out] | maxs | vector maximum point of bounding box |
|
protected |
Test if one or more of specified flags are set.
bool
True if is set, false otherwise. Returns if the hierarchy component was created with positionOnly.
Definition at line 793 of file EnEntity.c.
References ParamEnum::m_Desc, ParamEnum::m_Key, and ParamEnum::m_Value.
Definition at line 808 of file EnEntity.c.
References ParamEnum().
Referenced by ParamEnum().
|
protected |
Removes child entity from hierarchy.
child | IEntity Pointer to child entity we want to remove. |
keepTransform | bool When set to true, Entity is kept on her world position. Otherwise it's local transform is used as world-space one. |
bool
True if it was removed, false when this entity is not our child.
|
protected |
Dynamic event invokation. Parameters are the same as in IEntity::EOnXXXX() methods.
Same as SetYawPitchRoll, but sets rotation around X, Y and Z axis.
Sets visibility mask for cameras, where Entity will be rendered.
|
protected |
|
protected |
Sets Entity flags. It's OR operation, not rewrite. Returns previous flags.
flags | int flags to be set |
recursively | flags will be recursively applied to children of hierarchy too |
int
previous flags \brief Sets the visual object to this entity. Reference is added and released upon entity destruction \param object handle to object got by GetObject() \param options String, dependant on object type.
Only supported one for XOB objects: $remap 'original material name' 'new material'; [$remap 'another original material name' 'anothernew material']
Sets entity transformation.
mat | vector [4] matrix to be set |
Updates entity state/position. Should be called when you want to manually commit position changes etc before trace methods etc. Entity is updated automatically at the end and the beginning of simulation step, when it has EntityFlags.TFL_ACTIVE flag set. \returns mask with flags
EntityFlags.UPDATE - hierarchy has been updated EntityFlags.UPDATE_MDL - model hierarchy has been updated
string m_Category |
folder structure eg. StaticEntities/Walls
Definition at line 841 of file EnEntity.c.
Referenced by EditorAttribute(), GestureMenuItem(), GetCategory(), GetItemCategory(), and RadialQuickbarItem().
string m_Color |
Definition at line 845 of file EnEntity.c.
Referenced by EditorAttribute().
string m_Color2 |
Definition at line 846 of file EnEntity.c.
Referenced by EditorAttribute().
|
private |
Definition at line 822 of file EnEntity.c.
Referenced by Attribute::Attribute().
|
private |
Definition at line 791 of file EnEntity.c.
Referenced by ParamEnum::ParamEnum().
string m_Desc |
Definition at line 806 of file EnEntity.c.
|
private |
Definition at line 825 of file EnEntity.c.
Referenced by Attribute::Attribute().
string m_Description |
class purpose description
Definition at line 842 of file EnEntity.c.
Referenced by InventoryItemSuper::DescriptionOverride(), EditorAttribute(), InventoryItemSuper::InitMapState(), ScriptedWidgetEventHandler::LoadData(), and ScriptedWidgetEventHandler::ModsMenuDetailedEntry().
bool m_DynamicBox |
Definition at line 849 of file EnEntity.c.
Referenced by EditorAttribute().
|
private |
Only ints and floats are currently supported. Array can be defined this way: { ParamEnum("Choice 1", "1"), ParamEnum("Choicen 2", "2") }.
Definition at line 826 of file EnEntity.c.
Referenced by Attribute::Attribute().
bool m_Insertable |
Definition at line 848 of file EnEntity.c.
Referenced by EditorAttribute().
|
private |
Definition at line 789 of file EnEntity.c.
Referenced by ParamEnum::ParamEnum().
string m_Key |
Definition at line 804 of file EnEntity.c.
Referenced by DisplayElementBadge::BadgeBleeding(), DisplayElementBadge::BadgeFracture(), DisplayElementBadge::BadgeHeartbeat(), DisplayElementBadge::BadgeLegs(), DisplayElementBadge::BadgePills(), DisplayElementBadge::BadgePoisoned(), DisplayElementBadge::BadgeSick(), DisplayElementBadge::BadgeStuffed(), DisplayElementBadge::BadgeWet(), DisplayElementTendency::TendencyBacteria(), DisplayElementTendency::TendencyBlood(), DisplayElementTendency::TendencyHealth(), DisplayElementTendency::TendencyHunger(), DisplayElementTendency::TendencyTemperature(), DisplayElementTendency::TendencyThirst(), and DisplayElementBase::UpdateHUD().
|
private |
defined as "MIN_VALUE MAX_VALUE STEP" eg. "1 100 0.5"
Definition at line 824 of file EnEntity.c.
Referenced by Attribute::Attribute().
vector m_SizeMax |
max vector of a bounding box
Definition at line 844 of file EnEntity.c.
Referenced by EditorAttribute().
vector m_SizeMin |
min vector of a bounding box
Definition at line 843 of file EnEntity.c.
Referenced by EditorAttribute().
can be "box", "sphere", "cylinder", "pyramid", "diamond" or custom style name
Referenced by EditorAttribute().
|
private |
can be "editbox", "combobox", "spinbox", "slider", "font", "fileeditbox", "colorPicker", "flags", "resourceNamePicker"
Definition at line 823 of file EnEntity.c.
Referenced by Attribute::Attribute().
|
private |
Definition at line 790 of file EnEntity.c.
Referenced by ParamEnum::ParamEnum().
string m_Value |
Definition at line 805 of file EnEntity.c.
Referenced by PlayerStatBase::Add(), CfgParamType::CfgParamBool(), CfgParamType::CfgParamFloat(), CfgParamType::CfgParamInt(), CfgParamType::CfgParamString(), GetValue(), MessageReceiverBase::GetValue(), MessageReceiverBase::IsValueChanged(), PPERequester_GameplayBase::OnStart(), PlayerStatBase::OnStoreLoad(), PlayerStatBase::OnStoreSave(), PlayerStatBase::PlayerStat(), PresenceNotifierNoiseEvent(), PrintElements(), PlayerStatBase::Set(), DisplayElementBase::SetSeriousnessLevel(), DisplayElementBase::SetTendency(), CfgParamType::SetValue(), CfgParamType::SetValue(), CfgParamType::SetValue(), MessageReceiverBase::SetValue(), CfgParamType::SetValue(), SyncedValueAgent(), SyncedValueLevel(), DisplayElementBase::UpdateHUD(), and MessageReceiverBase::UpdateHUD().
bool m_Visible |
Definition at line 847 of file EnEntity.c.
Referenced by EditorAttribute(), ScriptedWidgetEventHandler::GetCrosshairPosition(), GameplayEffectsData::Init(), ScriptedWidgetEventHandler::ObjectFollower(), ScriptedWidgetEventHandler::ProjectedCrosshair(), ScriptedWidgetEventHandler::Update(), GameplayEffectsData::Update(), and GameplayEffectsData::UpdateVisibility().