1#include "Game/AreaObj/MercatorTransformCube.hpp"
2#include "JSystem/JMath/JMath.hpp"
4MercatorTransformCube::MercatorTransformCube(
int type,
const char *pName) :
AreaObj(type, pName) {
8MercatorTransformCube::~MercatorTransformCube() {
15 TMtx34f *matrix = MR::getZonePlacementMtx(rIter);
16 _3C.setInline(*matrix);
19f32 MercatorTransformCube::getSphereRadius()
const {
24 return static_cast<f32
>(mObjArg0);
27void MercatorTransformCube::calcUV(TVec2f *uv,
const TVec3f &a2)
const {
29 calcLocalBoxSize(&boxSize);
33 MR::calcCubeLocalPos(&localPos,
this, a2);
35 uv->x = 3.1415927f * localPos.x / boxSize.x;
36 uv->y = 1.5707964f * -localPos.z / boxSize.z;
39void MercatorTransformCube::calcLocalBoxSize(TVec3f *pPos)
const {
40 TBox3f *box = MR::getCubeLocalBox(
this);
48 JMathInlineVEC::PSVECSubtract(
reinterpret_cast<Vec *
>(&max),
reinterpret_cast<Vec *
>(&min),
reinterpret_cast<Vec *
>(pPos));
virtual void init(const JMapInfoIter &)
Intializes the NameObj and can set various settings and construct necessary classes.