org.ogre4j
Class Overlay

java.lang.Object
  extended by org.xbig.base.NativeObject
      extended by org.ogre4j.Overlay
All Implemented Interfaces:
IAllocatedObject<ISceneObjAllocPolicy>, IOverlay, ISceneObjAllocatedObject, INativeObject

public class Overlay
extends NativeObject
implements IOverlay


Nested Class Summary
static class Overlay.Overlay2DElementsIterator
           
static class Overlay.OverlayContainerList
           
 
Nested classes/interfaces inherited from interface org.ogre4j.IOverlay
IOverlay.IOverlay2DElementsIterator, IOverlay.IOverlayContainerList
 
Field Summary
 
Fields inherited from class org.xbig.base.NativeObject
deleted, object, remote
 
Constructor Summary
  Overlay(InstancePointer p)
          This constructor is public for internal useage only!
protected Overlay(InstancePointer p, boolean remote)
          Creates a Java wrapper object for an existing C++ object.
  Overlay(java.lang.String name)
           
  Overlay(WithoutNativeObject val)
          Allows creation of Java objects without C++ objects.
 
Method Summary
 void _findVisibleObjects(ICamera cam, IRenderQueue queue)
          Internal method to put the overlay contents onto the render queue.
 void _getWorldTransforms(IMatrix4 xform)
          Used to transform the overlay when scrolling, scaling etc.
 void _notifyOrigin(java.lang.String origin)
           
 void add2D(IOverlayContainer cont)
          Adds a 2D 'container' to the overlay.
 void add3D(ISceneNode node)
          Adds a node capable of holding 3D objects to the overlay.
 void clear()
          Clears the overlay of all attached items.
 void delete()
          Deletes the corresponding C++ object.
 void finalize()
           
 IOverlayElement findElementAt(float x, float y)
          This returns a at position x,y.
 void get2DElementsIterator(IOverlay.IOverlay2DElementsIterator returnValue)
           
 IOverlayContainer getChild(java.lang.String name)
           
 java.lang.String getName()
          Gets the name of this overlay.
 java.lang.String getOrigin()
          Get the origin of this overlay, e.g. a script file name.
 IRadian getRotate()
          Gets the rotation applied to this overlay, in degrees.
 float getScaleX()
          Gets the current X scale value
 float getScaleY()
          Gets the current Y scale value
 float getScrollX()
          Gets the current X scroll value
 float getScrollY()
          Gets the current Y scroll value
 int getZOrder()
          Gets the ZOrder of this overlay.
 void hide()
          Hides the overlay if it was visible.
 boolean isInitialised()
          Gets whether the overlay is initialised or not.
 boolean isVisible()
          Gets whether the overlay is displayed or not.
 void remove2D(IOverlayContainer cont)
          Removes a 2D container from the overlay.
 void remove3D(ISceneNode node)
          Removes a 3D element from the overlay.
 void rotate(IRadian angle)
          Adds the passed in angle to the rotation applied to this overlay.
 void scroll(float xoff, float yoff)
          Scrolls the overlay by the offsets provided.
 void setRotate(IRadian angle)
          Sets the rotation applied to this overlay.
 void setScale(float x, float y)
          Sets the scaling factor of this overlay.
 void setScroll(float x, float y)
          Sets the scrolling factor of this overlay.
 void setZOrder(int zorder)
          Alters the ZOrder of this overlay.
 void show()
          Shows the overlay if it was hidden.
 
Methods inherited from class org.xbig.base.NativeObject
disconnectFromNativeObject, equals, getInstancePointer, hashCode, setInstancePointer, setInstancePointer, setInstancePointer, toString
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.xbig.base.INativeObject
disconnectFromNativeObject, getInstancePointer, setInstancePointer, setInstancePointer, setInstancePointer
 

Constructor Detail

Overlay

public Overlay(InstancePointer p)
This constructor is public for internal useage only! Do not use it!


Overlay

protected Overlay(InstancePointer p,
                  boolean remote)
Creates a Java wrapper object for an existing C++ object. If remote is set to 'true' this object cannot be deleted in Java.


Overlay

public Overlay(WithoutNativeObject val)
Allows creation of Java objects without C++ objects.

See Also:
WithoutNativeObject, INativeObject.disconnectFromNativeObject()

Overlay

public Overlay(java.lang.String name)
Method Detail

delete

public void delete()
Description copied from interface: INativeObject
Deletes the corresponding C++ object.

Subclasses must implement this but if the native instance was created by the underlying library the native call to dispose must not happen!

Specified by:
delete in interface INativeObject
Specified by:
delete in class NativeObject
See Also:
#remote

finalize

public void finalize()
Overrides:
finalize in class NativeObject

getChild

public IOverlayContainer getChild(java.lang.String name)
Specified by:
getChild in interface IOverlay

getName

public java.lang.String getName()
Gets the name of this overlay.

Specified by:
getName in interface IOverlay

setZOrder

public void setZOrder(int zorder)
Alters the ZOrder of this overlay.

Specified by:
setZOrder in interface IOverlay

getZOrder

public int getZOrder()
Gets the ZOrder of this overlay.

Specified by:
getZOrder in interface IOverlay

isVisible

public boolean isVisible()
Gets whether the overlay is displayed or not.

Specified by:
isVisible in interface IOverlay

isInitialised

public boolean isInitialised()
Gets whether the overlay is initialised or not.

Specified by:
isInitialised in interface IOverlay

show

public void show()
Shows the overlay if it was hidden.

Specified by:
show in interface IOverlay

hide

public void hide()
Hides the overlay if it was visible.

Specified by:
hide in interface IOverlay

add2D

public void add2D(IOverlayContainer cont)
Adds a 2D 'container' to the overlay.

Specified by:
add2D in interface IOverlay

remove2D

public void remove2D(IOverlayContainer cont)
Removes a 2D container from the overlay.

Specified by:
remove2D in interface IOverlay

add3D

public void add3D(ISceneNode node)
Adds a node capable of holding 3D objects to the overlay.

Specified by:
add3D in interface IOverlay

remove3D

public void remove3D(ISceneNode node)
Removes a 3D element from the overlay.

Specified by:
remove3D in interface IOverlay

clear

public void clear()
Clears the overlay of all attached items.

Specified by:
clear in interface IOverlay

setScroll

public void setScroll(float x,
                      float y)
Sets the scrolling factor of this overlay.

Specified by:
setScroll in interface IOverlay

getScrollX

public float getScrollX()
Gets the current X scroll value

Specified by:
getScrollX in interface IOverlay

getScrollY

public float getScrollY()
Gets the current Y scroll value

Specified by:
getScrollY in interface IOverlay

scroll

public void scroll(float xoff,
                   float yoff)
Scrolls the overlay by the offsets provided.

Specified by:
scroll in interface IOverlay

setRotate

public void setRotate(IRadian angle)
Sets the rotation applied to this overlay.

Specified by:
setRotate in interface IOverlay

getRotate

public IRadian getRotate()
Gets the rotation applied to this overlay, in degrees.

Specified by:
getRotate in interface IOverlay

rotate

public void rotate(IRadian angle)
Adds the passed in angle to the rotation applied to this overlay.

Specified by:
rotate in interface IOverlay

setScale

public void setScale(float x,
                     float y)
Sets the scaling factor of this overlay.

Specified by:
setScale in interface IOverlay

getScaleX

public float getScaleX()
Gets the current X scale value

Specified by:
getScaleX in interface IOverlay

getScaleY

public float getScaleY()
Gets the current Y scale value

Specified by:
getScaleY in interface IOverlay

_getWorldTransforms

public void _getWorldTransforms(IMatrix4 xform)
Used to transform the overlay when scrolling, scaling etc.

Specified by:
_getWorldTransforms in interface IOverlay

_findVisibleObjects

public void _findVisibleObjects(ICamera cam,
                                IRenderQueue queue)
Internal method to put the overlay contents onto the render queue.

Specified by:
_findVisibleObjects in interface IOverlay

findElementAt

public IOverlayElement findElementAt(float x,
                                     float y)
This returns a at position x,y.

Specified by:
findElementAt in interface IOverlay

get2DElementsIterator

public void get2DElementsIterator(IOverlay.IOverlay2DElementsIterator returnValue)
Specified by:
get2DElementsIterator in interface IOverlay

getOrigin

public java.lang.String getOrigin()
Get the origin of this overlay, e.g. a script file name.

Specified by:
getOrigin in interface IOverlay

_notifyOrigin

public void _notifyOrigin(java.lang.String origin)
Specified by:
_notifyOrigin in interface IOverlay


Copyright © 2007 netAllied GmbH. All Rights Reserved.