|
you have written past the end of the memory you allocated.
|
|
|
|
|
You've written in the memory block beyond the allocated memory size. If you are using the pointer arithmetic, check for your logic for advancing through the items in the array. Check for your memory writing logic too...
|
|
|
|
|
hello Friends
I am having one rotation matrix [3x3] of one object at some position,and then I rotate at some angle that object and i found the rotation matrix[3x3] at that place also.
How can I found the offset of object in matrix[3x3] from one place to other?
And then how can i add the offset to rotation matrix?
I know this is not related to c++ but too many genious are here on this Forum.And after all i have to implement it in c++
Any Ideas?
Thanks In Advance.
Regards
Yogesh
|
|
|
|
|
I'm assuming you have an affine transformation matrix M as defined here[^].
The translation component is in the last column. When you add some number to M[0,2] you shift horizontally; to M[1,2] you shift vertically.
Therefore, if the object gets translated (not rotated, not scaled, not sheared) from one position to another, just look at the difference of the respective M[0,2] and M[1,2] values. BTW: Once a rotation/scaling/shearing occurs in between, the "translation" becomes ambiguous.
Suggestion: whatever transformation you do, watch what it does to the matrix, and things should become pretty clear.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Hello Luc, You are Right..I am using transformation Matrix.
I am having two matrix one with original value and other iwth final matrix values but no idea of getting the difference between them.
Thanks for your reply.
regards
yogesh
|
|
|
|
|
yogeshs wrote: I know this is not related to c++...i have to implement it in c++
Yeah, that's not confusing at all.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Some people are making such thorough preparation for rainy days that they aren't enjoying today's sunshine." - William Feather
|
|
|
|
|
Hi Guys,
Looking for help in finding Timestamp of a text file.
i have tried googling ,seems Stat can help but dont know how to use it.
any help is much apprciated.
Thank you.
vikas da
|
|
|
|
|
stat is probably not used so much theses days, GetFileTime() [^] will probably be what you need.
The best things in life are not things.
|
|
|
|
|
Sorry! Dint get your question.
Do you want file creation time?
|
|
|
|
|
I didn't post a question, I posted an answer.
The best things in life are not things.
|
|
|
|
|
|
Hi,
I am drwaing image using Image::DrawImage and same image using CDC::BitBlt with same x,y position.
But both methods are drawing image on diffrent axis(x,y). How could I draw on same position for both?
|
|
|
|
|
show code snippet or give more info..
|
|
|
|
|
using BitMlt:
CRect rect;
this->GetWindowRect( &rect );
this->GetParent()->ScreenToClient( rect );
CBitmap img;
CDC dc;
BITMAP bmp;
img.LoadBitmap(m_nImageID);
img.GetBitmap(&bmp);
CDC* pDC = this->GetDC();
dc.CreateCompatibleDC(pDC);
CBitmap* pOld = dc.SelectObject(&img);
pDC->BitBlt(rect.left, rect.top, bmp.bmWidth, bmp.bmHeight, &dc, 0, 0, SRCCOPY);
using Image::DrawImage
CRect rect;
this->GetWindowRect( &rect );
this->GetParent()->ScreenToClient( rect );
m_img = Gdiplus::Bitmap::FromResource(GetModuleHandle(0),MAKEINTRESOURCE(nImage));
grpx.DrawImage(m_img, 0, 0, m_img->GetWidth(),m_img->GetHeight());
|
|
|
|
|
What are the values of rect.left and rect.top in case 1?
The best things in life are not things.
|
|
|
|
|
left = 50 and top = 50 in both cases
|
|
|
|
|
Fine, but in the second case you are drawing at Point(0, 0) !
The best things in life are not things.
|
|
|
|
|
grpx.DrawImage(m_img, 0, 0, m_img->GetWidth(),m_img->GetHeight());
why don't you try using same rect.left and rect.top instead of 0,0 in drawimage??
Regards,
Gopinath.
|
|
|
|
|
Hello
How can i create one button for two events?
For example: I want to have one button for start/stop.
At the beginning of the application button name is start (start the event ), when I click the button second time it change the name to Stop (stop the event)????
I am very new to C# programming, i know to do this in VB6... Sorry for my bad english!
ThankYou
|
|
|
|
|
This is in the wrong forum, try the C# forum next door...
|
|
|
|
|
About the best redirect I've seen here. +5
Peter
Software rusts. Simon Stephenson, ca 1994.
|
|
|
|
|
glad you liked it...
|
|
|
|
|
|
Hi
Any sample or help?
Thanks
www.logicsims.ir
|
|
|
|
|
Hi,
Take a look at thisexample, it does detail the AT codes etc that may help you...
|
|
|
|