org.ogre4j
Class PixelBox

java.lang.Object
  extended by org.xbig.base.NativeObject
      extended by org.ogre4j.PixelBox
All Implemented Interfaces:
IBox, IPixelBox, INativeObject

public class PixelBox
extends NativeObject
implements IPixelBox


Field Summary
 
Fields inherited from class org.xbig.base.NativeObject
deleted, object, remote
 
Constructor Summary
  PixelBox()
           
  PixelBox(IBox extents, PixelFormat pixelFormat, VoidPointer pixelData)
          Constructor providing extents in the form of a object.
  PixelBox(InstancePointer p)
          This constructor is public for internal useage only!
protected PixelBox(InstancePointer p, boolean remote)
          Creates a Java wrapper object for an existing C++ object.
  PixelBox(int width, int height, int depth, PixelFormat pixelFormat, VoidPointer pixelData)
          Constructor providing width, height and depth.
  PixelBox(WithoutNativeObject val)
          Allows creation of Java objects without C++ objects.
 
Method Summary
 boolean contains(IBox def)
           
 void delete()
          Deletes the corresponding C++ object.
 void finalize()
           
 int getback()
           
 int getbottom()
           
 int getConsecutiveSize()
          Return the size (in bytes) this image would take if it was laid out consecutive in memory
 VoidPointer getdata()
           
 int getDepth()
           
 PixelFormat getformat()
           
 int getfront()
           
 int getHeight()
           
 int getleft()
           
 int getright()
           
 int getrowPitch()
           
 int getRowSkip()
          Get the number of elements between one past the rightmost pixel of one row and the leftmost pixel of the next row.
 int getslicePitch()
           
 int getSliceSkip()
          Get the number of elements between one past the right bottom pixel of one slice and the left top pixel of the next slice.
 void getSubVolume(IPixelBox returnValue, IBox def)
          Return a subvolume of this .
 int gettop()
           
 int getWidth()
           
 boolean isConsecutive()
          Return whether this buffer is laid out consecutive in memory (ie the pitches are equal to the dimensions)
 void setback(int _jni_value_)
           
 void setbottom(int _jni_value_)
           
 void setConsecutive()
          Set the rowPitch and slicePitch so that the buffer is laid out consecutive in memory.
 void setdata(VoidPointer _jni_value_)
           
 void setformat(PixelFormat _jni_value_)
           
 void setfront(int _jni_value_)
           
 void setleft(int _jni_value_)
           
 void setright(int _jni_value_)
           
 void setrowPitch(int _jni_value_)
           
 void setslicePitch(int _jni_value_)
           
 void settop(int _jni_value_)
           
 
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

PixelBox

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


PixelBox

protected PixelBox(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.


PixelBox

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

See Also:
WithoutNativeObject, INativeObject.disconnectFromNativeObject()

PixelBox

public PixelBox()

PixelBox

public PixelBox(IBox extents,
                PixelFormat pixelFormat,
                VoidPointer pixelData)
Constructor providing extents in the form of a object. This constructor assumes the pixel data is laid out consecutively in memory. (this means row after row, slice after slice, with no space in between)


PixelBox

public PixelBox(int width,
                int height,
                int depth,
                PixelFormat pixelFormat,
                VoidPointer pixelData)
Constructor providing width, height and depth. This constructor assumes the pixel data is laid out consecutively in memory. (this means row after row, slice after slice, with no space in between)

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

setConsecutive

public void setConsecutive()
Set the rowPitch and slicePitch so that the buffer is laid out consecutive in memory.

Specified by:
setConsecutive in interface IPixelBox

getRowSkip

public int getRowSkip()
Get the number of elements between one past the rightmost pixel of one row and the leftmost pixel of the next row. (IE this is zero if rows are consecutive).

Specified by:
getRowSkip in interface IPixelBox

getSliceSkip

public int getSliceSkip()
Get the number of elements between one past the right bottom pixel of one slice and the left top pixel of the next slice. (IE this is zero if slices are consecutive).

Specified by:
getSliceSkip in interface IPixelBox

isConsecutive

public boolean isConsecutive()
Return whether this buffer is laid out consecutive in memory (ie the pitches are equal to the dimensions)

Specified by:
isConsecutive in interface IPixelBox

getConsecutiveSize

public int getConsecutiveSize()
Return the size (in bytes) this image would take if it was laid out consecutive in memory

Specified by:
getConsecutiveSize in interface IPixelBox

getSubVolume

public void getSubVolume(IPixelBox returnValue,
                         IBox def)
Return a subvolume of this .

Specified by:
getSubVolume in interface IPixelBox

contains

public boolean contains(IBox def)
Specified by:
contains in interface IBox

getWidth

public int getWidth()
Specified by:
getWidth in interface IBox

getHeight

public int getHeight()
Specified by:
getHeight in interface IBox

getDepth

public int getDepth()
Specified by:
getDepth in interface IBox

getdata

public VoidPointer getdata()
Specified by:
getdata in interface IPixelBox

setdata

public void setdata(VoidPointer _jni_value_)
Specified by:
setdata in interface IPixelBox

getformat

public PixelFormat getformat()
Specified by:
getformat in interface IPixelBox

setformat

public void setformat(PixelFormat _jni_value_)
Specified by:
setformat in interface IPixelBox

getrowPitch

public int getrowPitch()
Specified by:
getrowPitch in interface IPixelBox

setrowPitch

public void setrowPitch(int _jni_value_)
Specified by:
setrowPitch in interface IPixelBox

getslicePitch

public int getslicePitch()
Specified by:
getslicePitch in interface IPixelBox

setslicePitch

public void setslicePitch(int _jni_value_)
Specified by:
setslicePitch in interface IPixelBox

getleft

public int getleft()
Specified by:
getleft in interface IBox

setleft

public void setleft(int _jni_value_)
Specified by:
setleft in interface IBox

gettop

public int gettop()
Specified by:
gettop in interface IBox

settop

public void settop(int _jni_value_)
Specified by:
settop in interface IBox

getright

public int getright()
Specified by:
getright in interface IBox

setright

public void setright(int _jni_value_)
Specified by:
setright in interface IBox

getbottom

public int getbottom()
Specified by:
getbottom in interface IBox

setbottom

public void setbottom(int _jni_value_)
Specified by:
setbottom in interface IBox

getfront

public int getfront()
Specified by:
getfront in interface IBox

setfront

public void setfront(int _jni_value_)
Specified by:
setfront in interface IBox

getback

public int getback()
Specified by:
getback in interface IBox

setback

public void setback(int _jni_value_)
Specified by:
setback in interface IBox


Copyright © 2007 netAllied GmbH. All Rights Reserved.