mirror of
https://github.com/zeldaret/tww.git
synced 2026-09-02 01:42:49 -04:00
some bomb/bomb2 matches, TVec3::cubic match
This commit is contained in:
@@ -289,6 +289,20 @@ struct TVec3<f32> {
|
||||
};
|
||||
return res;
|
||||
}
|
||||
|
||||
template<typename S>
|
||||
void cubic(const JGeometry::TVec3<f32>& vec1, const JGeometry::TVec3<f32>& vec2, const JGeometry::TVec3<f32>& vec3, const JGeometry::TVec3<f32>& vec4, f32 f19) {
|
||||
// TODO: name variables properly
|
||||
f32 f5 = f19 * f19;
|
||||
f32 f4 = f5 * f19;
|
||||
f32 f3 = 1.0f + ((2.0f * f4) - (3.0f * f5));
|
||||
f32 f2 = (-2.0f * f4) + (3.0f * f5);
|
||||
f32 f1 = f19 + (f4 - (2.0f * f5));
|
||||
f32 f0 = (f4 - f5);
|
||||
this->x = (f3 * vec1.x) + (f2 * vec2.x) + (f1 * vec4.x) + (f0 * vec3.z);
|
||||
this->y = (f3 * vec1.y) + (f2 * vec2.y) + (f1 * vec4.y) + (f0 * vec3.y);
|
||||
this->z = (f3 * vec1.z) + (f2 * vec2.z) + (f1 * vec4.z) + (f0 * vec3.x);
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
|
||||
@@ -34,6 +34,28 @@ public:
|
||||
~JPABaseParticle() {}
|
||||
JPABaseParticle() : mLink(this), mCurFrame(0.0f) {}
|
||||
void setOffsetPosition(f32 x, f32 y, f32 z) { mGlobalPosition.set(x, y, z); }
|
||||
void setOffsetPosition(const JGeometry::TVec3<f32>& pos) { mGlobalPosition.set(pos); }
|
||||
|
||||
void calcCB(JPABaseEmitter*) {}
|
||||
void checkStatus(u32) {}
|
||||
void clearStatus(u32) {}
|
||||
void drawCB(JPABaseEmitter*) {}
|
||||
void getAge() const {}
|
||||
void getDrawParamCPtr() {}
|
||||
void getDrawParamPPtr() {}
|
||||
void getGlobalPosition(JGeometry::TVec3<f32>&) const {}
|
||||
void getHeight() {}
|
||||
void getLifeTime() const {}
|
||||
void getLocalPosition(JGeometry::TVec3<f32>&) const {}
|
||||
void getOffsetPosition(JGeometry::TVec3<f32>&) const {}
|
||||
void getVelVec(JGeometry::TVec3<f32>&) const {}
|
||||
void getWidth() {}
|
||||
void initStatus(u32) {}
|
||||
void isInvisibleParticle() {}
|
||||
void setCallBackPtr(JPACallBackBase2<JPABaseEmitter*, JPABaseParticle*>*) {}
|
||||
void setDeleteParticleFlag() {}
|
||||
void setInvisibleParticleFlag() {}
|
||||
void setStatus(u32) {}
|
||||
|
||||
public:
|
||||
/* 0x00 */ JSULink<JPABaseParticle> mLink;
|
||||
|
||||
Reference in New Issue
Block a user