|
a04.lqd wrote: my teacher give an exercise:
And that was to help you learn to do things for yourself, not to get someone else to do it for you. Read your course notes.
|
|
|
|
|
my teacher only introduce what is Bspline and give this exercise to me...
each student in my class is the same.
they have another exercise, different from my exercise , ex: use surface to draw a face, draw a car by benzier curve...
it is realy hard....
all informations i must find out
help me... thank you very much.
|
|
|
|
|
a04.lqd wrote: all informations i must find out
Yep, life is hard
|
|
|
|
|
Please read the posting guidelines. There's even no clear question in your message. You don't believe that somebody here will just provide you with the code, do you ?
Ask a precise question. Explain what you have tried and where you are stuck exactly.
|
|
|
|
|
a04.lqd wrote: how to draw BSpline by using mouse ???
Just press the left button and move the mouse following a BSpline shape (remember to choose the pen tool).
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
CPallini wrote: Just press the left button and move the mouse
Now why didn't I think of that?
|
|
|
|
|
GDI has a function called PolyBezier that can be used to draw b-splines.
|
|
|
|
|
Does anyone understand the bit-wise representations of #INF and #NAN for the type double? Or could you point me to some real information on the internet?
Also, what is the difference between Quiet NAN and Signaling NAN?
I have been trying to find it with google all morning and I have found a lot of claiming to know but no actual knowledge.
I know that for type float the bits are:
0x7FFFFFFF; // #NAN
0x7F800000; // #INF
I believe that for type double the bits would:
0x7FFFFFFFFFFFFFFF; // #NAN
0x7FF0000000000000; // #INF
However, this is just changing the exponent from 8 to 10 bits and assuming that if would be the same. I would feel much better if I could find some supporting documentation.
|
|
|
|
|
Isn't this [^] useful?
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Yes, and thanks. But I'm still kind of looking for a nice table like they have for the 32 floats. Don't want to make the table myself because I'm not the expert. Just want to be able to refer to the expert.
|
|
|
|
|
If you scroll up the page the nice table is there on the screen.
[edit]sorry I note those are not doubles, but I'm sure a bit of simple extrapolation will do it[/edit]
|
|
|
|
|
Thanks.
I was hoping to find such a table for double. Really, just a supporting documentation. I believe the values in my original question were correct.
|
|
|
|
|
If you're looking for NAN it may be either
0xFFFM
or
0x7FFM
i.e. sign bit may be either 0 or 1 and 52 bit-wide mantissa M != 0 is implementation-dependent (may carry additional info).
Of course this is going on my arrogant assumptions...
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
The values in my original question are correct. (I believe) Just looking for supporting documentation.
Thanks again for the time and thought you have put into this.
|
|
|
|
|
Well, while your values represent correctly NAN values, they (according to that Wikipedia page) don't cover all the possibilities.
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Sorry, I guess I didn't present that very well.
NAN is an exponent of 0x7FF with a non-zero mantissa.
INF is an exponent of 0x7FF with a zero mantissa.
Here are the actual fuctions I am using...
bool IsInf (double d)
{
const INT64 iInf = 0x7FF0000000000000;
if ((*(INT64*)&d & 0x7FFFFFFFFFFFFFFF) == iInf)
return true;
return false;
}
bool IsNan (double d)
{
INT64 exp = *(INT64*)&d & 0x7FF0000000000000;
INT64 mantissa = *(INT64*)&d & 0x000FFFFFFFFFFFFF;
if (exp == 0x7FF0000000000000 && mantissa != 0)
return true;
return false;
}
modified on Friday, November 27, 2009 3:04 PM
|
|
|
|
|
Hi All,
I have created COM component(dll) and created one client to use it, Please finnd the code of client:-
HRESULT hr = CoInitialize(0);
SCRIPTOBJLib::IScriptObjPtr sobj;
sobj->SetLanguage((unsigned short *)"VBScript");
CoUninitialize();
Please give me some solutions coz i tried every possible way.
Thanks A Ton
Ash_VCPP
walking over water is just knowing where the stones are.....
|
|
|
|
|
Ash_VCPP wrote: SCRIPTOBJLib::IScriptObjPtr sobj;
//sobj->QueryInterface(IId_,void* &vp);
You have not initialized sobj to an instance of anything.
|
|
|
|
|
Yes but i tried many ways as you can see it in commented code to initialize it, but getting error HRESULT value= -2147221164.
can you please suggest me how can i initialize com object with example regards of my code.
Thanks A Ton
Ash_VCPP
walking over water is just knowing where the stones are.....
|
|
|
|
|
Ash_VCPP wrote: can you please suggest me how can i initialize com object with example regards of my code.
You have the following declaration in your code
SCRIPTOBJLib::IScriptObjPtr sobj;
So you need to initialize sobj to an instance of SCRIPTOBJLib::IScriptObjPtr . The documentation should explain how to do this. If you do not understand instances of classes I suggest you refer back to he C++ documentation for guidance.
|
|
|
|
|
But i think initializing COM object is different from normal class, and if not then can you please show me few lines of code to initialize COM object, Because i am wondering with google since last two dyas.
Thanks A Ton
Ash_VCPP
walking over water is just knowing where the stones are.....
|
|
|
|
|
As I said in my previous entry you need to use the documentation; I have not used the library that you are working with. Perhaps some time reading through some of the COM articles here on CodeProject would be time well spent.
|
|
|
|
|
The HRESULT you have indicated is 0x80040152 - Could not find the key in the registry
Sounds like the COM object you are trying to use is not correctly installed or you are not using the correct ProgID.
Try using a CLASSID for your CreateInstance.
|
|
|
|
|
Hi Jeff,
I think the helpstring which we pass in idl file will be the progID please let me know if i am wrong,So here i am using below line to get the class id:-
HRESULT hres1 = CLSIDFromProgID(OLESTR("ScriptObj 1.0 Type Library"), &clsid);
But still i am getting the same error.I have seen registry entry for my dll and its there with the string i mentioned in above function.Please provide me some suggestions on this.
Thanks A Ton
Ash_VCPP
walking over water is just knowing where the stones are.....
|
|
|
|
|
If the return from this is 0x80040152 it is not being found in the registry. I suggest try the class id just as the next step of investigation. This HRESULT is either the client not registered correctly or using the incorrect ProdID.
|
|
|
|