[prev in list] [next in list] [prev in thread] [next in thread]
List: osflash-sandy
Subject: [Sandy] [sandy commit] r355 -
From: codesite-noreply () google ! com (codesite-noreply at google ! com)
Date: 2007-08-31 16:30:29
Message-ID: c09ff7937804390157494e7c1cefc0 () google ! com
[Download RAW message or body]
Author: gralvik
Date: Fri Aug 31 09:29:38 2007
New Revision: 355
Modified:
trunk/sandy/as3/branches/3.0/src/sandy/core/scenegraph/Group.as
trunk/sandy/as3/branches/3.0/src/sandy/core/scenegraph/TransformGroup.as
Log:
Definalized Group and TransformGroup to make them extensible again.
Confirmed by mail from Thomas.
Modified: trunk/sandy/as3/branches/3.0/src/sandy/core/scenegraph/Group.as
==============================================================================
--- trunk/sandy/as3/branches/3.0/src/sandy/core/scenegraph/Group.as (original)
+++ trunk/sandy/as3/branches/3.0/src/sandy/core/scenegraph/Group.as Fri Aug 31 \
09:29:38 2007 @@ -1,4 +1,4 @@
-/*
+ /*
# ***** BEGIN LICENSE BLOCK *****
Copyright the original author or authors.
Licensed under the MOZILLA PUBLIC LICENSE, Version 1.1 (the "License");
@@ -14,45 +14,45 @@
# ***** END LICENSE BLOCK *****
*/
-package sandy.core.scenegraph
+package sandy.core.scenegraph
{
import sandy.core.Scene3D;
import sandy.core.data.Matrix4;
import sandy.view.CullingState;
import sandy.view.Frustum;
-
+
/**
* The Group class is used for branch nodes in the Sandy object tree.
*
* <p>This class is fianl, and can not be sub classed</p>
* <p>This group binds together, but can not transform its children.<br/>
* To transform collections of objects, you should add them to a transform \
group.</p>
- *
+ *
* @author Thomas Pfeiffer - kiroukou
* @version 1.0
* @date 28.03.2006
*
* @see sandy.core.scenegraph.TransformGroup
*/
- final public class Group extends Node
+ public class Group extends Node
{
/**
* Creates a branch group.
*
* @param p_sName A string identifier for this object
*/
- public function Group( p_sName:String = "" )
+ public function Group( p_sName:String = "" )
{
super( p_sName );
}
-
+
/**
* Tests this node against the camera frustum to get its visibility.
*
- * <p>If this node and its children are not within the frustum,
+ * <p>If this node and its children are not within the frustum,
* the node is culled and will not be displayed.<p/>
* <p>This method also updates the bounding volumes to make the more accurate \
culling system possible.<br/>
- * First the bounding sphere is updated, and if intersecting,
+ * First the bounding sphere is updated, and if intersecting,
* the bounding box is updated to perform the more precise culling.</p>
* <p><b>[MANDATORY] The update method must be called first!</b></p>
*
@@ -64,8 +64,8 @@
public override function cull( p_oScene:Scene3D, p_oFrustum:Frustum, \
p_oViewMatrix:Matrix4, p_bChanged:Boolean ):void {
// TODO
- // Parse the children, take their bounding volume and merge it with the current \
node recurssively.
- // After that call the super cull method to get the correct cull value.
+ // Parse the children, take their bounding volume and merge it with the current \
node recurssively. + // After that call the super cull method to get the correct \
cull value. const lChanged:Boolean = p_bChanged || changed;
for each( var l_oNode:Node in _aChilds )
l_oNode.cull( p_oScene, p_oFrustum, p_oViewMatrix, lChanged );
@@ -77,7 +77,7 @@
*
* @param p_oScene The current scene
* @param p_oCamera The current camera
- */
+ */
public override function render( p_oScene:Scene3D, p_oCamera:Camera3D ):void
{
const l_oCStateOut:CullingState = CullingState.OUTSIDE, l_oCStateIn:CullingState \
= CullingState.INSIDE;
Modified: trunk/sandy/as3/branches/3.0/src/sandy/core/scenegraph/TransformGroup.as
==============================================================================
--- trunk/sandy/as3/branches/3.0/src/sandy/core/scenegraph/TransformGroup.as (original)
+++ trunk/sandy/as3/branches/3.0/src/sandy/core/scenegraph/TransformGroup.as Fri Aug \
31 09:29:38 2007 @@ -1,4 +1,4 @@
-/*
+ /*
# ***** BEGIN LICENSE BLOCK *****
Copyright the original author or authors.
Licensed under the MOZILLA PUBLIC LICENSE, Version 1.1 (the "License");
@@ -13,44 +13,44 @@
# ***** END LICENSE BLOCK *****
*/
-package sandy.core.scenegraph
+package sandy.core.scenegraph
{
import sandy.core.Scene3D;
import sandy.core.data.Matrix4;
import sandy.view.CullingState;
import sandy.view.Frustum;
-
+
/**
* The TransformGroup class is used to create transform group.
*
- * <p>It represents a node in the object tree of the world.<br/>
+ * <p>It represents a node in the object tree of the world.<br/>
* Transformations performed on this group are applied to all its children.</p>
* <p>The class is final, i.e. it can not be subclassed.
- *
+ *
* @author Thomas Pfeiffer - kiroukou
* @version 3.0
* @date 26.07.2007
*/
- final public class TransformGroup extends ATransformable
+ public class TransformGroup extends ATransformable
{
/**
* Creates a transform group.
*
* @param p_sName A string identifier for this object
- */
+ */
public function TransformGroup( p_sName:String="" )
{
super( p_sName );
}
-
-
+
+
/**
* Tests this node against the camera frustum to get its visibility.
*
- * <p>If this node and its children are not within the frustum,
+ * <p>If this node and its children are not within the frustum,
* the node is set to cull and it would not be displayed.<p/>
* <p>The method also updates the bounding volumes to make the more accurate \
culling system possible.<br/>
- * First the bounding sphere is updated, and if intersecting,
+ * First the bounding sphere is updated, and if intersecting,
* the bounding box is updated to perform the more precise culling.</p>
* <p><b>[MANDATORY] The update method must be called first!</b></p>
*
@@ -62,15 +62,15 @@
public override function cull( p_oScene:Scene3D, p_oFrustum:Frustum, \
p_oViewMatrix:Matrix4, p_bChanged:Boolean ):void {
// TODO
- // Parse the children, take their bounding volume and merge it with the current \
node recurssively.
- // After that call the super cull method to get the correct cull value.
+ // Parse the children, take their bounding volume and merge it with the current \
node recurssively. + // After that call the super cull method to get the correct \
cull value. const lChanged:Boolean = p_bChanged || changed;
for each( var l_oNode:Node in _aChilds )
l_oNode.cull( p_oScene, p_oFrustum, p_oViewMatrix, lChanged );
// --
//super.cull( p_oFrustum, p_oViewMatrix, p_bChanged );
}
-
+
/**
* Renders all children of this transformgroup.
*
@@ -90,13 +90,13 @@
l_oNode.culled = l_oCStateIn; // Default value is inside.
}
}
-
-
+
+
/**
* Returns a string representation of the TransformGroup.
- *
+ *
* @return The fully qualified name.
- */
+ */
public override function toString():String
{
return "sandy.core.scenegraph.TransformGroup";
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic