Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!

1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Member Since 27 Dec 2009
Offline Last Active Jan 06 2015 08:30 PM

Topics I've Started

Correct Term For An Operating Systems Core API

04 September 2014 - 11:08 PM



What is the technical/correct term for the APIs: WinAPI, Cocoa, Linux-API/POSIX?


Would they be called/classified as:

  • Standard OS API's
  • Core API
  • Base API


What term do you use to refer to this group of API's? I dont think its enough to just refer to them as API's as they are more the foundation API of an Operating System - the pedestal/foundation with which all other API's of that OS are built. Whilst WxWidget and WinAPI are both API's; one is essentially a wrapper of the other and one is significantly easier to learn and use.

Is the BIOS Serial Number Always Set, Constant & Reliable

19 August 2014 - 07:23 PM



I am thinking of using the users BIOS/Motherboard Serial Number to uniquely identify a user (the application runs on Windows OS). When I refer to the BIOS/Motherboard Serial Number I am referring to the serial number returned when you type in: wmic BIOS get SerialNumber


I have previously attempted to use the Hard Drive serial number to uniquely identify a user but WMI is notoriously unreliable. For example; if you are running your .exe as an elevated process you will get a different Hard Drive serial number back from WMI. Also as crazy as this sounds, I have had 2 different Windows 8 machines change their Hard Drive serial no. on me when the Hard Drives were not changed at all - I'm not crazy this really happened - I realise there's no better way for people to think you're crazy than saying 'I'm not crazy' but putting that aside - do you know if I will experience these same issues with the BIOS/Motherboard' Serial Number?


Some queries

  • Can the user change this serial number? Either using third party applications or through Windows.
  • According to this forum post, not all vendors supply a motherboard UUID so I cannot use this to uniquely identify the user. Do venders mostly/always supply/fill out the BIOS/Motherboard Serial Number or will I also find some computers dont have a serial number?
  • I have tried to uniquely identify a user using the Hard Drive's Serial Number. But I have run into the issue that the serial number can change and that Windows API is unreliable and can return different values. Do you know if I may experience the same issue for the BIOS/Motherboard's Serial Number?
  • Can a standard process (Standard Windows User) retrieve the BIOS/Motherboard Serial Number? Or does the process need to be elevated (Admin User)?
  • What would happen if the user has a virtual machine?

Just to confirm the BIOS is the motherboard, correct? I am a little unclear because I thought the BIOS is the simple software installed on the motherboard.


Mobile Input Automatically Inverted

12 August 2014 - 09:09 PM


I am using TouchScript for my Unity3d game input - panning around a 3d environment. For some reason the Windows 8 Tablet input is inverted. Note when I run the app in the Unity3d Editor on my Windows 7 laptop the input is NOT inverted.

When I say inverted I mean:

 - By dragging your finger left the camera moves left. The vast majority of apps would move the camera right when the user drags left. This is how Bing Maps responds.
 - By dragging your finger up the camera moves up. The vast majority of apps would move the camera down when the user drags down.
 - Pinching fingers together zooms in the camera. When it should zoom out.

I haven't done anything that I know of the cause this inversion.


 - GameObject 'CameraContainer' has the components: Transformer2d, FullScreenLayer, PanGesture, ScaleGesture, PressGesture.
 - GameObject 'MainCamera' is nested inside the 'CameraContainer' object and has the components: Camera.
 - GameObject 'TouchScript' has the components: TouchManager.
 - GameObject 'Input' is nested inside the 'TouchScript' object and has the components: MobileInput, MouseInput and Win8TouchInput.

Any ideas what has caused this and/or how I can invert the input controls?

Third Party Library That Can Perform Interpolations & Rotations

05 August 2014 - 11:30 PM



I am attempting to find a C# Third Party Mathematical library that can:


- Rotate individual and groups of 3d Vectors about a 3d Vector

- Interpolate/Lerp 3d vectors


I intend to use the third party application for a Civil Engineering application. Are you aware of any C# Third Party libraries that can perform these operations?


I have come across this library Math.NET Iridium, but Math is not my strong point, so I cant discern if the library meets my needs. By this I mean I am not sure which Mathematical operation/formula/function I would use to rotate 3d Vectors so I dont know what methods and functions I need to search Math.Net for. I can confirm that this library can perform interpolation.


Any advice would be greatly appreciated. Especially what Mathematical operation/formula/function I should use to rotate a 3d Vector on the Y Axis using another 3d Vector as the pivot point.

Hash Distance & Angle To Produce Unique Value

20 July 2014 - 11:50 PM



I have many vertices drawn on my Unity3d C# application window (thousands). I am attempting to come up with a fast way to detect which vertex has been clicked.


My idea is to use a sorted list. The list will be ordered by a vector/vertices distance to (0,0,0):

List <KeyValuePair<double, GameObject>> vectorMap = new List <KeyValuePair<double, GameObject>>();

I use a binary search to order, search and add to the list.


Add/Insertion Method:

public void recordElementVertices(Element ele) {
	// Element is a Sub-Class of GameObject

	foreach (Vector3d v in ele.WorldVertices) {
		double distFromZero = Vector3d.Distance(Vector3d.zero, v);

		int index = -1;
		if (Algorithms.LowerBounds(vertexDistanceList, distFromZero, out index, DEF_PRECISION) != Algorithms.SearchResult.FOUND_TARGET)
			vertexDistanceList.Insert(index, new KeyValuePair<double, List<GameObject>>(distFromZero, new List<GameObject>()));
		vertexDistanceList[index].Value.Add (ele.gameObject);

Hit Test (Search) Method:

public List<GameObject> hits(Vector3d mousePos) {

	int 	index 			= -1;
	double 	distFromZero 	= Vector3d.Distance(Vector3d.zero, mousePos);

	// Binary search will search for an exact hit or find the closest vertex to the mouse pos
	if (Algorithms.BinarySearch(vertexDistanceList, distFromZero, out index, DEF_PRECISION) == Algorithms.SearchResult.FAIL || index < 0)
		return null;

	return vertexDistanceList[index].Value; // return all game objects that occupies that vector position

This all works nicely and is fast but there is a major flaw. The algorithm doesn't take into account the vertices angle from (0,0,0). So 2 points that are the exact same distance from (0,0,0) but have different angles will be considered the same vertex when they are not.


For example; these 2 points lie 5 metres from (0,0,0) but have different angles. My algorithm will consider these 2 points as occupying the same place in space when they are in a completely different position.




Do you have any suggestions how I can hash a distance and angle to produce a unique result that describes that point in space? Some simple like doing Distance ^ Angle could produce a unique result but they would also produce huge numbers. A restriction is that my list sorting algorithm requires that two points close to each other should produce a hash that is similar in order to find points close to the mouse position. Hope that makes sense.


I've heard about Locatily Sensitve Hashing but it looks like implementing this algorithm would be very tricky.


Any advice would be greatly appreciated.