rectangleparticleculler.as.svn-base
来自「一个2D基于verlet的Flash物理引擎。它用AS3编写而成。Fisix的目」· SVN-BASE 代码 · 共 35 行
SVN-BASE
35 行
package org.papervision3d.core.culling{ import org.papervision3d.core.geom.renderables.Particle; import flash.geom.Rectangle; import flash.geom.Point; import org.papervision3d.core.geom.renderables.Vertex3DInstance; public class RectangleParticleCuller implements IParticleCuller { private static var vInstance:Vertex3DInstance; private static var testPoint:Point; public var cullingRectangle:Rectangle; public function RectangleParticleCuller(cullingRectangle:Rectangle = null) { this.cullingRectangle = cullingRectangle; testPoint = new Point(); } public function testParticle(particle:Particle):Boolean { vInstance = particle.vertex3D.vertex3DInstance; if(vInstance.visible){ testPoint.x = vInstance.x; testPoint.y = vInstance.y; if(cullingRectangle.containsPoint(testPoint)){ return true; } } return false; } }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?