Commit c7a4f320 authored by D-AIRY's avatar D-AIRY

added MemAlloc::clearFast(); SMPlaneTransformTI()

parent 8d273810
......@@ -199,6 +199,25 @@ public:
//AllocBlock();
}
void clearFast()
{
for(int i = 0; i < this->NumCurBlockCount; i++)
{
if(this->memblocks[i].mem)
{
for(int j = 0; j < this->memblocks[i].size; j++)
{
if(!(this->memblocks[i].mem[j].IsFree & 0x80000000))
{
(&(this->memblocks[i].mem[j].data))->~T();
}
this->memblocks[i].mem[j].IsFree = 0x80000000 | (j + 1);
}
}
}
this->NumCurBlock = 0;
}
void AllocBlock(UINT size = SizeBlock)
{
MemBlock * tmpMB = this->memblocks;
......
......@@ -2352,6 +2352,16 @@ __forceinline SMPLANE SMPlaneTransform(const SMPLANE &P, const SMMATRIX &M)
);
}
__forceinline SMPLANE SMPlaneTransformTI(const SMPLANE &P, const SMMATRIX &m)
{
return(
float4(P.x) * m.r[0] +
float4(P.y) * m.r[1] +
float4(P.z) * m.r[2] +
float4(P.w) * m.r[3]
);
}
__forceinline SMPLANE SMPlaneNormalize(const SMPLANE &P)
{
float fInvLen = 1.0f / SMVector3Length(P);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment