org.ogre4j
Class VertexElement

java.lang.Object
  extended by org.xbig.base.NativeObject
      extended by org.ogre4j.VertexElement
All Implemented Interfaces:
IAllocatedObject<IGeometryAllocPolicy>, IGeometryAllocatedObject, IVertexElement, INativeObject

public class VertexElement
extends NativeObject
implements IVertexElement


Field Summary
 
Fields inherited from class org.xbig.base.NativeObject
deleted, object, remote
 
Constructor Summary
  VertexElement(InstancePointer p)
          This constructor is public for internal useage only!
protected VertexElement(InstancePointer p, boolean remote)
          Creates a Java wrapper object for an existing C++ object.
  VertexElement(int source, int offset, VertexElementType theType, VertexElementSemantic semantic, int index)
           
  VertexElement(WithoutNativeObject val)
          Allows creation of Java objects without C++ objects.
 
Method Summary
 void baseVertexPointerToElement_a(VoidPointer pBase, NativeObjectPointer<VoidPointer> pElem)
          Adjusts a pointer to the base of a vertex to point at this element.
 void baseVertexPointerToElement_b(VoidPointer pBase, NativeObjectPointer<FloatPointer> pElem)
          Adjusts a pointer to the base of a vertex to point at this element.
 void baseVertexPointerToElement_c(VoidPointer pBase, NativeObjectPointer<LongPointer> pElem)
          Adjusts a pointer to the base of a vertex to point at this element.
 void baseVertexPointerToElement_d(VoidPointer pBase, NativeObjectPointer<ShortPointer> pElem)
          Adjusts a pointer to the base of a vertex to point at this element.
 void baseVertexPointerToElement_e(VoidPointer pBase, NativeObjectPointer<IntegerPointer> pElem)
          Adjusts a pointer to the base of a vertex to point at this element.
static long convertColourValue(IColourValue src, VertexElementType dst)
          Utility method for converting colour to a packed 32-bit colour type.
static void convertColourValue(VertexElementType srcType, VertexElementType dstType, LongPointer ptr)
          Utility method for converting colour from one packed 32-bit colour type to another.
 void delete()
          Deletes the corresponding C++ object.
 void finalize()
           
static VertexElementType getBaseType(VertexElementType multiType)
          Simple converter function which will a type into it's single-value equivalent - makes switches on type easier.
static VertexElementType getBestColourVertexElementType()
          Utility method to get the most appropriate packed colour vertex element format.
 int getIndex()
           
 int getOffset()
           
 VertexElementSemantic getSemantic()
           
 int getSize()
           
 int getSource()
           
 VertexElementType getType()
           
static int getTypeCount(VertexElementType etype)
           
static int getTypeSize(VertexElementType etype)
           
static VertexElementType multiplyTypeCount(VertexElementType baseType, int count)
          Simple converter function which will turn a single-value type into a multi-value type based on a parameter.
 boolean operatorEqual(IVertexElement rhs)
           
 
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

VertexElement

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


VertexElement

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


VertexElement

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

See Also:
WithoutNativeObject, INativeObject.disconnectFromNativeObject()

VertexElement

public VertexElement(int source,
                     int offset,
                     VertexElementType theType,
                     VertexElementSemantic semantic,
                     int index)
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

getSource

public int getSource()
Specified by:
getSource in interface IVertexElement

getOffset

public int getOffset()
Specified by:
getOffset in interface IVertexElement

getType

public VertexElementType getType()
Specified by:
getType in interface IVertexElement

getSemantic

public VertexElementSemantic getSemantic()
Specified by:
getSemantic in interface IVertexElement

getIndex

public int getIndex()
Specified by:
getIndex in interface IVertexElement

getSize

public int getSize()
Specified by:
getSize in interface IVertexElement

operatorEqual

public boolean operatorEqual(IVertexElement rhs)
Specified by:
operatorEqual in interface IVertexElement

baseVertexPointerToElement_a

public void baseVertexPointerToElement_a(VoidPointer pBase,
                                         NativeObjectPointer<VoidPointer> pElem)
Adjusts a pointer to the base of a vertex to point at this element.

Specified by:
baseVertexPointerToElement_a in interface IVertexElement

baseVertexPointerToElement_b

public void baseVertexPointerToElement_b(VoidPointer pBase,
                                         NativeObjectPointer<FloatPointer> pElem)
Adjusts a pointer to the base of a vertex to point at this element.

Specified by:
baseVertexPointerToElement_b in interface IVertexElement

baseVertexPointerToElement_c

public void baseVertexPointerToElement_c(VoidPointer pBase,
                                         NativeObjectPointer<LongPointer> pElem)
Adjusts a pointer to the base of a vertex to point at this element.

Specified by:
baseVertexPointerToElement_c in interface IVertexElement

baseVertexPointerToElement_d

public void baseVertexPointerToElement_d(VoidPointer pBase,
                                         NativeObjectPointer<ShortPointer> pElem)
Adjusts a pointer to the base of a vertex to point at this element.

Specified by:
baseVertexPointerToElement_d in interface IVertexElement

baseVertexPointerToElement_e

public void baseVertexPointerToElement_e(VoidPointer pBase,
                                         NativeObjectPointer<IntegerPointer> pElem)
Adjusts a pointer to the base of a vertex to point at this element.

Specified by:
baseVertexPointerToElement_e in interface IVertexElement

getTypeSize

public static int getTypeSize(VertexElementType etype)

getTypeCount

public static int getTypeCount(VertexElementType etype)

multiplyTypeCount

public static VertexElementType multiplyTypeCount(VertexElementType baseType,
                                                  int count)
Simple converter function which will turn a single-value type into a multi-value type based on a parameter.


getBaseType

public static VertexElementType getBaseType(VertexElementType multiType)
Simple converter function which will a type into it's single-value equivalent - makes switches on type easier.


convertColourValue

public static void convertColourValue(VertexElementType srcType,
                                      VertexElementType dstType,
                                      LongPointer ptr)
Utility method for converting colour from one packed 32-bit colour type to another.


convertColourValue

public static long convertColourValue(IColourValue src,
                                      VertexElementType dst)
Utility method for converting colour to a packed 32-bit colour type.


getBestColourVertexElementType

public static VertexElementType getBestColourVertexElementType()
Utility method to get the most appropriate packed colour vertex element format.



Copyright © 2007 netAllied GmbH. All Rights Reserved.