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 04 Sep 2012
Offline Last Active Mar 07 2015 01:47 PM

Posts I've Made

In Topic: Ugly, can this be done easier?

07 March 2015 - 01:47 PM

As a further enhancement you should consider making the menus data driven. e.g. the position and text of each entry should be within a configuration file which can be adjusted without a recompile. This usually makes for more readable and reusable code.

class Menu
static const char* items[NUM_MENU_ITEMS];
// ..

const char* ItemString (const int nID);

In Topic: How to do 3D feature detection?

05 March 2015 - 12:19 PM

Cadjunkie sounds knowledgeable.. Made me remember that the two guys behind me are the feature recognition guys.. I just paint and intersect triangles lol

In Topic: How to do 3D feature detection?

04 March 2015 - 05:11 PM

Have a look at Seimen's Parasolid. it's an industry standard CAD kernel used in most of the 3D applications you've heard of.. its licensed by the company I work for, for example. You can do things like feature recognition, healing, simplification. have a Google for 'Parasolid Jumpstart Kit'. Bear in mind it probably costs a shitload..

In Topic: glm/opengl orbital camera C++

17 August 2014 - 09:09 AM

Okay! It kind of works!


I'm now suffering from a kind of 'bad handling', where i get some interference and then a big camera jump.. it's not exactly smooth..


Here's my messy work in progress :


Get mouse position:

		POINT p;

		// move into rect/window space
		p.x -= rWindow.left;
		p.y -= rWindow.top;

		// relative to rect/window centre
		//p.x -= (rWindow.right - rWindow.left)/2;
		//p.y -= (rWindow.bottom-rWindow.top)/2;

Then update the camera:

	if( pMouse->bRight == true )
		POINT mPos = pMouse->pos; // pixels
		mPos.x -= pMouse->prev.x;
		mPos.y -= pMouse->prev.y;

		if(mPos.x != 0 || mPos.y != 0)
			float hMag = _radians(millisElapsed * m_mouseSpeed * mPos.x);
			float vMag = _radians(millisElapsed * m_mouseSpeed * mPos.y);

			if( fabs(hMag) > _pi || fabs(vMag) > _pi)

			m_horizontalAngle -= hMag;
			m_verticalAngle -= vMag;

	//to rotate using quaternions euler angles as input.
	glm::mat4 R = glm::yawPitchRoll(m_horizontalAngle, m_verticalAngle, 0.0f);		
	//Then you could do the following to Update() a camera transformation:
	glm::vec3 T = glm::vec3(0, 0, -dist);
	position = glm::vec3(R * glm::vec4(T, 0.0f));

	m_direction = origin;// glm::normalize(position);
	m_up = glm::vec3(R * glm::vec4(m_real_up, 0.0f));
	m_right = glm::cross(m_direction, m_up);

	m_viewMatrix = glm::lookAt(position, m_direction, m_up);

Any suggestions?

In Topic: glm/opengl orbital camera C++

13 August 2014 - 11:42 AM

PS I <3 GLM.