16
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
//Gets node at the specified position.
//Grid3DNode object will be created if it does not exist.
//@param vector3F position
//@return Grid3DNode
function Grid3D::getNodeAt(%this, %position)
{
%dif = vectorSub(%position, %this.origin);
%difX = getWord(%dif, 0) - (%this.nExtX >> 1);
%difY = getWord(%dif, 1) - (%this.nExtY >> 1);
%difZ = getWord(%dif, 2) - (%this.nExtZ >> 1);
%x = (%difX / %this.nExtX + 1) >> 0;
%y = (%difY / %this.nExtY + 1) >> 0;
%z = (%difZ / %this.nExtZ + 1) >> 0;
if(!isObject(%this.node[%x, %y, %z]))
{
//Creating this object is the slowest part of the code.
//Unsure how to optimize.
%nPos = vectorAdd(%x * %this.nExtX SPC %y * %this.nExtY SPC %z * %this.nExtZ, %this.origin);
%this.node[%x, %y, %z] = new ScriptObject()
{
class = Grid3DNode;
position = %nPos;
};
%this.add(%this.node[%x, %y, %z]);
}
return %this.node[%x, %y, %z];
}
http://stats.greek2me.us/user-lookup.php?blid=11902
http://stats.greek2me.us/user-lookup.php?name=Swollow
BLID name lastseen
Each field is separated by a tab character. Multiple results will appear on multiple lines. (although currently I've disabled wildcard name search to prevent abuse) The listing will end with a blank line. When no result is found, only a blank line will be returned.