<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_26) on Sun Jan 27 20:37:09 CET 2013 -->
<TITLE>
Mesh (libgdx API)
</TITLE>
<META NAME="date" CONTENT="2013-01-27">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Mesh (libgdx API)";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview
</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package
</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class
</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Mesh.html"><FONT CLASS="NavBarFont1"><B>Use
</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree
</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated
</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index
</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help
</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
libgdx API
<style>
body, td, th { font-family:Helvetica, Tahoma, Arial, sans-serif; font-size:10pt }
pre, code, tt { font-size:9pt; font-family:Lucida Console, Courier New, sans-serif }
h1, h2, h3, .FrameTitleFont, .FrameHeadingFont, .TableHeadingColor font { font-size:105%; font-weight:bold }
.TableHeadingColor { background:#EEEEFF; }
a { text-decoration:none }
a:hover { text-decoration:underline }
a:link, a:visited { color:blue }
table { border:0px }
.TableRowColor td:first-child { border-left:1px solid black }
.TableRowColor td { border:0px; border-bottom:1px solid black; border-right:1px solid black }
hr { border:0px; border-bottom:1px solid #333366; }
</style>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../com/badlogic/gdx/graphics/GLU.html" title="interface in com.badlogic.gdx.graphics"><B>PREV CLASS
</B></A>
<A HREF="../../../../com/badlogic/gdx/graphics/Mesh.VertexDataType.html" title="enum in com.badlogic.gdx.graphics"><B>NEXT CLASS
</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?com/badlogic/gdx/graphics/Mesh.html" target="_top"><B>FRAMES
</B></A>
<A HREF="Mesh.html" target="_top"><B>NO FRAMES
</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../allclasses-noframe.html"><B>All Classes
</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:
<A HREF="#nested_class_summary">NESTED
</A> |
<A HREF="#field_summary">FIELD
</A> |
<A HREF="#constructor_summary">CONSTR
</A> |
<A HREF="#method_summary">METHOD
</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:
<A HREF="#field_detail">FIELD
</A> |
<A HREF="#constructor_detail">CONSTR
</A> |
<A HREF="#method_detail">METHOD
</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
com.badlogic.gdx.graphics
</FONT>
<BR>
Class Mesh
</H2>
<PRE>
java.lang.Object
<IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>com.badlogic.gdx.graphics.Mesh
</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:
</B> <DD><A HREF="../../../../com/badlogic/gdx/utils/Disposable.html" title="interface in com.badlogic.gdx.utils">Disposable
</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public class
<B>Mesh
</B><DT>extends java.lang.Object
<DT>implements
<A HREF="../../../../com/badlogic/gdx/utils/Disposable.html" title="interface in com.badlogic.gdx.utils">Disposable
</A></DL>
</PRE>
<P>
<p>
A Mesh holds vertices composed of attributes specified by a
<A HREF="../../../../com/badlogic/gdx/graphics/VertexAttributes.html" title="class in com.badlogic.gdx.graphics"><CODE>VertexAttributes
</CODE></A> instance. The vertices are held either in
VRAM in form of vertex buffer objects or in RAM in form of vertex arrays. The former variant is more performant and is prefered
over vertex arrays if hardware supports it.
</p>
<p>
Meshes are automatically managed. If the OpenGL context is lost all vertex buffer objects get invalidated and must be reloaded
when the context is recreated. This only happens on Android when a user switches to another application or receives an incoming
call. A managed Mesh will be reloaded automagically so you don't have to do this manually.
</p>
<p>
A Mesh consists of vertices and optionally indices which specify which vertices define a triangle. Each vertex is composed of
attributes such as position, normal, color or texture coordinate. Note that not all of this attributes must be given, except
for position which is non-optional. Each attribute has an alias which is used when rendering a Mesh in OpenGL ES 2.0. The alias
is used to bind a specific vertex attribute to a shader attribute. The shader source and the alias of the attribute must match
exactly for this to work. For OpenGL ES 1.x rendering this aliases are irrelevant.
</p>
<p>
Meshes can be used with either OpenGL ES 1.x or OpenGL ES 2.0.
</p>
<P>
<P>
<DL>
<DT><B>Author:
</B></DT>
<DD>mzechner, Dave Clayton
<contact@redskyforge.com></DD>
</DL>
<HR>
<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->
<A NAME="nested_class_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Nested Class Summary
</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static
class
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/graphics/Mesh.VertexDataType.html" title="enum in com.badlogic.gdx.graphics">Mesh.VertexDataType
</A></B></CODE>
<BR>
</TD>
</TR>
</TABLE>
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary
</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static
boolean
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html#forceVBO">forceVBO
</A></B></CODE>
<BR>
used for benchmarking
</TD>
</TR>
</TABLE>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary
</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html#Mesh(boolean, int, int, com.badlogic.gdx.graphics.VertexAttribute...)">Mesh
</A></B>(boolean
isStatic,
int
maxVertices,
int
maxIndices,
<A HREF="../../../../com/badlogic/gdx/graphics/VertexAttribute.html" title="class in com.badlogic.gdx.graphics">VertexAttribute
</A>...
attributes)
</CODE>
<BR>
Creates a new Mesh with the given attributes.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html#Mesh(boolean, int, int, com.badlogic.gdx.graphics.VertexAttributes)">Mesh
</A></B>(boolean
isStatic,
int
maxVertices,
int
maxIndices,
<A HREF="../../../../com/badlogic/gdx/graphics/VertexAttributes.html" title="class in com.badlogic.gdx.graphics">VertexAttributes
</A> attributes)
</CODE>
<BR>
Creates a new Mesh with the given attributes.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html#Mesh(com.badlogic.gdx.graphics.Mesh.VertexDataType, boolean, int, int, com.badlogic.gdx.graphics.VertexAttribute...)">Mesh
</A></B>(
<A HREF="../../../../com/badlogic/gdx/graphics/Mesh.VertexDataType.html" title="enum in com.badlogic.gdx.graphics">Mesh.VertexDataType
</A> type,
boolean
isStatic,
int
maxVertices,
int
maxIndices,
<A HREF="../../../../com/badlogic/gdx/graphics/VertexAttribute.html" title="class in com.badlogic.gdx.graphics">VertexAttribute
</A>...
attributes)
</CODE>
<BR>
Creates a new Mesh with the given attributes.
</TD>
</TR>
</TABLE>
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary
</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html#bind()">bind
</A></B>()
</CODE>
<BR>
Binds the underlying
<A HREF="../../../../com/badlogic/gdx/graphics/glutils/VertexArray.html" title="class in com.badlogic.gdx.graphics.glutils"><CODE>VertexArray
</CODE></A>/
<A HREF="../../../../com/badlogic/gdx/graphics/glutils/VertexBufferObject.html" title="class in com.badlogic.gdx.graphics.glutils"><CODE>VertexBufferObject
</CODE></A> and
<A HREF="../../../../com/badlogic/gdx/graphics/glutils/IndexBufferObject.html" title="class in com.badlogic.gdx.graphics.glutils"><CODE>IndexBufferObject
</CODE></A> if indices were given.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html#bind(com.badlogic.gdx.graphics.glutils.ShaderProgram)">bind
</A></B>(
<A HREF="../../../../com/badlogic/gdx/graphics/glutils/ShaderProgram.html" title="class in com.badlogic.gdx.graphics.glutils">ShaderProgram
</A> shader)
</CODE>
<BR>
Binds the underlying
<A HREF="../../../../com/badlogic/gdx/graphics/glutils/VertexBufferObject.html" title="class in com.badlogic.gdx.graphics.glutils"><CODE>VertexBufferObject
</CODE></A> and
<A HREF="../../../../com/badlogic/gdx/graphics/glutils/IndexBufferObject.html" title="class in com.badlogic.gdx.graphics.glutils"><CODE>IndexBufferObject
</CODE></A> if indices where given.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../com/badlogic/gdx/math/collision/BoundingBox.html" title="class in com.badlogic.gdx.math.collision">BoundingBox
</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html#calculateBoundingBox()">calculateBoundingBox
</A></B>()
</CODE>
<BR>
Calculates the
<A HREF="../../../../com/badlogic/gdx/math/collision/BoundingBox.html" title="class in com.badlogic.gdx.math.collision"><CODE>BoundingBox
</CODE></A> of the vertices contained in this mesh.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html#calculateBoundingBox(com.badlogic.gdx.math.collision.BoundingBox)">calculateBoundingBox
</A></B>(
<A HREF="../../../../com/badlogic/gdx/math/collision/BoundingBox.html" title="class in com.badlogic.gdx.math.collision">BoundingBox
</A> bbox)
</CODE>
<BR>
Calculates the
<A HREF="../../../../com/badlogic/gdx/math/collision/BoundingBox.html" title="class in com.badlogic.gdx.math.collision"><CODE>BoundingBox
</CODE></A> of the vertices contained in this mesh.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static
void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html#clearAllMeshes(com.badlogic.gdx.Application)">clearAllMeshes
</A></B>(
<A HREF="../../../../com/badlogic/gdx/Application.html" title="interface in com.badlogic.gdx">Application
</A> app)
</CODE>
<BR>
Will clear the managed mesh cache.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html" title="class in com.badlogic.gdx.graphics">Mesh
</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html#copy(boolean)">copy
</A></B>(boolean
isStatic)
</CODE>
<BR>
Copies this mesh.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html" title="class in com.badlogic.gdx.graphics">Mesh
</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html#copy(boolean, boolean, int[])">copy
</A></B>(boolean
isStatic,
boolean
removeDuplicates,
int[]
usage)
</CODE>
<BR>
Copies this mesh optionally removing duplicate vertices and/or reducing the amount of attributes.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static
<A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html" title="class in com.badlogic.gdx.graphics">Mesh
</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html#create(boolean, com.badlogic.gdx.graphics.Mesh[])">create
</A></B>(boolean
isStatic,
<A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html" title="class in com.badlogic.gdx.graphics">Mesh
</A>[]
meshes)
</CODE>
<BR>
Create a new Mesh that is a combination of the supplied meshes.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static
<A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html" title="class in com.badlogic.gdx.graphics">Mesh
</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html#create(boolean, com.badlogic.gdx.graphics.Mesh[], com.badlogic.gdx.math.Matrix4[])">create
</A></B>(boolean
isStatic,
<A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html" title="class in com.badlogic.gdx.graphics">Mesh
</A>[]
meshes,
<A HREF="../../../../com/badlogic/gdx/math/Matrix4.html" title="class in com.badlogic.gdx.math">Matrix4
</A>[]
transformations)
</CODE>
<BR>
Create a new Mesh that is a combination of the supplied meshes.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static
<A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html" title="class in com.badlogic.gdx.graphics">Mesh
</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html#create(boolean, com.badlogic.gdx.graphics.Mesh, com.badlogic.gdx.math.Matrix4[])">create
</A></B>(boolean
isStatic,
<A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html" title="class in com.badlogic.gdx.graphics">Mesh
</A> base,
<A HREF="../../../../com/badlogic/gdx/math/Matrix4.html" title="class in com.badlogic.gdx.math">Matrix4
</A>[]
transformations)
</CODE>
<BR>
Create a new Mesh that is a combination of transformations of the supplied base mesh.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html#dispose()">dispose
</A></B>()
</CODE>
<BR>
Frees all resources associated with this Mesh
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html#getIndices(short[])">getIndices
</A></B>(short[]
indices)
</CODE>
<BR>
Copies the indices from the Mesh to the short array.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html#getIndices(short[], int)">getIndices
</A></B>(short[]
indices,
int
destOffset)
</CODE>
<BR>
Copies the indices from the Mesh to the short array.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.nio.ShortBuffer
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html#getIndicesBuffer()">getIndicesBuffer
</A></B>()
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static
java.lang.String
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html#getManagedStatus()">getManagedStatus
</A></B>()
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html#getMaxIndices()">getMaxIndices
</A></B>()
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html#getMaxVertices()">getMaxVertices
</A></B>()
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html#getNumIndices()">getNumIndices
</A></B>()
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html#getNumVertices()">getNumVertices
</A></B>()
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../com/badlogic/gdx/graphics/VertexAttribute.html" title="class in com.badlogic.gdx.graphics">VertexAttribute
</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html#getVertexAttribute(int)">getVertexAttribute
</A></B>(int
usage)
</CODE>
<BR>
Returns the first
<A HREF="../../../../com/badlogic/gdx/graphics/VertexAttribute.html" title="class in com.badlogic.gdx.graphics"><CODE>VertexAttribute
</CODE></A> having the given
<A HREF="../../../../com/badlogic/gdx/graphics/VertexAttributes.Usage.html" title="class in com.badlogic.gdx.graphics"><CODE>VertexAttributes.Usage
</CODE></A>.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../com/badlogic/gdx/graphics/VertexAttributes.html" title="class in com.badlogic.gdx.graphics">VertexAttributes
</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html#getVertexAttributes()">getVertexAttributes
</A></B>()
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html#getVertexSize()">getVertexSize
</A></B>()
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html#getVertices(float[])">getVertices
</A></B>(float[]
vertices)
</CODE>
<BR>
Copies the vertices from the Mesh to the float array.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html#getVertices(int, float[])">getVertices
</A></B>(int
srcOffset,
float[]
vertices)
</CODE>
<BR>
Copies the the remaining vertices from the Mesh to the float array.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html#getVertices(int, int, float[])">getVertices
</A></B>(int
srcOffset,
int
count,
float[]
vertices)
</CODE>
<BR>
Copies the specified vertices from the Mesh to the float array.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html#getVertices(int, int, float[], int)">getVertices
</A></B>(int
srcOffset,
int
count,
float[]
vertices,
int
destOffset)
</CODE>
<BR>
Copies the specified vertices from the Mesh to the float array.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.nio.FloatBuffer
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html#getVerticesBuffer()">getVerticesBuffer
</A></B>()
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static
void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html#invalidateAllMeshes(com.badlogic.gdx.Application)">invalidateAllMeshes
</A></B>(
<A HREF="../../../../com/badlogic/gdx/Application.html" title="interface in com.badlogic.gdx">Application
</A> app)
</CODE>
<BR>
Invalidates all meshes so the next time they are rendered new VBO handles are generated.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html#render(int)">render
</A></B>(int
primitiveType)
</CODE>
<BR>
Renders the mesh using the given primitive type.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html#render(int, int, int)">render
</A></B>(int
primitiveType,
int
offset,
int
count)
</CODE>
<BR>
Renders the mesh using the given primitive type.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html#render(com.badlogic.gdx.graphics.glutils.ShaderProgram, int)">render
</A></B>(
<A HREF="../../../../com/badlogic/gdx/graphics/glutils/ShaderProgram.html" title="class in com.badlogic.gdx.graphics.glutils">ShaderProgram
</A> shader,
int
primitiveType)
</CODE>
<BR>
Renders the mesh using the given primitive type.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html#render(com.badlogic.gdx.graphics.glutils.ShaderProgram, int, int, int)">render
</A></B>(
<A HREF="../../../../com/badlogic/gdx/graphics/glutils/ShaderProgram.html" title="class in com.badlogic.gdx.graphics.glutils">ShaderProgram
</A> shader,
int
primitiveType,
int
offset,
int
count)
</CODE>
<BR>
Renders the mesh using the given primitive type.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html#scale(float, float, float)">scale
</A></B>(float
scaleX,
float
scaleY,
float
scaleZ)
</CODE>
<BR>
Method to scale the positions in the mesh.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html#setAutoBind(boolean)">setAutoBind
</A></B>(boolean
autoBind)
</CODE>
<BR>
Sets whether to bind the underlying
<A HREF="../../../../com/badlogic/gdx/graphics/glutils/VertexArray.html" title="class in com.badlogic.gdx.graphics.glutils"><CODE>VertexArray
</CODE></A> or
<A HREF="../../../../com/badlogic/gdx/graphics/glutils/VertexBufferObject.html" title="class in com.badlogic.gdx.graphics.glutils"><CODE>VertexBufferObject
</CODE></A> automatically on a call to one of the
<A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html#render(int)"><CODE>render(int)
</CODE></A> methods or not.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html#setIndices(short[])">setIndices
</A></B>(short[]
indices)
</CODE>
<BR>
Sets the indices of this Mesh
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html#setIndices(short[], int, int)">setIndices
</A></B>(short[]
indices,
int
offset,
int
count)
</CODE>
<BR>
Sets the indices of this Mesh.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html#setVertices(float[])">setVertices
</A></B>(float[]
vertices)
</CODE>
<BR>
Sets the vertices of this Mesh.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html#setVertices(float[], int, int)">setVertices
</A></B>(float[]
vertices,
int
offset,
int
count)
</CODE>
<BR>
Sets the vertices of this Mesh.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html#transform(com.badlogic.gdx.math.Matrix4)">transform
</A></B>(
<A HREF="../../../../com/badlogic/gdx/math/Matrix4.html" title="class in com.badlogic.gdx.math">Matrix4
</A> matrix)
</CODE>
<BR>
Method to transform the positions in the mesh.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static
void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html#transform(com.badlogic.gdx.math.Matrix4, float[], int, int, int, int, int)">transform
</A></B>(
<A HREF="../../../../com/badlogic/gdx/math/Matrix4.html" title="class in com.badlogic.gdx.math">Matrix4
</A> matrix,
float[]
vertices,
int
vertexSize,
int
offset,
int
dimensions,
int
start,
int
count)
</CODE>
<BR>
Method to transform the positions in the float array.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected
void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html#transform(com.badlogic.gdx.math.Matrix4, int, int)">transform
</A></B>(
<A HREF="../../../../com/badlogic/gdx/math/Matrix4.html" title="class in com.badlogic.gdx.math">Matrix4
</A> matrix,
int
start,
int
count)
</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html#unbind()">unbind
</A></B>()
</CODE>
<BR>
Unbinds the underlying
<A HREF="../../../../com/badlogic/gdx/graphics/glutils/VertexArray.html" title="class in com.badlogic.gdx.graphics.glutils"><CODE>VertexArray
</CODE></A>/
<A HREF="../../../../com/badlogic/gdx/graphics/glutils/VertexBufferObject.html" title="class in com.badlogic.gdx.graphics.glutils"><CODE>VertexBufferObject
</CODE></A> and
<A HREF="../../../../com/badlogic/gdx/graphics/glutils/IndexBufferObject.html" title="class in com.badlogic.gdx.graphics.glutils"><CODE>IndexBufferObject
</CODE></A> is indices were given.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html#unbind(com.badlogic.gdx.graphics.glutils.ShaderProgram)">unbind
</A></B>(
<A HREF="../../../../com/badlogic/gdx/graphics/glutils/ShaderProgram.html" title="class in com.badlogic.gdx.graphics.glutils">ShaderProgram
</A> shader)
</CODE>
<BR>
Unbinds the underlying
<A HREF="../../../../com/badlogic/gdx/graphics/glutils/VertexBufferObject.html" title="class in com.badlogic.gdx.graphics.glutils"><CODE>VertexBufferObject
</CODE></A> and
<A HREF="../../../../com/badlogic/gdx/graphics/glutils/IndexBufferObject.html" title="class in com.badlogic.gdx.graphics.glutils"><CODE>IndexBufferObject
</CODE></A> is indices were given.
</TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object
</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
</CODE></TD>
</TR>
</TABLE>
<P>
<!-- ============ FIELD DETAIL =========== -->
<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Field Detail
</B></FONT></TH>
</TR>
</TABLE>
<A NAME="forceVBO"><!-- --></A><H3>
forceVBO
</H3>
<PRE>
public static boolean
<B>forceVBO
</B></PRE>
<DL>
<DD>used for benchmarking
<P>
<DL>
</DL>
</DL>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail
</B></FONT></TH>
</TR>
</TABLE>
<A NAME="Mesh(boolean, int, int, com.badlogic.gdx.graphics.VertexAttribute...)"><!-- --></A><H3>
Mesh
</H3>
<PRE>
public
<B>Mesh
</B>(boolean
isStatic,
int
maxVertices,
int
maxIndices,
<A HREF="../../../../com/badlogic/gdx/graphics/VertexAttribute.html" title="class in com.badlogic.gdx.graphics">VertexAttribute
</A>...
attributes)
</PRE>
<DL>
<DD>Creates a new Mesh with the given attributes.
<P>
<DL>
<DT><B>Parameters:
</B><DD><CODE>isStatic
</CODE> - whether this mesh is static or not. Allows for internal optimizations.
<DD><CODE>maxVertices
</CODE> - the maximum number of vertices this mesh can hold
<DD><CODE>maxIndices
</CODE> - the maximum number of indices this mesh can hold
<DD><CODE>attributes
</CODE> - the
<A HREF="../../../../com/badlogic/gdx/graphics/VertexAttribute.html" title="class in com.badlogic.gdx.graphics"><CODE>VertexAttribute
</CODE></A>s. Each vertex attribute defines one property of a vertex such as position,
normal or texture coordinate
</DL>
</DL>
<HR>
<A NAME="Mesh(boolean, int, int, com.badlogic.gdx.graphics.VertexAttributes)"><!-- --></A><H3>
Mesh
</H3>
<PRE>
public
<B>Mesh
</B>(boolean
isStatic,
int
maxVertices,
int
maxIndices,
<A HREF="../../../../com/badlogic/gdx/graphics/VertexAttributes.html" title="class in com.badlogic.gdx.graphics">VertexAttributes
</A> attributes)
</PRE>
<DL>
<DD>Creates a new Mesh with the given attributes.
<P>
<DL>
<DT><B>Parameters:
</B><DD><CODE>isStatic
</CODE> - whether this mesh is static or not. Allows for internal optimizations.
<DD><CODE>maxVertices
</CODE> - the maximum number of vertices this mesh can hold
<DD><CODE>maxIndices
</CODE> - the maximum number of indices this mesh can hold
<DD><CODE>attributes
</CODE> - the
<A HREF="../../../../com/badlogic/gdx/graphics/VertexAttributes.html" title="class in com.badlogic.gdx.graphics"><CODE>VertexAttributes
</CODE></A>. Each vertex attribute defines one property of a vertex such as position,
normal or texture coordinate
</DL>
</DL>
<HR>
<A NAME="Mesh(com.badlogic.gdx.graphics.Mesh.VertexDataType, boolean, int, int, com.badlogic.gdx.graphics.VertexAttribute...)"><!-- --></A><H3>
Mesh
</H3>
<PRE>
public
<B>Mesh
</B>(
<A HREF="../../../../com/badlogic/gdx/graphics/Mesh.VertexDataType.html" title="enum in com.badlogic.gdx.graphics">Mesh.VertexDataType
</A> type,
boolean
isStatic,
int
maxVertices,
int
maxIndices,
<A HREF="../../../../com/badlogic/gdx/graphics/VertexAttribute.html" title="class in com.badlogic.gdx.graphics">VertexAttribute
</A>...
attributes)
</PRE>
<DL>
<DD>Creates a new Mesh with the given attributes. This is an expert method with no error checking. Use at your own risk.
<P>
<DL>
<DT><B>Parameters:
</B><DD><CODE>type
</CODE> - the
<A HREF="../../../../com/badlogic/gdx/graphics/Mesh.VertexDataType.html" title="enum in com.badlogic.gdx.graphics"><CODE>Mesh.VertexDataType
</CODE></A> to be used, VBO or VA.
<DD><CODE>isStatic
</CODE> - whether this mesh is static or not. Allows for internal optimizations.
<DD><CODE>maxVertices
</CODE> - the maximum number of vertices this mesh can hold
<DD><CODE>maxIndices
</CODE> - the maximum number of indices this mesh can hold
<DD><CODE>attributes
</CODE> - the
<A HREF="../../../../com/badlogic/gdx/graphics/VertexAttribute.html" title="class in com.badlogic.gdx.graphics"><CODE>VertexAttribute
</CODE></A>s. Each vertex attribute defines one property of a vertex such as position,
normal or texture coordinate
</DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail
</B></FONT></TH>
</TR>
</TABLE>
<A NAME="create(boolean, com.badlogic.gdx.graphics.Mesh, com.badlogic.gdx.math.Matrix4[])"><!-- --></A><H3>
create
</H3>
<PRE>
public static
<A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html" title="class in com.badlogic.gdx.graphics">Mesh
</A> <B>create
</B>(boolean
isStatic,
<A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html" title="class in com.badlogic.gdx.graphics">Mesh
</A> base,
<A HREF="../../../../com/badlogic/gdx/math/Matrix4.html" title="class in com.badlogic.gdx.math">Matrix4
</A>[]
transformations)
</PRE>
<DL>
<DD>Create a new Mesh that is a combination of transformations of the supplied base mesh.
Not all primitive types, like line strip and triangle strip, can be combined.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>isStatic
</CODE> - whether this mesh is static or not. Allows for internal optimizations.
<DD><CODE>transformations
</CODE> - the transformations to apply to the meshes
<DT><B>Returns:
</B><DD>the combined mesh
</DL>
</DD>
</DL>
<HR>
<A NAME="create(boolean, com.badlogic.gdx.graphics.Mesh[])"><!-- --></A><H3>
create
</H3>
<PRE>
public static
<A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html" title="class in com.badlogic.gdx.graphics">Mesh
</A> <B>create
</B>(boolean
isStatic,
<A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html" title="class in com.badlogic.gdx.graphics">Mesh
</A>[]
meshes)
</PRE>
<DL>
<DD>Create a new Mesh that is a combination of the supplied meshes. The meshes must have the same VertexAttributes signature.
Not all primitive types, like line strip and triangle strip, can be combined.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>isStatic
</CODE> - whether this mesh is static or not. Allows for internal optimizations.
<DD><CODE>meshes
</CODE> - the meshes to combine
<DT><B>Returns:
</B><DD>the combined mesh
</DL>
</DD>
</DL>
<HR>
<A NAME="create(boolean, com.badlogic.gdx.graphics.Mesh[], com.badlogic.gdx.math.Matrix4[])"><!-- --></A><H3>
create
</H3>
<PRE>
public static
<A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html" title="class in com.badlogic.gdx.graphics">Mesh
</A> <B>create
</B>(boolean
isStatic,
<A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html" title="class in com.badlogic.gdx.graphics">Mesh
</A>[]
meshes,
<A HREF="../../../../com/badlogic/gdx/math/Matrix4.html" title="class in com.badlogic.gdx.math">Matrix4
</A>[]
transformations)
</PRE>
<DL>
<DD>Create a new Mesh that is a combination of the supplied meshes. The meshes must have the same VertexAttributes signature.
If transformations is supplied, it must have the same length as meshes.
Not all primitive types, like line strip and triangle strip, can be combined.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>isStatic
</CODE> - whether this mesh is static or not. Allows for internal optimizations.
<DD><CODE>meshes
</CODE> - the meshes to combine
<DD><CODE>transformations
</CODE> - the transformations to apply to the meshes
<DT><B>Returns:
</B><DD>the combined mesh
</DL>
</DD>
</DL>
<HR>
<A NAME="setVertices(float[])"><!-- --></A><H3>
setVertices
</H3>
<PRE>
public void
<B>setVertices
</B>(float[]
vertices)
</PRE>
<DL>
<DD>Sets the vertices of this Mesh. The attributes are assumed to be given in float format. If this mesh is configured to use
fixed point an IllegalArgumentException will be thrown.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>vertices
</CODE> - the vertices.
</DL>
</DD>
</DL>
<HR>
<A NAME="setVertices(float[], int, int)"><!-- --></A><H3>
setVertices
</H3>
<PRE>
public void
<B>setVertices
</B>(float[]
vertices,
int
offset,
int
count)
</PRE>
<DL>
<DD>Sets the vertices of this Mesh. The attributes are assumed to be given in float format. If this mesh is configured to use
fixed point an IllegalArgumentException will be thrown.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>vertices
</CODE> - the vertices.
<DD><CODE>offset
</CODE> - the offset into the vertices array
<DD><CODE>count
</CODE> - the number of floats to use
</DL>
</DD>
</DL>
<HR>
<A NAME="getVertices(float[])"><!-- --></A><H3>
getVertices
</H3>
<PRE>
public void
<B>getVertices
</B>(float[]
vertices)
</PRE>
<DL>
<DD>Copies the vertices from the Mesh to the float array. The float array must be large enough to hold all the Mesh's vertices.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>vertices
</CODE> - the array to copy the vertices to
</DL>
</DD>
</DL>
<HR>
<A NAME="getVertices(int, float[])"><!-- --></A><H3>
getVertices
</H3>
<PRE>
public void
<B>getVertices
</B>(int
srcOffset,
float[]
vertices)
</PRE>
<DL>
<DD>Copies the the remaining vertices from the Mesh to the float array. The float array must be large enough to hold the remaining vertices.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>srcOffset
</CODE> - the offset (in number of floats) of the vertices in the mesh to copy
<DD><CODE>vertices
</CODE> - the array to copy the vertices to
</DL>
</DD>
</DL>
<HR>
<A NAME="getVertices(int, int, float[])"><!-- --></A><H3>
getVertices
</H3>
<PRE>
public void
<B>getVertices
</B>(int
srcOffset,
int
count,
float[]
vertices)
</PRE>
<DL>
<DD>Copies the specified vertices from the Mesh to the float array. The float array must be large enough to hold count vertices.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>srcOffset
</CODE> - the offset (in number of floats) of the vertices in the mesh to copy
<DD><CODE>count
</CODE> - the amount of floats to copy
<DD><CODE>vertices
</CODE> - the array to copy the vertices to
</DL>
</DD>
</DL>
<HR>
<A NAME="getVertices(int, int, float[], int)"><!-- --></A><H3>
getVertices
</H3>
<PRE>
public void
<B>getVertices
</B>(int
srcOffset,
int
count,
float[]
vertices,
int
destOffset)
</PRE>
<DL>
<DD>Copies the specified vertices from the Mesh to the float array. The float array must be large enough to hold destOffset+count vertices.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>srcOffset
</CODE> - the offset (in number of floats) of the vertices in the mesh to copy
<DD><CODE>count
</CODE> - the amount of floats to copy
<DD><CODE>vertices
</CODE> - the array to copy the vertices to
<DD><CODE>destOffset
</CODE> - the offset (in floats) in the vertices array to start copying
</DL>
</DD>
</DL>
<HR>
<A NAME="setIndices(short[])"><!-- --></A><H3>
setIndices
</H3>
<PRE>
public void
<B>setIndices
</B>(short[]
indices)
</PRE>
<DL>
<DD>Sets the indices of this Mesh
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>indices
</CODE> - the indices
</DL>
</DD>
</DL>
<HR>
<A NAME="setIndices(short[], int, int)"><!-- --></A><H3>
setIndices
</H3>
<PRE>
public void
<B>setIndices
</B>(short[]
indices,
int
offset,
int
count)
</PRE>
<DL>
<DD>Sets the indices of this Mesh.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>indices
</CODE> - the indices
<DD><CODE>offset
</CODE> - the offset into the indices array
<DD><CODE>count
</CODE> - the number of indices to copy
</DL>
</DD>
</DL>
<HR>
<A NAME="getIndices(short[])"><!-- --></A><H3>
getIndices
</H3>
<PRE>
public void
<B>getIndices
</B>(short[]
indices)
</PRE>
<DL>
<DD>Copies the indices from the Mesh to the short array. The short array must be large enough to hold all the Mesh's indices.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>indices
</CODE> - the array to copy the indices to
</DL>
</DD>
</DL>
<HR>
<A NAME="getIndices(short[], int)"><!-- --></A><H3>
getIndices
</H3>
<PRE>
public void
<B>getIndices
</B>(short[]
indices,
int
destOffset)
</PRE>
<DL>
<DD>Copies the indices from the Mesh to the short array. The short array must be large enough to hold destOffset + all the Mesh's indices.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>indices
</CODE> - the array to copy the indices to
<DD><CODE>destOffset
</CODE> - the offset in the indices array to start copying
</DL>
</DD>
</DL>
<HR>
<A NAME="getNumIndices()"><!-- --></A><H3>
getNumIndices
</H3>
<PRE>
public int
<B>getNumIndices
</B>()
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:
</B><DD>the number of defined indices
</DL>
</DD>
</DL>
<HR>
<A NAME="getNumVertices()"><!-- --></A><H3>
getNumVertices
</H3>
<PRE>
public int
<B>getNumVertices
</B>()
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:
</B><DD>the number of defined vertices
</DL>
</DD>
</DL>
<HR>
<A NAME="getMaxVertices()"><!-- --></A><H3>
getMaxVertices
</H3>
<PRE>
public int
<B>getMaxVertices
</B>()
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:
</B><DD>the maximum number of vertices this mesh can hold
</DL>
</DD>
</DL>
<HR>
<A NAME="getMaxIndices()"><!-- --></A><H3>
getMaxIndices
</H3>
<PRE>
public int
<B>getMaxIndices
</B>()
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:
</B><DD>the maximum number of indices this mesh can hold
</DL>
</DD>
</DL>
<HR>
<A NAME="getVertexSize()"><!-- --></A><H3>
getVertexSize
</H3>
<PRE>
public int
<B>getVertexSize
</B>()
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:
</B><DD>the size of a single vertex in bytes
</DL>
</DD>
</DL>
<HR>
<A NAME="setAutoBind(boolean)"><!-- --></A><H3>
setAutoBind
</H3>
<PRE>
public void
<B>setAutoBind
</B>(boolean
autoBind)
</PRE>
<DL>
<DD>Sets whether to bind the underlying
<A HREF="../../../../com/badlogic/gdx/graphics/glutils/VertexArray.html" title="class in com.badlogic.gdx.graphics.glutils"><CODE>VertexArray
</CODE></A> or
<A HREF="../../../../com/badlogic/gdx/graphics/glutils/VertexBufferObject.html" title="class in com.badlogic.gdx.graphics.glutils"><CODE>VertexBufferObject
</CODE></A> automatically on a call to one of the
<A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html#render(int)"><CODE>render(int)
</CODE></A> methods or not. Usually you want to use autobind. Manual binding is an expert functionality. There is a
driver bug on the MSM720xa chips that will fuck up memory if you manipulate the vertices and indices of a Mesh multiple
times while it is bound. Keep this in mind.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>autoBind
</CODE> - whether to autobind meshes.
</DL>
</DD>
</DL>
<HR>
<A NAME="bind()"><!-- --></A><H3>
bind
</H3>
<PRE>
public void
<B>bind
</B>()
</PRE>
<DL>
<DD>Binds the underlying
<A HREF="../../../../com/badlogic/gdx/graphics/glutils/VertexArray.html" title="class in com.badlogic.gdx.graphics.glutils"><CODE>VertexArray
</CODE></A>/
<A HREF="../../../../com/badlogic/gdx/graphics/glutils/VertexBufferObject.html" title="class in com.badlogic.gdx.graphics.glutils"><CODE>VertexBufferObject
</CODE></A> and
<A HREF="../../../../com/badlogic/gdx/graphics/glutils/IndexBufferObject.html" title="class in com.badlogic.gdx.graphics.glutils"><CODE>IndexBufferObject
</CODE></A> if indices were given. Use
this with OpenGL ES 1.x and when auto-bind is disabled.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="unbind()"><!-- --></A><H3>
unbind
</H3>
<PRE>
public void
<B>unbind
</B>()
</PRE>
<DL>
<DD>Unbinds the underlying
<A HREF="../../../../com/badlogic/gdx/graphics/glutils/VertexArray.html" title="class in com.badlogic.gdx.graphics.glutils"><CODE>VertexArray
</CODE></A>/
<A HREF="../../../../com/badlogic/gdx/graphics/glutils/VertexBufferObject.html" title="class in com.badlogic.gdx.graphics.glutils"><CODE>VertexBufferObject
</CODE></A> and
<A HREF="../../../../com/badlogic/gdx/graphics/glutils/IndexBufferObject.html" title="class in com.badlogic.gdx.graphics.glutils"><CODE>IndexBufferObject
</CODE></A> is indices were given.
Use this with OpenGL ES 1.x and when auto-bind is disabled.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="bind(com.badlogic.gdx.graphics.glutils.ShaderProgram)"><!-- --></A><H3>
bind
</H3>
<PRE>
public void
<B>bind
</B>(
<A HREF="../../../../com/badlogic/gdx/graphics/glutils/ShaderProgram.html" title="class in com.badlogic.gdx.graphics.glutils">ShaderProgram
</A> shader)
</PRE>
<DL>
<DD>Binds the underlying
<A HREF="../../../../com/badlogic/gdx/graphics/glutils/VertexBufferObject.html" title="class in com.badlogic.gdx.graphics.glutils"><CODE>VertexBufferObject
</CODE></A> and
<A HREF="../../../../com/badlogic/gdx/graphics/glutils/IndexBufferObject.html" title="class in com.badlogic.gdx.graphics.glutils"><CODE>IndexBufferObject
</CODE></A> if indices where given. Use this with OpenGL
ES 2.0 and when auto-bind is disabled.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>shader
</CODE> - the shader (does not bind the shader)
</DL>
</DD>
</DL>
<HR>
<A NAME="unbind(com.badlogic.gdx.graphics.glutils.ShaderProgram)"><!-- --></A><H3>
unbind
</H3>
<PRE>
public void
<B>unbind
</B>(
<A HREF="../../../../com/badlogic/gdx/graphics/glutils/ShaderProgram.html" title="class in com.badlogic.gdx.graphics.glutils">ShaderProgram
</A> shader)
</PRE>
<DL>
<DD>Unbinds the underlying
<A HREF="../../../../com/badlogic/gdx/graphics/glutils/VertexBufferObject.html" title="class in com.badlogic.gdx.graphics.glutils"><CODE>VertexBufferObject
</CODE></A> and
<A HREF="../../../../com/badlogic/gdx/graphics/glutils/IndexBufferObject.html" title="class in com.badlogic.gdx.graphics.glutils"><CODE>IndexBufferObject
</CODE></A> is indices were given. Use this with OpenGL
ES 1.x and when auto-bind is disabled.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>shader
</CODE> - the shader (does not unbind the shader)
</DL>
</DD>
</DL>
<HR>
<A NAME="render(int)"><!-- --></A><H3>
render
</H3>
<PRE>
public void
<B>render
</B>(int
primitiveType)
</PRE>
<DL>
<DD><p>
Renders the mesh using the given primitive type. If indices are set for this mesh then getNumIndices() / #vertices per
primitive primitives are rendered. If no indices are set then getNumVertices() / #vertices per primitive are rendered.
</p>
<p>
This method is intended for use with OpenGL ES 1.x and will throw an IllegalStateException when OpenGL ES 2.0 is used.
</p>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>primitiveType
</CODE> - the primitive type
</DL>
</DD>
</DL>
<HR>
<A NAME="render(int, int, int)"><!-- --></A><H3>
render
</H3>
<PRE>
public void
<B>render
</B>(int
primitiveType,
int
offset,
int
count)
</PRE>
<DL>
<DD><p>
Renders the mesh using the given primitive type. offset specifies the offset into vertex buffer and is ignored for the index
buffer. Count specifies the number of vertices or indices to use thus count / #vertices per primitive primitives are
rendered.
</p>
<p>
This method is intended for use with OpenGL ES 1.x and will throw an IllegalStateException when OpenGL ES 2.0 is used.
</p>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>primitiveType
</CODE> - the primitive type
<DD><CODE>offset
</CODE> - the offset into the vertex buffer, ignored for indexed rendering
<DD><CODE>count
</CODE> - number of vertices or indices to use
</DL>
</DD>
</DL>
<HR>
<A NAME="render(com.badlogic.gdx.graphics.glutils.ShaderProgram, int)"><!-- --></A><H3>
render
</H3>
<PRE>
public void
<B>render
</B>(
<A HREF="../../../../com/badlogic/gdx/graphics/glutils/ShaderProgram.html" title="class in com.badlogic.gdx.graphics.glutils">ShaderProgram
</A> shader,
int
primitiveType)
</PRE>
<DL>
<DD><p>
Renders the mesh using the given primitive type. If indices are set for this mesh then getNumIndices() / #vertices per
primitive primitives are rendered. If no indices are set then getNumVertices() / #vertices per primitive are rendered.
</p>
<p>
This method will automatically bind each vertex attribute as specified at construction time via
<A HREF="../../../../com/badlogic/gdx/graphics/VertexAttributes.html" title="class in com.badlogic.gdx.graphics"><CODE>VertexAttributes
</CODE></A> to
the respective shader attributes. The binding is based on the alias defined for each VertexAttribute.
</p>
<p>
This method must only be called after the
<A HREF="../../../../com/badlogic/gdx/graphics/glutils/ShaderProgram.html#begin()"><CODE>ShaderProgram.begin()
</CODE></A> method has been called!
</p>
<p>
This method is intended for use with OpenGL ES 2.0 and will throw an IllegalStateException when OpenGL ES 1.x is used.
</p>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>primitiveType
</CODE> - the primitive type
</DL>
</DD>
</DL>
<HR>
<A NAME="render(com.badlogic.gdx.graphics.glutils.ShaderProgram, int, int, int)"><!-- --></A><H3>
render
</H3>
<PRE>
public void
<B>render
</B>(
<A HREF="../../../../com/badlogic/gdx/graphics/glutils/ShaderProgram.html" title="class in com.badlogic.gdx.graphics.glutils">ShaderProgram
</A> shader,
int
primitiveType,
int
offset,
int
count)
</PRE>
<DL>
<DD><p>
Renders the mesh using the given primitive type. offset specifies the offset into either the vertex buffer or the index
buffer depending on whether indices are defined. count specifies the number of vertices or indices to use thus count /
#vertices per primitive primitives are rendered.
</p>
<p>
This method will automatically bind each vertex attribute as specified at construction time via
<A HREF="../../../../com/badlogic/gdx/graphics/VertexAttributes.html" title="class in com.badlogic.gdx.graphics"><CODE>VertexAttributes
</CODE></A> to
the respective shader attributes. The binding is based on the alias defined for each VertexAttribute.
</p>
<p>
This method must only be called after the
<A HREF="../../../../com/badlogic/gdx/graphics/glutils/ShaderProgram.html#begin()"><CODE>ShaderProgram.begin()
</CODE></A> method has been called!
</p>
<p>
This method is intended for use with OpenGL ES 2.0 and will throw an IllegalStateException when OpenGL ES 1.x is used.
</p>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>shader
</CODE> - the shader to be used
<DD><CODE>primitiveType
</CODE> - the primitive type
<DD><CODE>offset
</CODE> - the offset into the vertex or index buffer
<DD><CODE>count
</CODE> - number of vertices or indices to use
</DL>
</DD>
</DL>
<HR>
<A NAME="dispose()"><!-- --></A><H3>
dispose
</H3>
<PRE>
public void
<B>dispose
</B>()
</PRE>
<DL>
<DD>Frees all resources associated with this Mesh
<P>
<DD><DL>
<DT><B>Specified by:
</B><DD><CODE><A HREF="../../../../com/badlogic/gdx/utils/Disposable.html#dispose()">dispose
</A></CODE> in interface
<CODE><A HREF="../../../../com/badlogic/gdx/utils/Disposable.html" title="interface in com.badlogic.gdx.utils">Disposable
</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getVertexAttribute(int)"><!-- --></A><H3>
getVertexAttribute
</H3>
<PRE>
public
<A HREF="../../../../com/badlogic/gdx/graphics/VertexAttribute.html" title="class in com.badlogic.gdx.graphics">VertexAttribute
</A> <B>getVertexAttribute
</B>(int
usage)
</PRE>
<DL>
<DD>Returns the first
<A HREF="../../../../com/badlogic/gdx/graphics/VertexAttribute.html" title="class in com.badlogic.gdx.graphics"><CODE>VertexAttribute
</CODE></A> having the given
<A HREF="../../../../com/badlogic/gdx/graphics/VertexAttributes.Usage.html" title="class in com.badlogic.gdx.graphics"><CODE>VertexAttributes.Usage
</CODE></A>.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>usage
</CODE> - the Usage.
<DT><B>Returns:
</B><DD>the VertexAttribute or null if no attribute with that usage was found.
</DL>
</DD>
</DL>
<HR>
<A NAME="getVertexAttributes()"><!-- --></A><H3>
getVertexAttributes
</H3>
<PRE>
public
<A HREF="../../../../com/badlogic/gdx/graphics/VertexAttributes.html" title="class in com.badlogic.gdx.graphics">VertexAttributes
</A> <B>getVertexAttributes
</B>()
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:
</B><DD>the vertex attributes of this Mesh
</DL>
</DD>
</DL>
<HR>
<A NAME="getVerticesBuffer()"><!-- --></A><H3>
getVerticesBuffer
</H3>
<PRE>
public java.nio.FloatBuffer
<B>getVerticesBuffer
</B>()
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:
</B><DD>the backing FloatBuffer holding the vertices. Does not have to be a direct buffer on Android!
</DL>
</DD>
</DL>
<HR>
<A NAME="calculateBoundingBox()"><!-- --></A><H3>
calculateBoundingBox
</H3>
<PRE>
public
<A HREF="../../../../com/badlogic/gdx/math/collision/BoundingBox.html" title="class in com.badlogic.gdx.math.collision">BoundingBox
</A> <B>calculateBoundingBox
</B>()
</PRE>
<DL>
<DD>Calculates the
<A HREF="../../../../com/badlogic/gdx/math/collision/BoundingBox.html" title="class in com.badlogic.gdx.math.collision"><CODE>BoundingBox
</CODE></A> of the vertices contained in this mesh. In case no vertices are defined yet a
<A HREF="../../../../com/badlogic/gdx/utils/GdxRuntimeException.html" title="class in com.badlogic.gdx.utils"><CODE>GdxRuntimeException
</CODE></A> is thrown. This method creates a new BoundingBox instance.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:
</B><DD>the bounding box.
</DL>
</DD>
</DL>
<HR>
<A NAME="calculateBoundingBox(com.badlogic.gdx.math.collision.BoundingBox)"><!-- --></A><H3>
calculateBoundingBox
</H3>
<PRE>
public void
<B>calculateBoundingBox
</B>(
<A HREF="../../../../com/badlogic/gdx/math/collision/BoundingBox.html" title="class in com.badlogic.gdx.math.collision">BoundingBox
</A> bbox)
</PRE>
<DL>
<DD>Calculates the
<A HREF="../../../../com/badlogic/gdx/math/collision/BoundingBox.html" title="class in com.badlogic.gdx.math.collision"><CODE>BoundingBox
</CODE></A> of the vertices contained in this mesh. In case no vertices are defined yet a
<A HREF="../../../../com/badlogic/gdx/utils/GdxRuntimeException.html" title="class in com.badlogic.gdx.utils"><CODE>GdxRuntimeException
</CODE></A> is thrown.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>bbox
</CODE> - the bounding box to store the result in.
</DL>
</DD>
</DL>
<HR>
<A NAME="getIndicesBuffer()"><!-- --></A><H3>
getIndicesBuffer
</H3>
<PRE>
public java.nio.ShortBuffer
<B>getIndicesBuffer
</B>()
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:
</B><DD>the backing shortbuffer holding the indices. Does not have to be a direct buffer on Android!
</DL>
</DD>
</DL>
<HR>
<A NAME="invalidateAllMeshes(com.badlogic.gdx.Application)"><!-- --></A><H3>
invalidateAllMeshes
</H3>
<PRE>
public static void
<B>invalidateAllMeshes
</B>(
<A HREF="../../../../com/badlogic/gdx/Application.html" title="interface in com.badlogic.gdx">Application
</A> app)
</PRE>
<DL>
<DD>Invalidates all meshes so the next time they are rendered new VBO handles are generated.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>app
</CODE> -
</DL>
</DD>
</DL>
<HR>
<A NAME="clearAllMeshes(com.badlogic.gdx.Application)"><!-- --></A><H3>
clearAllMeshes
</H3>
<PRE>
public static void
<B>clearAllMeshes
</B>(
<A HREF="../../../../com/badlogic/gdx/Application.html" title="interface in com.badlogic.gdx">Application
</A> app)
</PRE>
<DL>
<DD>Will clear the managed mesh cache. I wouldn't use this if i was you :)
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getManagedStatus()"><!-- --></A><H3>
getManagedStatus
</H3>
<PRE>
public static java.lang.String
<B>getManagedStatus
</B>()
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="scale(float, float, float)"><!-- --></A><H3>
scale
</H3>
<PRE>
public void
<B>scale
</B>(float
scaleX,
float
scaleY,
float
scaleZ)
</PRE>
<DL>
<DD>Method to scale the positions in the mesh. Normals will be kept as is. This is a potentially slow operation, use with care.
It will also create a temporary float[] which will be garbage collected.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>scaleX
</CODE> - scale on x
<DD><CODE>scaleY
</CODE> - scale on y
<DD><CODE>scaleZ
</CODE> - scale on z
</DL>
</DD>
</DL>
<HR>
<A NAME="transform(com.badlogic.gdx.math.Matrix4)"><!-- --></A><H3>
transform
</H3>
<PRE>
public void
<B>transform
</B>(
<A HREF="../../../../com/badlogic/gdx/math/Matrix4.html" title="class in com.badlogic.gdx.math">Matrix4
</A> matrix)
</PRE>
<DL>
<DD>Method to transform the positions in the mesh. Normals will be kept as is. This is a potentially slow operation, use with care.
It will also create a temporary float[] which will be garbage collected.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>matrix
</CODE> - the transformation matrix
</DL>
</DD>
</DL>
<HR>
<A NAME="transform(com.badlogic.gdx.math.Matrix4, int, int)"><!-- --></A><H3>
transform
</H3>
<PRE>
protected void
<B>transform
</B>(
<A HREF="../../../../com/badlogic/gdx/math/Matrix4.html" title="class in com.badlogic.gdx.math">Matrix4
</A> matrix,
int
start,
int
count)
</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="transform(com.badlogic.gdx.math.Matrix4, float[], int, int, int, int, int)"><!-- --></A><H3>
transform
</H3>
<PRE>
public static void
<B>transform
</B>(
<A HREF="../../../../com/badlogic/gdx/math/Matrix4.html" title="class in com.badlogic.gdx.math">Matrix4
</A> matrix,
float[]
vertices,
int
vertexSize,
int
offset,
int
dimensions,
int
start,
int
count)
</PRE>
<DL>
<DD>Method to transform the positions in the float array. Normals will be kept as is. This is a potentially slow operation, use with care.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>matrix
</CODE> - the transformation matrix
<DD><CODE>vertices
</CODE> - the float array
<DD><CODE>vertexSize
</CODE> - the number of floats in each vertex
<DD><CODE>offset
</CODE> - the offset within a vertex to the position
<DD><CODE>dimensions
</CODE> - the size of the position
<DD><CODE>start
</CODE> - the vertex to start with
<DD><CODE>count
</CODE> - the amount of vertices to transform
</DL>
</DD>
</DL>
<HR>
<A NAME="copy(boolean, boolean, int[])"><!-- --></A><H3>
copy
</H3>
<PRE>
public
<A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html" title="class in com.badlogic.gdx.graphics">Mesh
</A> <B>copy
</B>(boolean
isStatic,
boolean
removeDuplicates,
int[]
usage)
</PRE>
<DL>
<DD>Copies this mesh optionally removing duplicate vertices and/or reducing the amount of attributes.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>isStatic
</CODE> - whether the new mesh is static or not. Allows for internal optimizations.
<DD><CODE>removeDuplicates
</CODE> - whether to remove duplicate vertices if possible. Only the vertices specified by usage are checked.
<DD><CODE>usage
</CODE> - which attributes (if available) to copy
<DT><B>Returns:
</B><DD>the copy of this mesh
</DL>
</DD>
</DL>
<HR>
<A NAME="copy(boolean)"><!-- --></A><H3>
copy
</H3>
<PRE>
public
<A HREF="../../../../com/badlogic/gdx/graphics/Mesh.html" title="class in com.badlogic.gdx.graphics">Mesh
</A> <B>copy
</B>(boolean
isStatic)
</PRE>
<DL>
<DD>Copies this mesh.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:
</B><DD><CODE>isStatic
</CODE> - whether the new mesh is static or not. Allows for internal optimizations.
<DT><B>Returns:
</B><DD>the copy of this mesh
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview
</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package
</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class
</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Mesh.html"><FONT CLASS="NavBarFont1"><B>Use
</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree
</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated
</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index
</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help
</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
libgdx API
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../com/badlogic/gdx/graphics/GLU.html" title="interface in com.badlogic.gdx.graphics"><B>PREV CLASS
</B></A>
<A HREF="../../../../com/badlogic/gdx/graphics/Mesh.VertexDataType.html" title="enum in com.badlogic.gdx.graphics"><B>NEXT CLASS
</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?com/badlogic/gdx/graphics/Mesh.html" target="_top"><B>FRAMES
</B></A>
<A HREF="Mesh.html" target="_top"><B>NO FRAMES
</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../allclasses-noframe.html"><B>All Classes
</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:
<A HREF="#nested_class_summary">NESTED
</A> |
<A HREF="#field_summary">FIELD
</A> |
<A HREF="#constructor_summary">CONSTR
</A> |
<A HREF="#method_summary">METHOD
</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:
<A HREF="#field_detail">FIELD
</A> |
<A HREF="#constructor_detail">CONSTR
</A> |
<A HREF="#method_detail">METHOD
</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
<div style="font-size:9pt"><i>
Copyright 2010 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)
</i></div>
</BODY>
</HTML>