[prev in list] [next in list] [prev in thread] [next in thread]
List: osflash-sandy
Subject: [Sandy] [sandy commit] r916 -
From: codesite-noreply () google ! com (codesite-noreply at google ! com)
Date: 2009-02-22 14:04:56
Message-ID: 0016364ece04f507360463825e1a () google ! com
[Download RAW message or body]
Author: makc.the.great
Date: Sun Feb 22 05:36:38 2009
New Revision: 916
Modified:
trunk/sandy/as3/trunk/src/sandy/core/scenegraph/mode7/Mode7.as
Log:
- depth bugfix (posistive default depth)
- depth setter (to be skybox-friendly)
Modified: trunk/sandy/as3/trunk/src/sandy/core/scenegraph/mode7/Mode7.as
==============================================================================
--- trunk/sandy/as3/trunk/src/sandy/core/scenegraph/mode7/Mode7.as
(original)
+++ trunk/sandy/as3/trunk/src/sandy/core/scenegraph/mode7/Mode7.as Sun Feb
22 05:36:38 2009
@@ -108,8 +108,8 @@
_near = near;
_far = far;
}
- }
public function clear():void
{
_container.graphics.clear();
}
// The container of this object
public function get container():Sprite
{
return _container;
}
// The depth of this object
public function get depth():Number
{
return -Number.MAX_VALUE;
}
-
public override function cull( p_oFrustum:Frustum, p_oViewMatrix:Matrix4,
p_bChanged:Boolean ):void
{
super.cull( p_oFrustum, p_oViewMatrix, p_bChanged );
// check if we need to resize our canvas
scene.renderer.addToDisplayList( this );
}
public function display( p_oContainer:Sprite = null ):void
{
_prevOK = false;
var i:int, di:int = 1, di_1:int;
for (i = 0; i <= _numLines; i += di)
{
_yCurrent = _altitude + _yMinTilted + i * _yStep;
_zCurrent = _zMinTilted + i * _zStep;
if (_yCurrent - _altitude != 0)
{
_t = -_altitude / (_yCurrent - _altitude);
if (_t >= _near)
{
_zProj = _t * _zCurrent;
_xAmplitude = _t * _ratioWidthHeight * _length;
if (_prevOK)
{
if (_t <= _far)
{
// TODO top-down order? for this is fucking backwards.
if (_xAmplitude - _xAmplitudePrev < precision) {
+ }
public function clear():void
{
_container.graphics.clear();
}
// The container of this object
public function get container():Sprite
{
return _container;
}
// The depth of this object
private var _depth:Number = +Number.MAX_VALUE;
public function get depth():Number
{
return _depth;
}
+ public function set depth(d:Number):void
{
_depth = d;
}
public override function cull( p_oFrustum:Frustum, p_oViewMatrix:Matrix4,
p_bChanged:Boolean ):void
{
super.cull( p_oFrustum, p_oViewMatrix, p_bChanged );
// check if we need to resize our canvas
scene.renderer.addToDisplayList( this );
}
public function display( p_oContainer:Sprite = null ):void
{
_prevOK = false;
var i:int, di:int = 1, di_1:int;
for (i = 0; i <= _numLines; i += di)
{
_yCurrent = _altitude + _yMinTilted + i * _yStep;
_zCurrent = _zMinTilted + i * _zStep;
if (_yCurrent - _altitude != 0)
{
_t = -_altitude / (_yCurrent - _altitude);
if (_t >= _near)
{
_zProj = _t * _zCurrent;
_xAmplitude = _t * _ratioWidthHeight * _length;
if (_prevOK)
{
if (_t <= _far)
{
// TODO top-down order? for this is fucking backwards.
if (_xAmplitude - _xAmplitudePrev < precision) {
i -=di; di++; continue;
} else {
if (di > 1) di_1 = di - 1;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic