|
Or you can use SharpDevelop editor (written in C#) from
http://www.icsharpcode.net/OpenSource/SD/Default.aspx
|
|
|
|
|
hello,
Thank you for attending my request.
I got a problem while I am rotating a 3D rendering scene using mouse,
ie by dragging mouse on screen .
I am using following formula for rotating the picture along x and y axis
m_angle1 -= (xx1 - xx2)/3.0;
m_angle2 -= (yy1 - yy2)/3.0;
glrotated(m_angle1,1,0,0);
glrotated(m_angle2,0,1,0);
xx1 ans yy1 are previous points on screen
xx2 ans yy2 are current points on screen
Rotation is happening correctly in one axis but not happening correctly in other axis. IF you have solution please give me.
regards,
vijay.
|
|
|
|
|
I have these excerpts from my code:
Is little bit more complicated:
WM_CREATE:
GetWindowRect(hMainWnd, &rw);
pc.x = (rw.right-rw.left)/2;
pc.y = (rw.bottom-rw.top)/2;
SetCursorPos(pc.x,pc.y);
#define BLOCKRANGE(a) if(a < - PIPE2-EPSILON) a =-
(PIPE2-EPSILON); \
else if (a > PIPE2-EPSILON) a =
PIPE2-EPSILON; // blocks the
range of angle to straight up/down
struct V3{
float x,y,z;
};
struct M4 {float m[4][4];};
class Camera:
{
V3 _angles; //euler angles (azimuth, elevation and roll)
V3 _lup; //up vector
V3 _lside; // side vector
V3 _lup; // up vector;
V3 _lpos; // camera position in space
void AnglesToDir()
{
REAL CosAz = COS(_angles.y);
REAL CosEl = COS(_angles.x);
REAL SinAz = SIN(_angles.y);
REAL SinEl = SIN(_angles.x);
REAL CosRl = COS(_angles.z);
REAL SinRl = SIN(_angles.z);
_ldir.x = SinAz * CosEl;
_ldir.y = SinEl;
_ldir.z = CosEl * -CosAz;
_lup.x = -CosAz * SinRl - SinAz * SinEl * CosRl;
_lup.y = CosEl * CosRl;
_lup.z = -SinAz * SinRl - SinEl * CosRl * -CosAz;
_lside = VCp(_ldir, _lup);
}
void Rotate(REAL a, REAL e, REAL r)
{
_angles.y += a;
_angles.x -= e;
_angles.z += r;
//ROLLPI(_angles.y);
BLOCKRANGE(_angles.x);
AnglesToDir();
}
}
static M4 MLook(V3& eye, V3& fwd, V3& up, V3& side)
{
M4 mret;
mret[0][0] = side.x; mret[1][0] = side.y; mret[2][0] = side.z; mret[3][0] = 0.0;
mret[0][1] = up.x; mret[1][1] = up.y; mret[2][1] = up.z; mret[3][1] = 0.0;
mret[0][2] = -fwd.x; mret[1][2] = -fwd.y; mret[2][2] = -fwd.z; mret[3][2] = 0.0;
mret[0][3] = 0.0; mret[1][3] = 0.0; mret[2][3] = 0.0; mret[3][3] = 1.0;
mret *= MTranslate(-eye.x, -eye.y, -eye.z);
return mret;
}
then you do:
void Your_RenderScene()
{
Camera cam;
//position
cam._wpos.x= YOUR_XPOS;
cam._wpos.y= YOUR_YPOS;
cam._wpos.z= YOUR_ZPOS;
//rotate
POINT pct;
GetCursorPos(&pct);
int dx = pct.x - pc.x;
int dy = pct.y - pc.y;
cam.Rotate((REAL)dx/128.f,(REAL)dy/128.f,0);
SetCursorPos(pc.x,pc.y);
// transform
cam.AnglesToDir();
M4 tm = MLook(cam._wpos, cam._ldir, cam._lup, cam._lside);
glPushMatrix();
glLoadMatrixf((REAL *)&tm);
//////render your object here
glPopMareix();
}
|
|
|
|
|
I would pay money for a reliable app that slaps the hands of any other app that tries to steal focus on Windows.
I am truly sick of clicking and alt-tabbing back to the app I was working with because something loading in the background wanted my attention.
The TweakUI/PowerToys applet does not work. We need something that does.
Oh, and an article explaining how it works would be swell.
regards,
Paul Watson
Bluegrass
South Africa
Brian Welsch wrote:
"blah blah blah, maybe a potato?" while translating my Afrikaans.
Crikey! ain't life grand?
|
|
|
|
|
This is hard as Microsoft rewrote the order of who wins for window activation, and who can steal from whom in Windows 2000. It's _very_ annoying, Internet explorer does this to me all the time.
Cheers,
-Erik
|
|
|
|
|
Maybe I am coming at this from too simple a viewpoint, but the only way another window should get focus is if the user gives it focus.
That would make it simple. Apps that need your attention can do the taskbar blinking event and then if the user is not knee deep in something requiring focus, they can click on it or alt-tab to it.
For crikeys sake, why does the splash screen of some apps need to grab the focus? *paul glares at Photoshop and Fireworks in particular* that is just nuts. I left them to load in the background on purpose.
But I hear what you are saying. They have made it complicated, too clever for it's own good.
regards,
Paul Watson
Bluegrass
South Africa
Brian Welsch wrote:
"blah blah blah, maybe a potato?" while translating my Afrikaans.
Crikey! ain't life grand?
|
|
|
|
|
Paul Watson wrote:
For crikeys sake, why does the splash screen of some apps need to grab the focus?
Worse, some splash screens are always on top - you have to sit there waiting while they load - you can't go onto something else while you wait!
|
|
|
|
|
Mabye some lamely-written app has turned your foreground lock timeout down to zero? What value gets returned by this?
DWORD dwTime;
SystemParametersInfo ( SPI_GETFOREGROUNDLOCKTIMEOUT, 0, &dwTime, 0);
cout << dwTime;
--Mike--
Ericahist | CP SearchBar v2.0.2 | Homepage | RightClick-Encrypt | 1ClickPicGrabber
You cannot stop me with paramecium alone!
|
|
|
|
|
It returns 200000. That good or bad?
And thanks to leppie for cluing me up as to how to run the code. *Paul gingerly closes down the C++ files*
regards,
Paul Watson
Bluegrass
South Africa
Brian Welsch wrote:
"blah blah blah, maybe a potato?" while translating my Afrikaans.
Crikey! ain't life grand?
|
|
|
|
|
|
ok till now we had databases which could be manipulated from
webpages. i wan to do this with a phone line.
i know i need a IVR but any one knows where to start off from and how to get it done cheaply?
Sparks
|
|
|
|
|
First you need to decide on the hardware the you will be using. What will be receiving the call, a modem or a proper phone switch?
Once you have your hardware decided, you can then decide the best software approach. Lots of phone switches will already have IVR software written that could be adapted.
Most phone switches either support TAPI or have their own API's with which you can write your own IVR
With a modem, you'll be stuck with TAPI and a lot will depend on what the modem drivers support.
Finally, it won't be cheap. Telephony hardware isn't cheap and telephony developers aren't cheap either ... I should now, I am one.
Michael
'Logic, my dear Zoe, merely enables one to be wrong with authority.' - The Doctor: The Wheel in Space
|
|
|
|
|
i agree Modems are no good so don't waste ur time there
go for proper switch it is expensive but worth it
and go for telephoney deveoplers they are not CHEAP !
Live as if your were to die tomorrow. Learn as if you were to live forever.
-Mahatma Gandhi
|
|
|
|
|
Hello All,
I work in the Wireless Industry and have most of
my experience in developing Engineering tools
and Test Applications.
In the process I have discovered that source and config management
for all of these different test apps is a pain in the rear.
So, what I have come up with is this architecture.
One GUI Application (Client).
Multiple Test Servers (GUIless Applications).
It is basically a Generic GUI that connects to multiple
test servers. The test servers utilize COM categories
and derive from a common interface that the Generic GUI
can use.
Does anyone have the desire to read this article or download the code?
Thanks,
Mike "Cop" Pulice
mike@puliceworx.com
|
|
|
|
|
Yes please!
I was looking for something similar a little while ago but really struggled to find anything. Most of the testing articles seem to be appreciated at Code Project.
If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts you aim;
Yours is the Earth and everything that's in it.
Rudyard Kipling
|
|
|
|
|
Anyone interested in a hierarchy model for ports?
Something like
CPort
- CSerial
- CUSB
Mike "Cop" Pulice
mike@puliceworx.com
|
|
|
|
|
yes could you discus it or publish an article for it
especially the USB port
Mhmoud Rawas
------------
Software Eng.
|
|
|
|
|
yeah definitely !
bring it on.
|
|
|
|
|
Has anyone tried developing .NET apps for the X10 Activehome products? This basically entails sending and receiving packets through a serial port, which then sends a signal through your power lines to control lamps, appliances, etc. Tricky part is that the transmissions have to synchronize with the frequency of the AC power line! Tutorial and samples for monitoring COM ports are here:
http://msdn.microsoft.com/msdnmag/issues/02/10/NETSerialComm/
And the X10 protocol for the power line interface is here:
ftp://ftp.x10.com/pub/manuals/technicalnote.pdf
Any input is welcome. The Activehome kit is a pretty nifty little toy and could make for some interesting programming applications.
|
|
|
|
|
Hi,
It actually sounds like a nifty idea. Everyone seems to have a serial port and the interface protocol is a bonus; however, if there is no hardware with which to interface, it's difficult to do the testing.
I think it would be rather keen to create devices (such as infrared receivers) to be able to provide the ability to dim and/or turn on/off lights. (i.e. from the home entertainment system remote control.)
Regards,
Joe
|
|
|
|
|
Is this stuff available in the UK?
My wife is disabled, and among other things has problems with light switches, etc, although she can use a PC, so this would be quite interesting...
Steve S
|
|
|
|
|
I have to impelement my own double pow(double x , double y)
I cannot use of math library any ideas
Ctrl+Alt+Del
|
|
|
|
|
it helps if you understand what POWER means...
in primary school, we learnt that 2^5 = 2*2*2*2*2
so x^y = x1*x2*x3*x4*...*xj where j=y
you don't need any maths libraries...
i hope this helps with you homework...
Nik Vogiatzis
PhD Candidate: University of South Australia
+++++++++++++++++++++++++++
Developing new generation Traffic Micro-simulation Tools for Traffic Engineers
em: nikolaos.vogiatzis@unisa.edu.au
|
|
|
|
|
In high school, we learned that you can raise numbers to non-integer powers. Although your 'algorithm' would be applicable if the request was for double pow(double x, int y), things become more complicated for double y, typically involving logarithms.
|
|
|
|
|
yup...
sounds reasonable... it's been a VERY long time since i was at either primary school or high school, but your response sounds reasonable...
either way, this sounds like a 'homework' question, and i think our friend needs to do their homework by looking up the alorithms either on the net, or in their maths book...
cheers
nik
Nik Vogiatzis
PhD Candidate: University of South Australia
+++++++++++++++++++++++++++
Developing new generation Traffic Micro-simulation Tools for Traffic Engineers
em: nikolaos.vogiatzis@unisa.edu.au
|
|
|
|