2016-02-11 23:05:42 +00:00
|
|
|
#include "CParticleElectric.hpp"
|
2016-02-26 03:31:00 +00:00
|
|
|
#include "CGraphics.hpp"
|
2016-02-11 23:05:42 +00:00
|
|
|
|
2016-02-13 09:02:47 +00:00
|
|
|
namespace pshag
|
2016-02-11 23:05:42 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
CParticleElectric::CParticleElectric(const TToken<CElectricDescription>& desc)
|
2016-02-26 03:31:00 +00:00
|
|
|
: x1c_elecDesc(desc)
|
2016-02-13 05:49:59 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2016-02-26 03:31:00 +00:00
|
|
|
void CParticleElectric::RenderLines()
|
|
|
|
{
|
|
|
|
CGraphics::DisableAllLights();
|
|
|
|
CGraphics::SetDepthWriteMode(true, ERglEnum::LEqual, false);
|
|
|
|
CGraphics::SetBlendMode(ERglBlendMode::Blend, ERglBlendFactor::SrcAlpha, ERglBlendFactor::One, ERglLogicOp::Clear);
|
|
|
|
|
|
|
|
Zeus::CTransform viewXfrm = CGraphics::g_ViewMatrix;
|
|
|
|
Zeus::CTransform scale;
|
|
|
|
scale.Scale(xec_localScale);
|
|
|
|
Zeus::CTransform globalScale;
|
|
|
|
globalScale.Scale(xe0_globalScale);
|
|
|
|
Zeus::CTransform localTranslate;
|
|
|
|
localTranslate.Translate(x38_translation);
|
|
|
|
Zeus::CTransform globalTranslate;
|
|
|
|
globalTranslate.Translate(xa4_globalTranslation);
|
|
|
|
Zeus::CTransform global = globalTranslate * xb0_globalOrientation;
|
|
|
|
}
|
|
|
|
|
2016-02-13 05:49:59 +00:00
|
|
|
void CParticleElectric::Update(double)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void CParticleElectric::Render()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2016-02-26 03:31:00 +00:00
|
|
|
void CParticleElectric::SetOrientation(const Zeus::CTransform& orientation)
|
2016-02-13 05:49:59 +00:00
|
|
|
{
|
2016-02-26 03:31:00 +00:00
|
|
|
x44_orientation = orientation;
|
|
|
|
x438_28 = true;
|
2016-02-13 05:49:59 +00:00
|
|
|
}
|
|
|
|
|
2016-02-26 03:31:00 +00:00
|
|
|
void CParticleElectric::SetTranslation(const Zeus::CVector3f& translation)
|
2016-02-13 05:49:59 +00:00
|
|
|
{
|
2016-02-26 03:31:00 +00:00
|
|
|
x38_translation = translation;
|
|
|
|
x438_28 = true;
|
2016-02-13 05:49:59 +00:00
|
|
|
}
|
|
|
|
|
2016-02-26 03:31:00 +00:00
|
|
|
void CParticleElectric::SetGlobalOrientation(const Zeus::CTransform& orientation)
|
2016-02-13 05:49:59 +00:00
|
|
|
{
|
2016-02-26 03:31:00 +00:00
|
|
|
xb0_globalOrientation = orientation;
|
|
|
|
x438_28 = true;
|
2016-02-13 05:49:59 +00:00
|
|
|
}
|
|
|
|
|
2016-02-26 03:31:00 +00:00
|
|
|
void CParticleElectric::SetGlobalTranslation(const Zeus::CVector3f& translation)
|
2016-02-13 05:49:59 +00:00
|
|
|
{
|
2016-02-26 03:31:00 +00:00
|
|
|
xa4_globalTranslation = translation;
|
|
|
|
x438_28 = true;
|
2016-02-13 05:49:59 +00:00
|
|
|
}
|
|
|
|
|
2016-02-26 03:31:00 +00:00
|
|
|
void CParticleElectric::SetGlobalScale(const Zeus::CVector3f& scale)
|
2016-02-13 05:49:59 +00:00
|
|
|
{
|
2016-02-26 03:31:00 +00:00
|
|
|
xe0_globalScale = scale;
|
|
|
|
x438_28 = true;
|
2016-02-13 05:49:59 +00:00
|
|
|
}
|
|
|
|
|
2016-02-26 03:31:00 +00:00
|
|
|
void CParticleElectric::SetLocalScale(const Zeus::CVector3f& scale)
|
2016-02-13 05:49:59 +00:00
|
|
|
{
|
2016-02-26 03:31:00 +00:00
|
|
|
xec_localScale = scale;
|
|
|
|
x438_28 = true;
|
|
|
|
if (x438_26)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
2016-02-13 05:49:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void CParticleElectric::SetParticleEmission(bool)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2016-02-26 03:31:00 +00:00
|
|
|
void CParticleElectric::SetModulationColor(const Zeus::CColor& color)
|
2016-02-13 05:49:59 +00:00
|
|
|
{
|
2016-02-26 03:31:00 +00:00
|
|
|
if (!x1bc_hasModuColor)
|
|
|
|
x1bc_hasModuColor = true;
|
|
|
|
|
|
|
|
x1b8_moduColor = color;
|
|
|
|
/* TODO: Add child particle systems */
|
2016-02-13 05:49:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
const Zeus::CTransform& CParticleElectric::GetOrientation() const
|
|
|
|
{
|
2016-02-26 03:31:00 +00:00
|
|
|
return x44_orientation;
|
2016-02-13 05:49:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
const Zeus::CVector3f& CParticleElectric::GetTranslation() const
|
|
|
|
{
|
2016-02-26 03:31:00 +00:00
|
|
|
return x38_translation;
|
2016-02-13 05:49:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
const Zeus::CTransform& CParticleElectric::GetGlobalOrientation() const
|
|
|
|
{
|
2016-02-26 03:31:00 +00:00
|
|
|
return xb0_globalOrientation;
|
2016-02-13 05:49:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
const Zeus::CVector3f& CParticleElectric::GetGlobalTranslation() const
|
|
|
|
{
|
2016-02-26 03:31:00 +00:00
|
|
|
return xa4_globalTranslation;
|
2016-02-13 05:49:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
const Zeus::CVector3f& CParticleElectric::GetGlobalScale() const
|
|
|
|
{
|
2016-02-26 03:31:00 +00:00
|
|
|
return xe0_globalScale;
|
2016-02-13 05:49:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
const Zeus::CColor& CParticleElectric::GetModulationColor() const
|
|
|
|
{
|
2016-02-26 03:31:00 +00:00
|
|
|
if (!x1bc_hasModuColor)
|
|
|
|
return Zeus::CColor::skWhite;
|
|
|
|
return x1b8_moduColor;
|
2016-02-13 05:49:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bool CParticleElectric::IsSystemDeletable() const
|
|
|
|
{
|
2016-02-17 03:42:27 +00:00
|
|
|
return false;
|
2016-02-13 05:49:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
std::pair<Zeus::CAABox, bool> CParticleElectric::GetBounds() const
|
|
|
|
{
|
2016-02-17 03:42:27 +00:00
|
|
|
return std::make_pair(Zeus::CAABox(), false);
|
2016-02-13 05:49:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
u32 CParticleElectric::GetParticleCount() const
|
|
|
|
{
|
2016-02-17 03:42:27 +00:00
|
|
|
return 0;
|
2016-02-13 05:49:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bool CParticleElectric::SystemHasLight() const
|
|
|
|
{
|
2016-02-17 03:42:27 +00:00
|
|
|
return false;
|
2016-02-13 05:49:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
CLight CParticleElectric::GetLight() const
|
|
|
|
{
|
2016-02-17 03:42:27 +00:00
|
|
|
return CLight();
|
2016-02-13 05:49:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bool CParticleElectric::GetParticleEmission() const
|
|
|
|
{
|
2016-02-17 03:42:27 +00:00
|
|
|
return false;
|
2016-02-13 05:49:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void CParticleElectric::DestroyParticles()
|
2016-02-11 23:05:42 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|