|
DayZ 1.24
|
Classes | |
| class | Math3D |
Enumerations | |
| enum | ECurveType { CatmullRom , NaturalCubic , UniformCubic } |
| Enumerator | |
|---|---|
| CatmullRom | |
| NaturalCubic | |
| UniformCubic | |
Definition at line 20 of file EnMath3D.c.
|
staticprivate |
Angle that a target is from the direction of an origin.
float Angle in radians Referenced by EvaluateComponentEx(), EvaluateHit_Player(), DayZInfected::FightLogic(), GetMeleeTargetEx(), and ScriptConsoleSoundsTab::UpdateMousePos().
|
staticprivate |
Returns 1, when bounding boxes intersects.
| mins1 | vector minimum point of first bounding box |
| maxs1 | vector maximum point of first bounding box |
| mins2 | vector minimum point of second bounding box |
| maxs2 | vector maximum point of second bounding box |
int 1 if boundig boxes intersects, otherwise 0
|
staticprivate |
|
staticprivate |
Calculates the points of a right 2D cone in 3D space.
| origin | vector Origin of cone | |
| length | float Length of the cone | |
| halfAngle | float Half of the angle of the cone in radians | |
| angleOffset | float Angle offset of the cone in radians (handy for rotating it along with something in the world) | |
| [out] | leftPoint | vector Left point of the cone |
| [out] | rightPoint | vector Right point of the cone |
Referenced by Debug::DrawCone(), and MeleeTargetSettings().
|
staticprivate |
Computes curve.
vector Referenced by RecoilBase::GetPositionOnCurve(), and KuruShake::Update().
|
staticprivate |
Creates rotation matrix from direction and up vector.
| dir | vector direction vector | |
| up | vector up vector | |
| [out] | mat | vector[4] created rotation matrix vector dir = "1 0 1";
>> <0.707107,0,-0.707107>,<0,1,0>,<0.707107,0,0.707107>,<0,0,0>
static proto void DirectionAndUpMatrix(vector dir, vector up, out vector mat[4]) Creates rotation matrix from direction and up vector. |
Referenced by PluginBase::CalculatePos(), DayZIntroScene::DayZIntroScene(), and FloatingCrossHair().
Returns randon normalized direction.
vector Definition at line 424 of file EnMath3D.c.
References vector::Normalized(), Math::RandomFloatInclusive(), Vector(), x, and y.
|
staticprivate |
Tests whether cylinder is intersecting oriented box.
| mins | vector Minimums of bound box |
| maxs | vector Maximums of bound box |
| obbMat | vector Transform of box |
| cylMat | vector Transform of cylinder |
| cylinderRadius | float Radius of cylinder |
| cylinderHeight | float Height of cylinder |
bool True when cylinder is intersecting oriented box
|
staticprivate |
Tests whether ray is intersecting axis aligned box.
| start | vector Start of ray |
| end | vector End of ray |
| mins | vector Minimums of bound box |
| maxs | vector Maximums of bound box |
float -1 when not intersecting, else the fraction of ray
|
staticprivate |
Tests whether ray is intersecting cylinder.
| rayStart | vector Start of ray |
| rayEnd | vector End of ray |
| center | vector Center of cylinder |
| radius | float Radius of cylinder |
| height | float Height of cylinder |
bool True when ray is intersecting cylinder
|
staticprivate |
Tests whether ray is intersecting sphere.
| raybase | vector Start of ray |
| raycos | vector End of ray |
| center | vector Center of sphere |
| radius | float Radius of sphere |
float -1 when not intersecting, else the fraction of ray
|
staticprivate |
Tests whether sphere is intersecting axis aligned box.
| origin | vector Origin of sphere |
| radius | float Radius of sphere |
| mins | vector Minimums of bound box |
| maxs | vector Maximums of bound box |
bool True when intersects
|
staticprivate |
Tests whether sphere is intersecting cone.
| origin | vector Origin of sphere |
| radius | float Radius of sphere |
| conepos | vector Position of top of cone |
| axis | vector Orientation of cone in direction from top to bottom |
| angle | float Angle of cone in radians |
bool True when sphere is intersecting cone
|
staticprivate |
Tests whether sphere is fully inside cone.
| origin | vector Origin of sphere |
| radius | float Radius of sphere |
| conepos | vector Position of top of cone |
| axis | vector Orientation of cone in direction from top to bottom |
| angle | float Angle of cone in radians |
bool True when sphere is fully inside cone
|
inlineprivate |
Definition at line 29 of file EnMath3D.c.
Creates identity matrix.
| [out] | mat | created identity matrix >> <1,0,0>,<0,1,0>,<0,0,1>
|
Definition at line 252 of file EnMath3D.c.
Creates identity matrix.
| [out] | mat | created identity matrix >> <1,0,0>,<0,1,0>,<0,0,1>,<0,0,0>
|
Definition at line 233 of file EnMath3D.c.
References vector::Zero.
Referenced by PluginBase::CalculatePos(), DropEquipAndDestroyRootLambda::CopyOldPropertiesToNew(), DayZIntroScene::DayZIntroScene(), ArrowManagerBase::DropArrow(), FireplaceToIndoorOvenLambda(), FireplaceToIndoorsLambda(), HandleDropMagazine(), ManBase::PredictiveDropEntity(), ReplaceItemWithNewLambdaBase::PrepareLocations(), RemoveAllAttachedChildrenByTypename(), GameInventory::SetGroundPosByOwner(), Entity::SpawnEntityOnGroundPos(), ManBase::SpawnEntityOnGroundPos(), and ContaminatedArea_Dynamic::SpawnItems().
|
staticprivate |
Invert-transforms rotation matrix.
| mat0 | vector[3] first matrix | |
| mat1 | vector[3] second matrix | |
| [out] | res | vector[3] result of first and second matrix multiplication >> <2.5,0.62,0>,<2.5,1.3,0>,<3.25,1.69,2.7>
static proto void MatrixInvMultiply3(vector mat0[3], vector mat1[3], out vector res[3]) Invert-transforms rotation matrix. |
|
staticprivate |
Invert-transforms matrix.
| mat0 | vector[4] first matrix | |
| mat1 | vector[4] second matrix | |
| [out] | res | vector[4] inverse result of first and second matrix multiplication >> <2,0,0>,<0,3,1>,<0,3,1>,<4,12,4>
static proto void MatrixInvMultiply4(vector mat0[4], vector mat1[4], out vector res[4]) Invert-transforms matrix. |
Referenced by AddArrow(), IEntity::AddArrow(), DayZInfected::AddArrow(), and ManBase::AddArrow().
|
staticprivate |
Transforms rotation matrix.
| mat0 | vector[3] first matrix | |
| mat1 | vector[3] second matrix | |
| [out] | res | vector[3] result of first and second matrix multiplication >> <1.54,3.02,0>,<0.1,1.3,0>,<0.13,1.69,2.7>
static proto void MatrixMultiply3(vector mat0[3], vector mat1[3], out vector res[3]) Transforms rotation matrix. |
Referenced by Hologram::AlignProjectionOnTerrain(), and Weapon::LiftWeaponCheck().
|
staticprivate |
Transforms matrix.
| mat0 | vector[4] first matrix | |
| mat1 | vector[4] second matrix | |
| [out] | res | vector[4] result of first and second matrix multiplication >> <2,0,0>,<0,3,0>,<0,3,0>,<4,13,0>
static proto void MatrixMultiply4(vector mat0[4], vector mat1[4], out vector res[4]) Transforms matrix. |
Referenced by EntityAI::IsAreaAtDoorFree(), and DayZPlayerCameraBase::OnUpdate().
Orthogonalizes matrix.
| [it] | mat matrix which should be orthogonalized |
Orthogonalizes matrix.
| [it] | mat matrix which should be orthogonalized |
Referenced by AddArrow(), IEntity::AddArrow(), DayZInfected::AddArrow(), and ManBase::AddArrow().
Returns angles of rotation matrix.
| mat | vector[3] rotation matrix |
vector roll, pitch, yaw angles Referenced by Hologram::AlignProjectionOnTerrain(), FloatingCrossHair(), and EntityAI::IsAreaAtDoorFree().
Converts rotation matrix to quaternion.
| mat | vector[3] rotation matrix | |
| [out] | d | float[4] created quaternion copy |
Referenced by ActionRepackTentCB::DropDuringRepacking(), FloatingCrossHair(), ActionDeployBase::MoveEntityToFinalPosition(), ItemBase::OnPlacementComplete(), and ThrowAllItemsInInventory().
Point on line beg .. end nearest to pos.
vector Referenced by EvaluateComponentEx(), and GetMeleeTargetEx().
Copies quaternion.
| s | float[4] quaternion to copy | |
| [out] | d | float[4] created quaternion copy float s[4] = { 2, 3, 4, 1 };
float d[4];
>> {2,3,4,1}
|
Definition at line 314 of file EnMath3D.c.
Creates identity quaternion.
| [out] | q | float[4] created identity quaternion float q[4];
>> {0,0,0,1}
|
Definition at line 293 of file EnMath3D.c.
|
staticprivate |
Linear interpolation between q1 and q2 with weight 'frac' (0...1)
| [out] | qout | float[4] result quaternion |
| q1 | float[4] first quaternion | |
| q2 | float[4] second quaternion | |
| frac | float interpolation weight |
Referenced by FloatingCrossHair().
|
staticprivate |
Multiplies quaternions.
| [out] | qout | float[4] result quaternion |
| q1 | float[4] first quaternion | |
| q2 | float[4] second quaternion |
Returns Angles vector from quaternion.
Referenced by UIScriptedMenu::SetCameraData(), and UIScriptedMenu::Update().
Converts quaternion to rotation matrix.
Referenced by FloatingCrossHair().
Creates scale matrix.
| scale | scale coeficient | |
| [out] | mat | created scale matrix >> <2.5,0,0>,<0,2.5,0>,<0,0,2.5>
static void ScaleMatrix(float scale, out vector mat[3]) Creates scale matrix. Definition EnMath3D.c:271 |
Definition at line 271 of file EnMath3D.c.
Vector constructor from components.
| x | float x component |
| y | float y component |
| z | float z component |
vector resulting vector Referenced by vector::ArrayToVec(), Barrel_ColorBase::Barrel_ColorBase(), Hit_MeatBones::BloodSplatGround(), PluginBase::CalculatePos(), DayZIntroSceneXbox::CameraCreate(), CarLightBase::CarRearLight(), TentBase::CarTent(), WeaponParticlesBase::CheckOrientationOverride(), CarLightBase::CivilianSedanFrontLight(), CarRearLightBase::CivilianSedanRearLight(), CGame::CloseCombatEffects(), CreateBridgeArrow(), CreateCarDestroyedEffect(), Particle::CreateOnObject(), SceneData::CreateScenePlayer(), EffectAreaLoader::CreateZones(), DayZIntroScene::DayZIntroScene(), CGame::DelayedMidAirDetonation(), EntityLightSource::DetachFromParent(), ItemBase::DoMeasurement(), Debug::DrawCone(), BuildingSuper::EEInit(), Explode(), FilterObstructedObjectsByGrouping(), FloatingCrossHair(), GameplayEffectsData::GenerateSequenceRandomPosition(), GetBoxCenter(), IEntity::GetCenter(), GetCollisionBoxSize(), Hologram::GetCollisionBoxSize(), GetCurrentOrientation(), GetFireEffectPosition(), ScriptedWidgetEventHandler::GetItemSize(), GetMeleeTarget(), GetMeleeTargetEx(), GetMouseDistance(), JsonUndergroundAreaTriggerData::GetOrientation(), JsonUndergroundAreaTriggerData::GetPosition(), SceneObject::GetPosition(), SceneObject::GetPositionAsString(), GetPositionRandomized(), Math3D::GetRandomDir(), GetRandomPos(), JsonUndergroundAreaTriggerData::GetSize(), SceneObject::GetSize(), GetSmokeEffectPosition(), FireplaceBase::GetSmokeEffectPosition(), EntityLightSource::HandleDancingShadows(), CarLightBase::Hatchback_02FrontLight(), CarRearLightBase::Hatchback_02RearLight(), BroomBase::Init(), UIScriptedMenu::Init(), IsColliding(), IsCollidingEx(), Hologram::IsCollidingZeroPos(), IsEntityBehindEntityInAngle(), IsSpaceFor(), IsSpaceForCircle(), IsSpaceForOven(), IsUnderRoofFromToCalculation(), LargeTent(), Weapon::LiftWeaponCheck(), LongTorch::LongTorch(), TentBase::MediumTent(), CarLightBase::Offroad_02FrontLight(), CarRearLightBase::Offroad_02RearLight(), CarLightBase::OffroadHatchbackFrontLight(), CarRearLightBase::OffroadHatchbackRearLight(), WeaponParticlesBase::OnActivate(), FlareSimulation::OnActivation(), ScriptConsoleGeneralTab::OnClick(), ItemBase::OnDebugSpawn(), MapHandler::OnDoubleClick(), ScriptConsoleGeneralTab::OnDoubleClick(), OnDraggingEnd(), FireworksLauncherClientEvent::OnFired(), PointLightBase::OnFrameLightSource(), ItemBase::OnInventoryExit(), Roadflare::OnInventoryExit(), Switchable_Base::OnInventoryExit(), MapHandler::OnKeyDown(), UIScriptedMenu::OnShow(), DayZPlayer::OnStepEvent(), OnUpdateClient(), Roadflare::OnWorkStart(), TentBase::PartyTent(), vector::RandomDir(), vector::RandomDir2D(), Particle::RandWiggleVector(), DayZIntroScene::ResetIntroCamera(), SeaChest::SeaChest(), CarLightBase::Sedan_02FrontLight(), CarRearLightBase::Sedan_02RearLight(), PluginBase::SelectedObjectDuplicate(), GameInventory::SetGroundPosByOwnerBounds(), UIScriptedMenu::SetItem(), Hologram::SetOnGround(), AreaDamageComponentRaycasted::SetRaycastLength(), SetWaterLevelHeight(), TentBase::ShelterBase(), DayZIntroScene::SnapToGround(), DayZIntroSceneXbox::SnapToGround(), CrashBase::SpawnRandomDeers(), ThrowAllItemsInInventory(), CarLightBase::Truck_01FrontLight(), CarRearLightBase::Truck_01RearLight(), TruncateVec(), FlammableBase::TryTransformIntoStick(), ScriptedWidgetEventHandler::UpdateItems(), InventoryGridController::UpdateItems(), FlammableBase::UpdateLight(), CGame::UpdatePathgraphRegionByObject(), UIScriptedMenu::UpdateQuickbarItemCard(), ScriptedWidgetEventHandler::UpdateQuickbarItems(), WeaponParticlesBase::WeaponParticlesBase(), WoodenCrate::WoodenCrate(), CrashBase::Wreck_Mi8_Crashed(), CrashBase::Wreck_SantasSleigh(), and CrashBase::Wreck_UH1Y().
Creates rotation matrix from angles.
| ang | vector which contains angles | |
| [out] | mat | vector created rotation matrix >> <0.330366,0.0885213,-0.939693>,<0.458809,0.854988,0.241845>,<0.824835,-0.511037,0.241845>
static proto void YawPitchRollMatrix(vector ang, out vector mat[3]) Creates rotation matrix from angles. |
Referenced by AddArrow(), DayZInfected::AddArrow(), ManBase::AddArrow(), Hologram::AlignProjectionOnTerrain(), ActionRepackTentCB::DropDuringRepacking(), Weapon::LiftWeaponCheck(), ActionDeployBase::MoveEntityToFinalPosition(), ItemBase::OnPlacementComplete(), DayZPlayerCameraBase::OnUpdate(), OnUpdate(), and ThrowAllItemsInInventory().
|
inlineprivate |
Definition at line 30 of file EnMath3D.c.