|
lhayes00 wrote: 1. What are barycentric coordinates?
I think it refers to the coordinates relative to center of mass of the system ( well barycentre conceptually differs from center of mass, but it doesn't probably matter here).
See for instance
http://en.wikipedia.org/wiki/Center_of_mass[^].
lhayes00 wrote: 2. Are they just for 3D graphics?
No.
lhayes00 wrote: 3. When to use them?
Using CM coords usually simplify motion equations.
lhayes00 wrote: 4. How to use them?
You have to:
(1) calculate the position of the center-of-mass of the system (say CM ).
(2) express all the coords relatively to CM .
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
[my articles]
|
|
|
|
|
|
lhayes00 wrote: Thanks for the link. Via that wiki link I found the one below. How are there 3 ordinates per coordinate on this 2D triangle?
(please reformulate)
However maybe that Barycentric Coordinates really refers to the following, rather specialized concept
http://mathworld.wolfram.com/BarycentricCoordinates.html[^]
You can also try to ask the guys of the Graphics forum.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
[my articles]
|
|
|
|
|
Hi,
In my application, I have to use a rich edit control which will only accept numeric values. It should not allow the user to enter the text i.e the when the user presses any alphabets..rich edit should not display.
Any pointers would be greatly appreciated.
|
|
|
|
|
Hi
Go to richedircontrol properties..change readonly property false...
#sanroop#
|
|
|
|
|
johnalek wrote: change readonly property
|
|
|
|
|
Then it would not be possible for the user to enter anything in the rich edit control through the keyboard if it's a control with Read Only Property set to true.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
_AnShUmAn_ wrote: Then it would not be possible for the user to enter anything in the rich edit control through the keyboard if it's a control with Read Only Property set to true.
While johnalek's suggestion had nothing to do with the OP's question, an edit control whose Read-Only property is set to False means it can be interacted with via the keyboard.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
ReadOnly or Number!?
|
|
|
|
|
Probably you need something like this:
void CMyDlgDlg::OnEnChangeRichedit21()
{
CString str;
m_richedit.GetWindowText (str);
bool flag = false;
for ( int i = 0 ; i < str.GetLength () ; i++)
{
if(str.GetAt (i) >= '0' && str.GetAt (i) <= '9')
{
flag = true;
}
else
{
m_richedit.SetWindowText (lastCorrectText);
flag = false;
break;
}
}
if(flag)
lastCorrectText = str.Left(i+1);
m_richedit.SetSel(-1,-1);
}
Optimize the code for ur use now. I haven't tested it but hope that it works
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
|
It seems you set Number style for RichEdit of property window or with code?
|
|
|
|
|
Setting the ESNUMBER style is a great solution, but (at least it happens in the CEdit) then you won't be able to use floating point values like 12.3 or 12,3.
If you need to use floating point values the only thing I can think of is to extend the RicheditControl implementing a new class and implement a filter like _AnShUmAn_ has told you.
Hope this helps.
Best regards,
|
|
|
|
|
Hi
iam doing Chat application with out language pack installation .In this when i paste chinese characters in rtf .
And sending from rtf to Html chinese characters r converting pair of 8-bit codepoints. i need help how to convert pair of 8-bit codepoints to decimal value ...plz tell...
#sanroop#
|
|
|
|
|
Does it mean that you need to convert a byte pair to an int?
you can do this the following way
BYTE byte[N];
int k;
...
int i = byte[2*k] + byte[2*k+1] * 256;
or
where <code>k</code> is the pair number.
...
int i = byte[2*k+1] + byte[2*k] * 256;
depending on encoding order.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
[my articles]
|
|
|
|
|
class Exception{};
//warning C4290: C++ Exception Specification ignored
void ExceptionSepcification()throw(Exception)
{
throw Exception();
}
void WithOutExceptionSepcification()
{
throw Exception();
}
void main()
{
try
{
ExceptionSepcification();
//Or call
WithOutExceptionSepcification();
}
catch(Exception& e)
{
cout<<"Exception caught";
}
}
Both the Function ExceptionSepcification and WithOutExceptionSepcification throws Exception.
The what does the throw in Below statement makes difference
void ExceptionSepcification()throw(Exception)
VIBIN
"Fool's run away,where angle's fear to tread"
|
|
|
|
|
Essentially it's just a hint to the Compiler bu the exact answer is both Compiler and Compiler Option Switch dependent. See MSDN[^] for an explanation of Microsoft's attempts at C++ Exception support.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
|
Hi,
can somebody tell me how to get the handle of edit box of a combobox in win32 environment.
Thanks
|
|
|
|
|
|
|
Thanks to both of you. My problem is solved now, after using the above mentioned function.
|
|
|
|
|
Hi all,
So far, I have had several projects in which I have used Office automation. Although this is always a pain in the #@# due to the lack of proper documentation, I have so far always succeeded. Now, I am trying the same thing, using office 2007. In itself, this looks a lot the same, but Microsoft wouldn't be Microsoft if they hadn't changed a few things here and there! Where for example the _Application used to have a GetWorkbooks method (I am now talking about excel automation), the _Application has been changed to Application, and it no longer has a GetWorkbooks method. In turn, it now has the "Workbooks" item. This item returns a VARIANT, rather than an LPDISPATH, which means that - when compiling - I get the error "no operator defined which takes a right-hand operand of type 'struct tagVARIANT'" when I use the code:
Application Excel;
Workbooks Collection;
COleVariant vOpt....;
Collection = Excel.Workbooks (vOpt);
How do I go about this? Does anyone have any suggestions? The Microsoft "documentation" of course remains silent on the subject (or at least, I have not been able to find any usefull information)
Thanks in advance,
William
|
|
|
|
|
William Engberts wrote: The Microsoft "documentation" of course remains silent on the subject
What documentation? Provide a link to the documentation you are referencing.
|
|
|
|
|
Hello All,
I want to use ffmpeg for creating FLV file in my Application.
Anybody know how to use ffmpeg library in win32 project?
Thanks in advance.
Manish Patel.
B.E. - Information Technology.
|
|
|
|