Class SpatialWrapper

java.lang.Object
saf.v3d.scene.VSpatial
saf.v3d.scene.VComposite
repast.simphony.visualizationOGL2D.SpatialWrapper
All Implemented Interfaces:
saf.v3d.scene.TextureRenderable

public class SpatialWrapper extends saf.v3d.scene.VComposite implements saf.v3d.scene.TextureRenderable
Wraps the VSpatial produced by a style. This allows us to avoid edge etc. updates when a VSpatial is changed by the style.
Author:
Nick Collier
  • Field Summary

    Fields inherited from class saf.v3d.scene.VComposite

    boundsDirty, children

    Fields inherited from class saf.v3d.scene.VSpatial

    appearance, appSetter, boundingSphere, clientMap, dirty, id, localRotation, localScale, localTrans, NO_CANVAS_ID, parent, visible, worldRotation, worldScale, worldTrans
  • Constructor Summary

    Constructors
    Constructor
    Description
    SpatialWrapper(saf.v3d.scene.VSpatial child)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected saf.v3d.picking.BoundingSphere
     
    void
    draw(com.jogamp.opengl.GL2 gl, saf.v3d.render.RenderState state)
     
    saf.v3d.scene.VSpatial
    Gets the VSpatial that this wraps.
    saf.v3d.picking.BoundingSphere
     
    float
     
    saf.v3d.render.Texture2D
     
    void
    intersects(org.jogamp.vecmath.Point3f rayOrigin, org.jogamp.vecmath.Vector3f rayDirection, saf.v3d.picking.Accumulator accumulator)
     
    void
    intersects(org.jogamp.vecmath.Point3f point, saf.v3d.picking.Accumulator accumulator)
     
    void
    setChild(saf.v3d.scene.VSpatial child)
    Sets the VSpatial that this wraps.
    void
    setNextChild(saf.v3d.scene.VSpatial child)
     
    org.jogamp.vecmath.Point3f
    transform(org.jogamp.vecmath.Point3f pt)
     
    void
     
    void
     

    Methods inherited from class saf.v3d.scene.VComposite

    addChild, addChildren, children, doDraw, getChildCount, invalidate, markAsDirty, markBoundsDirty, removeAllChildren, removeChild

    Methods inherited from class saf.v3d.scene.VSpatial

    getAppearance, getBoundingSphere, getLocalRotation, getLocalTranslation, getParent, getProperty, getWorldRotation, getWorldScale, getWorldToLocalTransform, getWorldTranslation, isVisible, percolateDirtyUp, putProperty, rotate, rotate, rotate2D, scale, setAppearance, setParent, setVisible, translate, translate

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SpatialWrapper

      public SpatialWrapper(saf.v3d.scene.VSpatial child)
  • Method Details

    • setNextChild

      public void setNextChild(saf.v3d.scene.VSpatial child)
    • updateChild

      public void updateChild()
    • getTextureData

      public saf.v3d.render.Texture2D getTextureData()
      Specified by:
      getTextureData in interface saf.v3d.scene.TextureRenderable
    • transform

      public org.jogamp.vecmath.Point3f transform(org.jogamp.vecmath.Point3f pt)
      Overrides:
      transform in class saf.v3d.scene.VSpatial
    • getChild

      public saf.v3d.scene.VSpatial getChild()
      Gets the VSpatial that this wraps.
      Returns:
      the VSpatial that this wraps.
    • setChild

      public void setChild(saf.v3d.scene.VSpatial child)
      Sets the VSpatial that this wraps.
      Parameters:
      child -
    • getLocalScale

      public float getLocalScale()
      Overrides:
      getLocalScale in class saf.v3d.scene.VSpatial
    • draw

      public void draw(com.jogamp.opengl.GL2 gl, saf.v3d.render.RenderState state)
      Overrides:
      draw in class saf.v3d.scene.VSpatial
    • updateWorldTransformation

      public void updateWorldTransformation()
      Overrides:
      updateWorldTransformation in class saf.v3d.scene.VComposite
    • doGetBoundingSphere

      protected saf.v3d.picking.BoundingSphere doGetBoundingSphere()
      Overrides:
      doGetBoundingSphere in class saf.v3d.scene.VComposite
    • getLocalBoundingSphere

      public saf.v3d.picking.BoundingSphere getLocalBoundingSphere()
      Overrides:
      getLocalBoundingSphere in class saf.v3d.scene.VSpatial
    • intersects

      public void intersects(org.jogamp.vecmath.Point3f point, saf.v3d.picking.Accumulator accumulator)
      Overrides:
      intersects in class saf.v3d.scene.VComposite
    • intersects

      public void intersects(org.jogamp.vecmath.Point3f rayOrigin, org.jogamp.vecmath.Vector3f rayDirection, saf.v3d.picking.Accumulator accumulator)
      Overrides:
      intersects in class saf.v3d.scene.VComposite