mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-08 12:51:51 +09:00
981 lines
46 KiB
HTML
981 lines
46 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<!-- NewPage -->
|
|
<html lang="en">
|
|
<head>
|
|
<!-- Generated by javadoc (1.8.0_101) on Sat Jun 10 08:04:06 CEST 2017 -->
|
|
<title>Camera (libgdx API)</title>
|
|
<meta name="date" content="2017-06-10">
|
|
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
|
|
<script type="text/javascript" src="../../../../script.js"></script>
|
|
</head>
|
|
<body>
|
|
<script type="text/javascript"><!--
|
|
try {
|
|
if (location.href.indexOf('is-external=true') == -1) {
|
|
parent.document.title="Camera (libgdx API)";
|
|
}
|
|
}
|
|
catch(err) {
|
|
}
|
|
//-->
|
|
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":6,"i18":6};
|
|
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],8:["t4","Concrete Methods"]};
|
|
var altColor = "altColor";
|
|
var rowColor = "rowColor";
|
|
var tableTab = "tableTab";
|
|
var activeTableTab = "activeTableTab";
|
|
</script>
|
|
<noscript>
|
|
<div>JavaScript is disabled on your browser.</div>
|
|
</noscript>
|
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
|
<div class="topNav"><a name="navbar.top">
|
|
<!-- -->
|
|
</a>
|
|
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
|
|
<a name="navbar.top.firstrow">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="navList" title="Navigation">
|
|
<li><a href="../../../../overview-summary.html">Overview</a></li>
|
|
<li><a href="package-summary.html">Package</a></li>
|
|
<li class="navBarCell1Rev">Class</li>
|
|
<li><a href="class-use/Camera.html">Use</a></li>
|
|
<li><a href="package-tree.html">Tree</a></li>
|
|
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
|
|
<li><a href="../../../../index-all.html">Index</a></li>
|
|
<li><a href="../../../../help-doc.html">Help</a></li>
|
|
</ul>
|
|
<div class="aboutLanguage">
|
|
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>
|
|
</div>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList">
|
|
<li>Prev Class</li>
|
|
<li><a href="../../../../com/badlogic/gdx/graphics/Color.html" title="class in com.badlogic.gdx.graphics"><span class="typeNameLink">Next Class</span></a></li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../../index.html?com/badlogic/gdx/graphics/Camera.html" target="_top">Frames</a></li>
|
|
<li><a href="Camera.html" target="_top">No Frames</a></li>
|
|
</ul>
|
|
<ul class="navList" id="allclasses_navbar_top">
|
|
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
|
|
</ul>
|
|
<div>
|
|
<script type="text/javascript"><!--
|
|
allClassesLink = document.getElementById("allclasses_navbar_top");
|
|
if(window==top) {
|
|
allClassesLink.style.display = "block";
|
|
}
|
|
else {
|
|
allClassesLink.style.display = "none";
|
|
}
|
|
//-->
|
|
</script>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li>Nested | </li>
|
|
<li><a href="#field.summary">Field</a> | </li>
|
|
<li><a href="#constructor.summary">Constr</a> | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li><a href="#field.detail">Field</a> | </li>
|
|
<li><a href="#constructor.detail">Constr</a> | </li>
|
|
<li><a href="#method.detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a name="skip.navbar.top">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
|
<!-- ======== START OF CLASS DATA ======== -->
|
|
<div class="header">
|
|
<div class="subTitle">com.badlogic.gdx.graphics</div>
|
|
<h2 title="Class Camera" class="title">Class Camera</h2>
|
|
</div>
|
|
<div class="contentContainer">
|
|
<ul class="inheritance">
|
|
<li>java.lang.Object</li>
|
|
<li>
|
|
<ul class="inheritance">
|
|
<li>com.badlogic.gdx.graphics.Camera</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<div class="description">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<dl>
|
|
<dt>Direct Known Subclasses:</dt>
|
|
<dd><a href="../../../../com/badlogic/gdx/graphics/OrthographicCamera.html" title="class in com.badlogic.gdx.graphics">OrthographicCamera</a>, <a href="../../../../com/badlogic/gdx/graphics/PerspectiveCamera.html" title="class in com.badlogic.gdx.graphics">PerspectiveCamera</a></dd>
|
|
</dl>
|
|
<hr>
|
|
<br>
|
|
<pre>public abstract class <span class="typeNameLabel">Camera</span>
|
|
extends java.lang.Object</pre>
|
|
<div class="block">Base class for <a href="../../../../com/badlogic/gdx/graphics/OrthographicCamera.html" title="class in com.badlogic.gdx.graphics"><code>OrthographicCamera</code></a> and <a href="../../../../com/badlogic/gdx/graphics/PerspectiveCamera.html" title="class in com.badlogic.gdx.graphics"><code>PerspectiveCamera</code></a>.</div>
|
|
<dl>
|
|
<dt><span class="simpleTagLabel">Author:</span></dt>
|
|
<dd>mzechner</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="summary">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- =========== FIELD SUMMARY =========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="field.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Field Summary</h3>
|
|
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
|
|
<caption><span>Fields</span><span class="tabEnd"> </span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
|
<th class="colLast" scope="col">Field and Description</th>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/math/Matrix4.html" title="class in com.badlogic.gdx.math">Matrix4</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Camera.html#combined">combined</a></span></code>
|
|
<div class="block">the combined projection and view matrix</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Camera.html#direction">direction</a></span></code>
|
|
<div class="block">the unit length direction vector of the camera</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>float</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Camera.html#far">far</a></span></code>
|
|
<div class="block">the far clipping plane distance, has to be positive</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/math/Frustum.html" title="class in com.badlogic.gdx.math">Frustum</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Camera.html#frustum">frustum</a></span></code>
|
|
<div class="block">the frustum</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/math/Matrix4.html" title="class in com.badlogic.gdx.math">Matrix4</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Camera.html#invProjectionView">invProjectionView</a></span></code>
|
|
<div class="block">the inverse combined projection and view matrix</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>float</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Camera.html#near">near</a></span></code>
|
|
<div class="block">the near clipping plane distance, has to be positive</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Camera.html#position">position</a></span></code>
|
|
<div class="block">the position of the camera</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/math/Matrix4.html" title="class in com.badlogic.gdx.math">Matrix4</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Camera.html#projection">projection</a></span></code>
|
|
<div class="block">the projection matrix</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Camera.html#up">up</a></span></code>
|
|
<div class="block">the unit length up vector of the camera</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/math/Matrix4.html" title="class in com.badlogic.gdx.math">Matrix4</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Camera.html#view">view</a></span></code>
|
|
<div class="block">the view matrix</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>float</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Camera.html#viewportHeight">viewportHeight</a></span></code>
|
|
<div class="block">the viewport height</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>float</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Camera.html#viewportWidth">viewportWidth</a></span></code>
|
|
<div class="block">the viewport width</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</li>
|
|
</ul>
|
|
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="constructor.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Constructor Summary</h3>
|
|
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
|
|
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
|
|
<tr>
|
|
<th class="colOne" scope="col">Constructor and Description</th>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Camera.html#Camera--">Camera</a></span>()</code> </td>
|
|
</tr>
|
|
</table>
|
|
</li>
|
|
</ul>
|
|
<!-- ========== METHOD SUMMARY =========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="method.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Summary</h3>
|
|
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
|
|
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
|
<th class="colLast" scope="col">Method and Description</th>
|
|
</tr>
|
|
<tr id="i0" class="altColor">
|
|
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/math/collision/Ray.html" title="class in com.badlogic.gdx.math.collision">Ray</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Camera.html#getPickRay-float-float-">getPickRay</a></span>(float screenX,
|
|
float screenY)</code>
|
|
<div class="block">Creates a picking <a href="../../../../com/badlogic/gdx/math/collision/Ray.html" title="class in com.badlogic.gdx.math.collision"><code>Ray</code></a> from the coordinates given in screen coordinates.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i1" class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/math/collision/Ray.html" title="class in com.badlogic.gdx.math.collision">Ray</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Camera.html#getPickRay-float-float-float-float-float-float-">getPickRay</a></span>(float screenX,
|
|
float screenY,
|
|
float viewportX,
|
|
float viewportY,
|
|
float viewportWidth,
|
|
float viewportHeight)</code>
|
|
<div class="block">Creates a picking <a href="../../../../com/badlogic/gdx/math/collision/Ray.html" title="class in com.badlogic.gdx.math.collision"><code>Ray</code></a> from the coordinates given in screen coordinates.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i2" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Camera.html#lookAt-float-float-float-">lookAt</a></span>(float x,
|
|
float y,
|
|
float z)</code>
|
|
<div class="block">Recalculates the direction of the camera to look at the point (x, y, z).</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i3" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Camera.html#lookAt-com.badlogic.gdx.math.Vector3-">lookAt</a></span>(<a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</a> target)</code>
|
|
<div class="block">Recalculates the direction of the camera to look at the point (x, y, z).</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i4" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Camera.html#normalizeUp--">normalizeUp</a></span>()</code>
|
|
<div class="block">Normalizes the up vector by first calculating the right vector via a cross product between direction and up, and then
|
|
recalculating the up vector via a cross product between right and direction.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i5" class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Camera.html#project-com.badlogic.gdx.math.Vector3-">project</a></span>(<a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</a> worldCoords)</code>
|
|
<div class="block">Projects the <a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math"><code>Vector3</code></a> given in world space to screen coordinates.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i6" class="altColor">
|
|
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Camera.html#project-com.badlogic.gdx.math.Vector3-float-float-float-float-">project</a></span>(<a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</a> worldCoords,
|
|
float viewportX,
|
|
float viewportY,
|
|
float viewportWidth,
|
|
float viewportHeight)</code>
|
|
<div class="block">Projects the <a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math"><code>Vector3</code></a> given in world space to screen coordinates.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i7" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Camera.html#rotate-float-float-float-float-">rotate</a></span>(float angle,
|
|
float axisX,
|
|
float axisY,
|
|
float axisZ)</code>
|
|
<div class="block">Rotates the direction and up vector of this camera by the given angle around the given axis.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i8" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Camera.html#rotate-com.badlogic.gdx.math.Matrix4-">rotate</a></span>(<a href="../../../../com/badlogic/gdx/math/Matrix4.html" title="class in com.badlogic.gdx.math">Matrix4</a> transform)</code>
|
|
<div class="block">Rotates the direction and up vector of this camera by the given rotation matrix.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i9" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Camera.html#rotate-com.badlogic.gdx.math.Quaternion-">rotate</a></span>(<a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a> quat)</code>
|
|
<div class="block">Rotates the direction and up vector of this camera by the given <a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math"><code>Quaternion</code></a>.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i10" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Camera.html#rotate-com.badlogic.gdx.math.Vector3-float-">rotate</a></span>(<a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</a> axis,
|
|
float angle)</code>
|
|
<div class="block">Rotates the direction and up vector of this camera by the given angle around the given axis.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i11" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Camera.html#rotateAround-com.badlogic.gdx.math.Vector3-com.badlogic.gdx.math.Vector3-float-">rotateAround</a></span>(<a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</a> point,
|
|
<a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</a> axis,
|
|
float angle)</code>
|
|
<div class="block">Rotates the direction and up vector of this camera by the given angle around the given axis, with the axis attached to given
|
|
point.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i12" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Camera.html#transform-com.badlogic.gdx.math.Matrix4-">transform</a></span>(<a href="../../../../com/badlogic/gdx/math/Matrix4.html" title="class in com.badlogic.gdx.math">Matrix4</a> transform)</code>
|
|
<div class="block">Transform the position, direction and up vector by the given matrix</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i13" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Camera.html#translate-float-float-float-">translate</a></span>(float x,
|
|
float y,
|
|
float z)</code>
|
|
<div class="block">Moves the camera by the given amount on each axis.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i14" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Camera.html#translate-com.badlogic.gdx.math.Vector3-">translate</a></span>(<a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</a> vec)</code>
|
|
<div class="block">Moves the camera by the given vector.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i15" class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Camera.html#unproject-com.badlogic.gdx.math.Vector3-">unproject</a></span>(<a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</a> screenCoords)</code>
|
|
<div class="block">Function to translate a point given in screen coordinates to world space.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i16" class="altColor">
|
|
<td class="colFirst"><code><a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Camera.html#unproject-com.badlogic.gdx.math.Vector3-float-float-float-float-">unproject</a></span>(<a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</a> screenCoords,
|
|
float viewportX,
|
|
float viewportY,
|
|
float viewportWidth,
|
|
float viewportHeight)</code>
|
|
<div class="block">Function to translate a point given in screen coordinates to world space.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i17" class="rowColor">
|
|
<td class="colFirst"><code>abstract void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Camera.html#update--">update</a></span>()</code>
|
|
<div class="block">Recalculates the projection and view matrix of this camera and the <a href="../../../../com/badlogic/gdx/math/Frustum.html" title="class in com.badlogic.gdx.math"><code>Frustum</code></a> planes.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i18" class="altColor">
|
|
<td class="colFirst"><code>abstract void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/badlogic/gdx/graphics/Camera.html#update-boolean-">update</a></span>(boolean updateFrustum)</code>
|
|
<div class="block">Recalculates the projection and view matrix of this camera and the <a href="../../../../com/badlogic/gdx/math/Frustum.html" title="class in com.badlogic.gdx.math"><code>Frustum</code></a> planes if <code>updateFrustum</code> is
|
|
true.</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Methods inherited from class java.lang.Object</h3>
|
|
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="details">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- ============ FIELD DETAIL =========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="field.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Field Detail</h3>
|
|
<a name="position">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>position</h4>
|
|
<pre>public final <a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</a> position</pre>
|
|
<div class="block">the position of the camera</div>
|
|
</li>
|
|
</ul>
|
|
<a name="direction">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>direction</h4>
|
|
<pre>public final <a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</a> direction</pre>
|
|
<div class="block">the unit length direction vector of the camera</div>
|
|
</li>
|
|
</ul>
|
|
<a name="up">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>up</h4>
|
|
<pre>public final <a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</a> up</pre>
|
|
<div class="block">the unit length up vector of the camera</div>
|
|
</li>
|
|
</ul>
|
|
<a name="projection">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>projection</h4>
|
|
<pre>public final <a href="../../../../com/badlogic/gdx/math/Matrix4.html" title="class in com.badlogic.gdx.math">Matrix4</a> projection</pre>
|
|
<div class="block">the projection matrix</div>
|
|
</li>
|
|
</ul>
|
|
<a name="view">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>view</h4>
|
|
<pre>public final <a href="../../../../com/badlogic/gdx/math/Matrix4.html" title="class in com.badlogic.gdx.math">Matrix4</a> view</pre>
|
|
<div class="block">the view matrix</div>
|
|
</li>
|
|
</ul>
|
|
<a name="combined">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>combined</h4>
|
|
<pre>public final <a href="../../../../com/badlogic/gdx/math/Matrix4.html" title="class in com.badlogic.gdx.math">Matrix4</a> combined</pre>
|
|
<div class="block">the combined projection and view matrix</div>
|
|
</li>
|
|
</ul>
|
|
<a name="invProjectionView">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>invProjectionView</h4>
|
|
<pre>public final <a href="../../../../com/badlogic/gdx/math/Matrix4.html" title="class in com.badlogic.gdx.math">Matrix4</a> invProjectionView</pre>
|
|
<div class="block">the inverse combined projection and view matrix</div>
|
|
</li>
|
|
</ul>
|
|
<a name="near">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>near</h4>
|
|
<pre>public float near</pre>
|
|
<div class="block">the near clipping plane distance, has to be positive</div>
|
|
</li>
|
|
</ul>
|
|
<a name="far">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>far</h4>
|
|
<pre>public float far</pre>
|
|
<div class="block">the far clipping plane distance, has to be positive</div>
|
|
</li>
|
|
</ul>
|
|
<a name="viewportWidth">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>viewportWidth</h4>
|
|
<pre>public float viewportWidth</pre>
|
|
<div class="block">the viewport width</div>
|
|
</li>
|
|
</ul>
|
|
<a name="viewportHeight">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>viewportHeight</h4>
|
|
<pre>public float viewportHeight</pre>
|
|
<div class="block">the viewport height</div>
|
|
</li>
|
|
</ul>
|
|
<a name="frustum">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>frustum</h4>
|
|
<pre>public final <a href="../../../../com/badlogic/gdx/math/Frustum.html" title="class in com.badlogic.gdx.math">Frustum</a> frustum</pre>
|
|
<div class="block">the frustum</div>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="constructor.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Constructor Detail</h3>
|
|
<a name="Camera--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>Camera</h4>
|
|
<pre>public Camera()</pre>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<!-- ============ METHOD DETAIL ========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="method.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Detail</h3>
|
|
<a name="update--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>update</h4>
|
|
<pre>public abstract void update()</pre>
|
|
<div class="block">Recalculates the projection and view matrix of this camera and the <a href="../../../../com/badlogic/gdx/math/Frustum.html" title="class in com.badlogic.gdx.math"><code>Frustum</code></a> planes. Use this after you've manipulated
|
|
any of the attributes of the camera.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="update-boolean-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>update</h4>
|
|
<pre>public abstract void update(boolean updateFrustum)</pre>
|
|
<div class="block">Recalculates the projection and view matrix of this camera and the <a href="../../../../com/badlogic/gdx/math/Frustum.html" title="class in com.badlogic.gdx.math"><code>Frustum</code></a> planes if <code>updateFrustum</code> is
|
|
true. Use this after you've manipulated any of the attributes of the camera.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="lookAt-float-float-float-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>lookAt</h4>
|
|
<pre>public void lookAt(float x,
|
|
float y,
|
|
float z)</pre>
|
|
<div class="block">Recalculates the direction of the camera to look at the point (x, y, z). This function assumes the up vector is normalized.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>x</code> - the x-coordinate of the point to look at</dd>
|
|
<dd><code>y</code> - the y-coordinate of the point to look at</dd>
|
|
<dd><code>z</code> - the z-coordinate of the point to look at</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="lookAt-com.badlogic.gdx.math.Vector3-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>lookAt</h4>
|
|
<pre>public void lookAt(<a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</a> target)</pre>
|
|
<div class="block">Recalculates the direction of the camera to look at the point (x, y, z).</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>target</code> - the point to look at</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="normalizeUp--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>normalizeUp</h4>
|
|
<pre>public void normalizeUp()</pre>
|
|
<div class="block">Normalizes the up vector by first calculating the right vector via a cross product between direction and up, and then
|
|
recalculating the up vector via a cross product between right and direction.</div>
|
|
</li>
|
|
</ul>
|
|
<a name="rotate-float-float-float-float-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>rotate</h4>
|
|
<pre>public void rotate(float angle,
|
|
float axisX,
|
|
float axisY,
|
|
float axisZ)</pre>
|
|
<div class="block">Rotates the direction and up vector of this camera by the given angle around the given axis. The direction and up vector
|
|
will not be orthogonalized.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>angle</code> - the angle</dd>
|
|
<dd><code>axisX</code> - the x-component of the axis</dd>
|
|
<dd><code>axisY</code> - the y-component of the axis</dd>
|
|
<dd><code>axisZ</code> - the z-component of the axis</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="rotate-com.badlogic.gdx.math.Vector3-float-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>rotate</h4>
|
|
<pre>public void rotate(<a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</a> axis,
|
|
float angle)</pre>
|
|
<div class="block">Rotates the direction and up vector of this camera by the given angle around the given axis. The direction and up vector
|
|
will not be orthogonalized.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>axis</code> - the axis to rotate around</dd>
|
|
<dd><code>angle</code> - the angle, in degrees</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="rotate-com.badlogic.gdx.math.Matrix4-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>rotate</h4>
|
|
<pre>public void rotate(<a href="../../../../com/badlogic/gdx/math/Matrix4.html" title="class in com.badlogic.gdx.math">Matrix4</a> transform)</pre>
|
|
<div class="block">Rotates the direction and up vector of this camera by the given rotation matrix. The direction and up vector will not be
|
|
orthogonalized.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>transform</code> - The rotation matrix</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="rotate-com.badlogic.gdx.math.Quaternion-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>rotate</h4>
|
|
<pre>public void rotate(<a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math">Quaternion</a> quat)</pre>
|
|
<div class="block">Rotates the direction and up vector of this camera by the given <a href="../../../../com/badlogic/gdx/math/Quaternion.html" title="class in com.badlogic.gdx.math"><code>Quaternion</code></a>. The direction and up vector will not be
|
|
orthogonalized.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>quat</code> - The quaternion</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="rotateAround-com.badlogic.gdx.math.Vector3-com.badlogic.gdx.math.Vector3-float-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>rotateAround</h4>
|
|
<pre>public void rotateAround(<a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</a> point,
|
|
<a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</a> axis,
|
|
float angle)</pre>
|
|
<div class="block">Rotates the direction and up vector of this camera by the given angle around the given axis, with the axis attached to given
|
|
point. The direction and up vector will not be orthogonalized.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>point</code> - the point to attach the axis to</dd>
|
|
<dd><code>axis</code> - the axis to rotate around</dd>
|
|
<dd><code>angle</code> - the angle, in degrees</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="transform-com.badlogic.gdx.math.Matrix4-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>transform</h4>
|
|
<pre>public void transform(<a href="../../../../com/badlogic/gdx/math/Matrix4.html" title="class in com.badlogic.gdx.math">Matrix4</a> transform)</pre>
|
|
<div class="block">Transform the position, direction and up vector by the given matrix</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>transform</code> - The transform matrix</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="translate-float-float-float-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>translate</h4>
|
|
<pre>public void translate(float x,
|
|
float y,
|
|
float z)</pre>
|
|
<div class="block">Moves the camera by the given amount on each axis.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>x</code> - the displacement on the x-axis</dd>
|
|
<dd><code>y</code> - the displacement on the y-axis</dd>
|
|
<dd><code>z</code> - the displacement on the z-axis</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="translate-com.badlogic.gdx.math.Vector3-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>translate</h4>
|
|
<pre>public void translate(<a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</a> vec)</pre>
|
|
<div class="block">Moves the camera by the given vector.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>vec</code> - the displacement vector</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="unproject-com.badlogic.gdx.math.Vector3-float-float-float-float-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>unproject</h4>
|
|
<pre>public <a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</a> unproject(<a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</a> screenCoords,
|
|
float viewportX,
|
|
float viewportY,
|
|
float viewportWidth,
|
|
float viewportHeight)</pre>
|
|
<div class="block">Function to translate a point given in screen coordinates to world space. It's the same as GLU gluUnProject, but does not
|
|
rely on OpenGL. The x- and y-coordinate of vec are assumed to be in screen coordinates (origin is the top left corner, y
|
|
pointing down, x pointing to the right) as reported by the touch methods in <a href="../../../../com/badlogic/gdx/Input.html" title="interface in com.badlogic.gdx"><code>Input</code></a>. A z-coordinate of 0 will return a
|
|
point on the near plane, a z-coordinate of 1 will return a point on the far plane. This method allows you to specify the
|
|
viewport position and dimensions in the coordinate system expected by <a href="../../../../com/badlogic/gdx/graphics/GL20.html#glViewport-int-int-int-int-"><code>GL20.glViewport(int, int, int, int)</code></a>, with the
|
|
origin in the bottom left corner of the screen.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>screenCoords</code> - the point in screen coordinates (origin top left)</dd>
|
|
<dd><code>viewportX</code> - the coordinate of the bottom left corner of the viewport in glViewport coordinates.</dd>
|
|
<dd><code>viewportY</code> - the coordinate of the bottom left corner of the viewport in glViewport coordinates.</dd>
|
|
<dd><code>viewportWidth</code> - the width of the viewport in pixels</dd>
|
|
<dd><code>viewportHeight</code> - the height of the viewport in pixels</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the mutated and unprojected screenCoords <a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math"><code>Vector3</code></a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="unproject-com.badlogic.gdx.math.Vector3-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>unproject</h4>
|
|
<pre>public <a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</a> unproject(<a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</a> screenCoords)</pre>
|
|
<div class="block">Function to translate a point given in screen coordinates to world space. It's the same as GLU gluUnProject but does not
|
|
rely on OpenGL. The viewport is assumed to span the whole screen and is fetched from <a href="../../../../com/badlogic/gdx/Graphics.html#getWidth--"><code>Graphics.getWidth()</code></a> and
|
|
<a href="../../../../com/badlogic/gdx/Graphics.html#getHeight--"><code>Graphics.getHeight()</code></a>. The x- and y-coordinate of vec are assumed to be in screen coordinates (origin is the top left
|
|
corner, y pointing down, x pointing to the right) as reported by the touch methods in <a href="../../../../com/badlogic/gdx/Input.html" title="interface in com.badlogic.gdx"><code>Input</code></a>. A z-coordinate of 0
|
|
will return a point on the near plane, a z-coordinate of 1 will return a point on the far plane.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>screenCoords</code> - the point in screen coordinates</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the mutated and unprojected screenCoords <a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math"><code>Vector3</code></a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="project-com.badlogic.gdx.math.Vector3-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>project</h4>
|
|
<pre>public <a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</a> project(<a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</a> worldCoords)</pre>
|
|
<div class="block">Projects the <a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math"><code>Vector3</code></a> given in world space to screen coordinates. It's the same as GLU gluProject with one small
|
|
deviation: The viewport is assumed to span the whole screen. The screen coordinate system has its origin in the
|
|
<b>bottom</b> left, with the y-axis pointing <b>upwards</b> and the x-axis pointing to the right. This makes it easily
|
|
useable in conjunction with <a href="../../../../com/badlogic/gdx/graphics/g2d/Batch.html" title="interface in com.badlogic.gdx.graphics.g2d"><code>Batch</code></a> and similar classes.</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the mutated and projected worldCoords <a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math"><code>Vector3</code></a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="project-com.badlogic.gdx.math.Vector3-float-float-float-float-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>project</h4>
|
|
<pre>public <a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</a> project(<a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math">Vector3</a> worldCoords,
|
|
float viewportX,
|
|
float viewportY,
|
|
float viewportWidth,
|
|
float viewportHeight)</pre>
|
|
<div class="block">Projects the <a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math"><code>Vector3</code></a> given in world space to screen coordinates. It's the same as GLU gluProject with one small
|
|
deviation: The viewport is assumed to span the whole screen. The screen coordinate system has its origin in the
|
|
<b>bottom</b> left, with the y-axis pointing <b>upwards</b> and the x-axis pointing to the right. This makes it easily
|
|
useable in conjunction with <a href="../../../../com/badlogic/gdx/graphics/g2d/Batch.html" title="interface in com.badlogic.gdx.graphics.g2d"><code>Batch</code></a> and similar classes. This method allows you to specify the viewport position and
|
|
dimensions in the coordinate system expected by <a href="../../../../com/badlogic/gdx/graphics/GL20.html#glViewport-int-int-int-int-"><code>GL20.glViewport(int, int, int, int)</code></a>, with the origin in the bottom
|
|
left corner of the screen.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>viewportX</code> - the coordinate of the bottom left corner of the viewport in glViewport coordinates.</dd>
|
|
<dd><code>viewportY</code> - the coordinate of the bottom left corner of the viewport in glViewport coordinates.</dd>
|
|
<dd><code>viewportWidth</code> - the width of the viewport in pixels</dd>
|
|
<dd><code>viewportHeight</code> - the height of the viewport in pixels</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the mutated and projected worldCoords <a href="../../../../com/badlogic/gdx/math/Vector3.html" title="class in com.badlogic.gdx.math"><code>Vector3</code></a></dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getPickRay-float-float-float-float-float-float-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getPickRay</h4>
|
|
<pre>public <a href="../../../../com/badlogic/gdx/math/collision/Ray.html" title="class in com.badlogic.gdx.math.collision">Ray</a> getPickRay(float screenX,
|
|
float screenY,
|
|
float viewportX,
|
|
float viewportY,
|
|
float viewportWidth,
|
|
float viewportHeight)</pre>
|
|
<div class="block">Creates a picking <a href="../../../../com/badlogic/gdx/math/collision/Ray.html" title="class in com.badlogic.gdx.math.collision"><code>Ray</code></a> from the coordinates given in screen coordinates. It is assumed that the viewport spans the
|
|
whole screen. The screen coordinates origin is assumed to be in the top left corner, its y-axis pointing down, the x-axis
|
|
pointing to the right. The returned instance is not a new instance but an internal member only accessible via this function.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>viewportX</code> - the coordinate of the bottom left corner of the viewport in glViewport coordinates.</dd>
|
|
<dd><code>viewportY</code> - the coordinate of the bottom left corner of the viewport in glViewport coordinates.</dd>
|
|
<dd><code>viewportWidth</code> - the width of the viewport in pixels</dd>
|
|
<dd><code>viewportHeight</code> - the height of the viewport in pixels</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the picking Ray.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getPickRay-float-float-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>getPickRay</h4>
|
|
<pre>public <a href="../../../../com/badlogic/gdx/math/collision/Ray.html" title="class in com.badlogic.gdx.math.collision">Ray</a> getPickRay(float screenX,
|
|
float screenY)</pre>
|
|
<div class="block">Creates a picking <a href="../../../../com/badlogic/gdx/math/collision/Ray.html" title="class in com.badlogic.gdx.math.collision"><code>Ray</code></a> from the coordinates given in screen coordinates. It is assumed that the viewport spans the
|
|
whole screen. The screen coordinates origin is assumed to be in the top left corner, its y-axis pointing down, the x-axis
|
|
pointing to the right. The returned instance is not a new instance but an internal member only accessible via this function.</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the picking Ray.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<!-- ========= END OF CLASS DATA ========= -->
|
|
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
|
<div class="bottomNav"><a name="navbar.bottom">
|
|
<!-- -->
|
|
</a>
|
|
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
|
<a name="navbar.bottom.firstrow">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="navList" title="Navigation">
|
|
<li><a href="../../../../overview-summary.html">Overview</a></li>
|
|
<li><a href="package-summary.html">Package</a></li>
|
|
<li class="navBarCell1Rev">Class</li>
|
|
<li><a href="class-use/Camera.html">Use</a></li>
|
|
<li><a href="package-tree.html">Tree</a></li>
|
|
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
|
|
<li><a href="../../../../index-all.html">Index</a></li>
|
|
<li><a href="../../../../help-doc.html">Help</a></li>
|
|
</ul>
|
|
<div class="aboutLanguage">libgdx API</div>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList">
|
|
<li>Prev Class</li>
|
|
<li><a href="../../../../com/badlogic/gdx/graphics/Color.html" title="class in com.badlogic.gdx.graphics"><span class="typeNameLink">Next Class</span></a></li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../../index.html?com/badlogic/gdx/graphics/Camera.html" target="_top">Frames</a></li>
|
|
<li><a href="Camera.html" target="_top">No Frames</a></li>
|
|
</ul>
|
|
<ul class="navList" id="allclasses_navbar_bottom">
|
|
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
|
|
</ul>
|
|
<div>
|
|
<script type="text/javascript"><!--
|
|
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
|
if(window==top) {
|
|
allClassesLink.style.display = "block";
|
|
}
|
|
else {
|
|
allClassesLink.style.display = "none";
|
|
}
|
|
//-->
|
|
</script>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li>Nested | </li>
|
|
<li><a href="#field.summary">Field</a> | </li>
|
|
<li><a href="#constructor.summary">Constr</a> | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li><a href="#field.detail">Field</a> | </li>
|
|
<li><a href="#constructor.detail">Constr</a> | </li>
|
|
<li><a href="#method.detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a name="skip.navbar.bottom">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
|
<p class="legalCopy"><small>
|
|
<div style="font-size:9pt"><i>
|
|
Copyright © 2010-2013 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)
|
|
</i></div>
|
|
</small></p>
|
|
</body>
|
|
</html>
|