本文整理匯總了Java中com.flowpowered.math.vector.Vector3i.equals方法的典型用法代碼示例。如果您正苦於以下問題:Java Vector3i.equals方法的具體用法?Java Vector3i.equals怎麽用?Java Vector3i.equals使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.flowpowered.math.vector.Vector3i
的用法示例。
在下文中一共展示了Vector3i.equals方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: isChunkRequired
import com.flowpowered.math.vector.Vector3i; //導入方法依賴的package包/類
public boolean isChunkRequired(final Vector3i position)
{
if(chunkMap.size() <= 2 || !chunkMap.containsKey(position))
return false;
lookup:
for(Vector3i direction: Util.CARDINAL_DIRECTIONS)
{
Vector3i supported = position.add(direction);
if(!chunkMap.containsKey(supported))
continue;
for(Vector3i secondDirection: Util.CARDINAL_DIRECTIONS)
{
Vector3i alternativeSupport = supported.add(secondDirection);
if(alternativeSupport.equals(position))
continue;
if(chunkMap.containsKey(alternativeSupport))
continue lookup;
}
return true;
}
return false;
}
示例2: addPoint
import com.flowpowered.math.vector.Vector3i; //導入方法依賴的package包/類
public void addPoint(Vector3i point) {
if (this.points.size() == 0) {
this.points.add(point);
} else {
Vector3i lastPoint = this.points.get(this.points.size() - 1);
if (!point.equals(lastPoint)) {
this.points.add(point);
}
this.distance += lastPoint.distance(point);
}
}
示例3: setCuboidPoint
import com.flowpowered.math.vector.Vector3i; //導入方法依賴的package包/類
private void setCuboidPoint(Region region, int number, Vector3i vec) {
if (!vec.equals(Points.INVALID_POINT)) {
region.setCuboidPoint(number, vec.getX(), vec.getY(), vec.getZ());
}
}