org.ogre4j
Interface IPatchSurface

All Superinterfaces:
IAllocatedObject<IGeometryAllocPolicy>, IGeometryAllocatedObject, INativeObject
All Known Implementing Classes:
PatchSurface

public interface IPatchSurface
extends INativeObject, IGeometryAllocatedObject


Method Summary
 void build(IHardwareVertexBufferSharedPtr destVertexBuffer, int vertexStart, IHardwareIndexBufferSharedPtr destIndexBuffer, int indexStart)
          Tells the system to build the mesh relating to the surface into externally created buffers.
 void defineSurface(VoidPointer controlPointBuffer, IVertexDeclaration declaration, int width, int height, PatchSurface.PatchSurfaceType pType, int uMaxSubdivisionLevel, int vMaxSubdivisionLevel, PatchSurface.VisibleSide visibleSide)
          Sets up the surface by defining it's control points, type and initial subdivision level.
 float getBoundingSphereRadius()
          Gets the radius of the bounding sphere for this patch, only valid after defineSurface has been called.
 IAxisAlignedBox getBounds()
          Gets the bounds of this patch, only valid after calling defineSurface.
 VoidPointer getControlPointBuffer()
           
 int getCurrentIndexCount()
          Gets the current index count based on the current subdivision level.
 int getIndexOffset()
           
 int getRequiredIndexCount()
          Based on a previous call to defineSurface, establishes the number of indexes required to hold this patch at the maximum detail level.
 int getRequiredVertexCount()
          Based on a previous call to defineSurface, establishes the number of vertices required to hold this patch at the maximum detail level.
 float getSubdivisionFactor()
          Gets the current level of subdivision.
 int getVertexOffset()
           
 void notifyControlPointBufferDeallocated()
          Convenience method for telling the patch that the control points have been deleted, since once the patch has been built they are not required.
 void setSubdivisionFactor(float factor)
          Alters the level of subdivision for this surface.
 
Methods inherited from interface org.xbig.base.INativeObject
delete, disconnectFromNativeObject, getInstancePointer, setInstancePointer, setInstancePointer, setInstancePointer
 

Method Detail

defineSurface

void defineSurface(VoidPointer controlPointBuffer,
                   IVertexDeclaration declaration,
                   int width,
                   int height,
                   PatchSurface.PatchSurfaceType pType,
                   int uMaxSubdivisionLevel,
                   int vMaxSubdivisionLevel,
                   PatchSurface.VisibleSide visibleSide)
Sets up the surface by defining it's control points, type and initial subdivision level.


getRequiredVertexCount

int getRequiredVertexCount()
Based on a previous call to defineSurface, establishes the number of vertices required to hold this patch at the maximum detail level.


getRequiredIndexCount

int getRequiredIndexCount()
Based on a previous call to defineSurface, establishes the number of indexes required to hold this patch at the maximum detail level.


getCurrentIndexCount

int getCurrentIndexCount()
Gets the current index count based on the current subdivision level.


getIndexOffset

int getIndexOffset()

getVertexOffset

int getVertexOffset()

getBounds

IAxisAlignedBox getBounds()
Gets the bounds of this patch, only valid after calling defineSurface.


getBoundingSphereRadius

float getBoundingSphereRadius()
Gets the radius of the bounding sphere for this patch, only valid after defineSurface has been called.


build

void build(IHardwareVertexBufferSharedPtr destVertexBuffer,
           int vertexStart,
           IHardwareIndexBufferSharedPtr destIndexBuffer,
           int indexStart)
Tells the system to build the mesh relating to the surface into externally created buffers.


setSubdivisionFactor

void setSubdivisionFactor(float factor)
Alters the level of subdivision for this surface.


getSubdivisionFactor

float getSubdivisionFactor()
Gets the current level of subdivision.


getControlPointBuffer

VoidPointer getControlPointBuffer()

notifyControlPointBufferDeallocated

void notifyControlPointBufferDeallocated()
Convenience method for telling the patch that the control points have been deleted, since once the patch has been built they are not required.



Copyright © 2007 netAllied GmbH. All Rights Reserved.