<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wikidot="http://www.wikidot.com/rss-namespace">

	<channel>
		<title>Is this simple camera algorithm efficient</title>
		<link>http://rbwhitaker.wikidot.com/forum/t-205348/is-this-simple-camera-algorithm-efficient</link>
		<description>Posts in the discussion thread &quot;Is this simple camera algorithm efficient&quot;</description>
				<copyright></copyright>
		<lastBuildDate>Fri, 07 Aug 2026 19:37:14 +0000</lastBuildDate>
		
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-205348#post-658298</guid>
				<title>Re: Is this simple camera algorithm efficient</title>
				<link>http://rbwhitaker.wikidot.com/forum/t-205348/is-this-simple-camera-algorithm-efficient#post-658298</link>
				<description></description>
				<pubDate>Sat, 19 Dec 2009 00:05:57 +0000</pubDate>
				<wikidot:authorName>EgyDev</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>I mean with the word efficient that the camera performance will be constant and effiecient among different types of processors</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://rbwhitaker.wikidot.com/forum/t-205348#post-658296</guid>
				<title>Is this simple camera algorithm efficient</title>
				<link>http://rbwhitaker.wikidot.com/forum/t-205348/is-this-simple-camera-algorithm-efficient#post-658296</link>
				<description></description>
				<pubDate>Sat, 19 Dec 2009 00:00:23 +0000</pubDate>
				<wikidot:authorName>EgyDev</wikidot:authorName>								<content:encoded>
					<![CDATA[
						 <p>hi this is a simple first person camera algortihm I get the main code from an online website and I add modifications to it so please I want know whether this algorithms is efficient or not</p> <div> <p>using System;<br /> using System.Collections.Generic;<br /> using Microsoft.Xna.Framework;<br /> using Microsoft.Xna.Framework.Graphics;<br /> using Microsoft.Xna.Framework.Input;</p> <p>namespace NeuronGame<br /> {<br /> public class Camera<br /> {<br /> public Vector3 cameraPosition;<br /> public Vector3 cameraTarget;<br /> public Vector3 cameraReference;</p> <p>public void intialize(GraphicsDevice graphics)<br /> {<br /> // TODO: Add your initialization logic here<br /> cameraPosition = new Vector3(0.0f, 0.0f, 0.0f);<br /> cameraReference = new Vector3(0.0f, 0.0f, 1.0f);<br /> cameraTarget = cameraReference + cameraPosition;</p> <p>//Projection = Matrix.CreatePerspectiveFieldOfView(MathHelper.ToRadians(fieldOfView), aspectRatio, nearPlane, farPlane);<br /> }<br /> public void update(GameTime gameTime,GraphicsDevice graphics)<br /> {<br /> KeyboardState kState = Keyboard.GetState();<br /> MouseState mState = Mouse.GetState();</p> <p>float deltaTime = (float)gameTime.ElapsedGameTime.TotalSeconds;</p> <p>Vector3 moveVector = Vector3.Zero;</p> <p>if (kState.IsKeyDown(Keys.W))<br /> {<br /> moveVector.Y += 20.0f ;<br /> }<br /> if (kState.IsKeyDown(Keys.S))<br /> {<br /> moveVector.Y -= 20.0f ;<br /> }<br /> if (kState.IsKeyDown(Keys.Left))<br /> {<br /> moveVector.X += 20.0f ;<br /> }<br /> if (kState.IsKeyDown(Keys.Right))<br /> {<br /> moveVector.X -= 20.0f ;<br /> }<br /> if (kState.IsKeyDown(Keys.Up))<br /> {<br /> moveVector.Z += 20.0f ;<br /> }<br /> if (kState.IsKeyDown(Keys.Down))<br /> {<br /> moveVector.Z -= 20.0f ;<br /> }<br /> Matrix cameraViewRotationMatrix = Matrix.CreateRotationX(MathHelper.ToRadians(45));<br /> Vector3 transformedCameraReference = Vector3.Transform(cameraReference, cameraViewRotationMatrix);<br /> cameraPosition += Vector3.Transform(moveVector, Matrix.Identity);<br /> cameraTarget = transformedCameraReference + cameraPosition;</p> <p>}<br /> }<br /> }</p> </div> 
				 	]]>
				</content:encoded>							</item>
				</channel>
</rss>