Module imp3d

Class SceneTree.InnerNode

java.lang.Object
de.grogra.imp3d.objects.SceneTree.Node
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

    Fields
    Modifier and Type
    Field
    Description
    The first node of the linked list of children.
    static final int
     
    int
    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 final int
     
    static final int
     
    float
    00-component of the local transformation matrix.
    float
    01-component of the local transformation matrix.
    float
    02-component of the local transformation matrix.
    float
    03-component of the local transformation matrix.
    float
    10-component of the local transformation matrix.
    float
    11-component of the local transformation matrix.
    float
    12-component of the local transformation matrix.
    float
    13-component of the local transformation matrix.
    float
    20-component of the local transformation matrix.
    float
    21-component of the local transformation matrix.
    float
    22-component of the local transformation matrix.
    float
    23-component of the local transformation matrix.

    Fields inherited from class de.grogra.imp3d.objects.SceneTree.Node

    next
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    final void
     
    void
    Gets the transformation of this inner node and writes it to out.
    boolean
     
    protected boolean
     
    void
    Sets the transformation of this inner node to m.
     
    void
    Multiplies in from right by the transformation of this node and stores the result in out.
    void
    Transforms the point t by this node's affine transformation.
    void
    Transforms the point t by this node's affine transformation.
    void
    Transforms the vector t by the rotational component of this node's transformation.
    void
    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 Details

    • children

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

      public static final int CSG_MASK
      See Also:
    • IS_GROUP

      public static final int IS_GROUP
      See Also:
    • HAS_MORE_THAN_ONE_CHILD

      public static final int HAS_MORE_THAN_ONE_CHILD
      See Also:
    • 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.
    • 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 Details

    • InnerNode

      public InnerNode()
  • Method Details

    • accept

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

      public void set(Matrix4d m)
      Sets the transformation of this inner node to m.
      Parameters:
      m - affine coordinate transformation
    • 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
    • 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)
    • 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
    • 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
    • transformPoint

      public void transformPoint(Tuple3f t)
      Transforms the point t by this node's affine transformation.
      Parameters:
      t - a point to be transformed
    • transformPoint

      public void transformPoint(Tuple3d t)
      Transforms the point t by this node's affine transformation.
      Parameters:
      t - a point to be transformed
    • isSpecial

      protected boolean isSpecial()
    • isProperGroup

      public boolean isProperGroup()
    • toString

      public String toString()
      Overrides:
      toString in class Object