de.grogra.imp3d.objects
Class SceneTree.InnerNode

java.lang.Object
  extended by de.grogra.imp3d.objects.SceneTree.Node
      extended by de.grogra.imp3d.objects.SceneTree.InnerNode
Enclosing class:
SceneTree

public static class SceneTree.InnerNode
extends SceneTree.Node

This class represents an inner node of a scene tree. Inner nodes have a set of children, stored as a linked list of SceneTree.Nodes, and specify a coordinate transformation by the fields m00 to m23. The coordinate transformation transforms from the children's coordinate systems to the coordinate system of this inner node.

Author:
Ole Kniemeyer

Field Summary
 SceneTree.Node children
          The first node of the linked list of children.
static int CSG_MASK
           
 int flags
          Stores flags IS_GROUP, HAS_MORE_THAN_ONE_CHILD as well as the the CSG operation performed by this node, one of the CSG constants in Attributes.
static int HAS_MORE_THAN_ONE_CHILD
           
static int IS_GROUP
           
 float m00
          00-component of the local transformation matrix.
 float m01
          01-component of the local transformation matrix.
 float m02
          02-component of the local transformation matrix.
 float m03
          03-component of the local transformation matrix.
 float m10
          10-component of the local transformation matrix.
 float m11
          11-component of the local transformation matrix.
 float m12
          12-component of the local transformation matrix.
 float m13
          13-component of the local transformation matrix.
 float m20
          20-component of the local transformation matrix.
 float m21
          21-component of the local transformation matrix.
 float m22
          22-component of the local transformation matrix.
 float m23
          23-component of the local transformation matrix.
 
Fields inherited from class de.grogra.imp3d.objects.SceneTree.Node
next
 
Constructor Summary
SceneTree.InnerNode()
           
 
Method Summary
 void accept(SceneTree.Visitor visitor)
           
 void get(Matrix4d out)
          Gets the transformation of this inner node and writes it to out.
 boolean isProperGroup()
           
protected  boolean isSpecial()
           
 void set(Matrix4d m)
          Sets the transformation of this inner node to m.
 java.lang.String toString()
           
 void transform(Matrix4d in, Matrix4d out)
          Multiplies in from right by the transformation of this node and stores the result in out.
 void transformPoint(Tuple3d t)
          Transforms the point t by this node's affine transformation.
 void transformPoint(Tuple3f t)
          Transforms the point t by this node's affine transformation.
 void transformVector(Tuple3d t)
          Transforms the vector t by the rotational component of this node's transformation.
 void transformVector(Tuple3f t)
          Transforms the vector t by the rotational component of this node's transformation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

children

public SceneTree.Node children
The first node of the linked list of children.


CSG_MASK

public static final int CSG_MASK
See Also:
Constant Field Values

flags

public int flags
Stores flags IS_GROUP, HAS_MORE_THAN_ONE_CHILD as well as the the CSG operation performed by this node, one of the CSG constants in Attributes.


HAS_MORE_THAN_ONE_CHILD

public static final int HAS_MORE_THAN_ONE_CHILD
See Also:
Constant Field Values

IS_GROUP

public static final int IS_GROUP
See Also:
Constant Field Values

m00

public float m00
00-component of the local transformation matrix.


m01

public float m01
01-component of the local transformation matrix.


m02

public float m02
02-component of the local transformation matrix.


m03

public float m03
03-component of the local transformation matrix.


m10

public float m10
10-component of the local transformation matrix.


m11

public float m11
11-component of the local transformation matrix.


m12

public float m12
12-component of the local transformation matrix.


m13

public float m13
13-component of the local transformation matrix.


m20

public float m20
20-component of the local transformation matrix.


m21

public float m21
21-component of the local transformation matrix.


m22

public float m22
22-component of the local transformation matrix.


m23

public float m23
23-component of the local transformation matrix.

Constructor Detail

SceneTree.InnerNode

public SceneTree.InnerNode()
Method Detail

accept

public final void accept(SceneTree.Visitor visitor)
Specified by:
accept in class SceneTree.Node

get

public void get(Matrix4d out)
Gets the transformation of this inner node and writes it to out.

Parameters:
out - the transformation is written to this instance

isProperGroup

public boolean isProperGroup()

isSpecial

protected boolean isSpecial()

set

public void set(Matrix4d m)
Sets the transformation of this inner node to m.

Parameters:
m - affine coordinate transformation

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

transform

public void transform(Matrix4d in,
                      Matrix4d out)
Multiplies in from right by the transformation of this node and stores the result in out.

Parameters:
in - input transformation
out - output transformation (may be in)

transformPoint

public void transformPoint(Tuple3d t)
Transforms the point t by this node's affine transformation.

Parameters:
t - a point to be transformed

transformPoint

public void transformPoint(Tuple3f t)
Transforms the point t by this node's affine transformation.

Parameters:
t - a point to be transformed

transformVector

public void transformVector(Tuple3d t)
Transforms the vector t by the rotational component of this node's transformation.

Parameters:
t - a vector to be transformed

transformVector

public void transformVector(Tuple3f t)
Transforms the vector t by the rotational component of this node's transformation.

Parameters:
t - a vector to be transformed