|
Hi guys~ I need to build a 3D map system that will accept 2 inputs from users (the current location and the destination user wants to go), by clicking, then the system will generate a path from the current location to the destination.
At first I planed to use OpenGL to do so....but I faced one problem. The exporter that I used can only extract the vertices of the model I built in 3DsMax, not included the texture mapping! I already done nice mapping in 3DsMax and I think it takes time to do mapping in OpenGL.(total up 15 buildings need to be mapped)
Therefore, I switch to VRML (because the 3DsMax can export the model to VRML file with texture mapped)but I found VRML is dead and not powerful at all. Then I switch to Java3D but I heard someone says this programming is dying and will run slow! The most powerful tools for 3D Graphics Application still belongs to--->OpenGL!! And now I stuck here~Time passed away quickly and I still not yet done my system!
I need some help from you guys and suggestions, advices from you all~Please...please help~~~~sob sob////
I more familiar with OpenGL if compared with Java3D and VRML(both I learned 3 days ago only,very unfamiliar~)
I wish to extract the model(with texture mapped) to OpenGl then I can quickly concerntrate on my system(my due date for this project is coming soon)
Thanks a lot!
|
|
|
|
|
Hi,
I want to expose a structure to C# code from the VC++ .
C# Code:
void AccessStructure()
{
structExample st;
st.x[0] = 4;
//Calling VC++ function
MyC++Func(st);
}
Structure declaration in vc++:
public ref struct structExample
{
public:unsigned char x[2];
public:int y;
};
VC++ function
void MyC++Func(structExample ^ stEx)
{
}
When Compiling the VC++ code i do get the following error
error C4368: cannot define 'x' as a member of managed 'structExample': mixed types are not supported
And also,
Is it possible to pass the structure as value type in the above case
Thanks in Advance
Regards
Sangeetha
|
|
|
|
|
This might help but certainly there is a more elegant way to achieve this:
public ref struct structExample
{
public:
structExample()
{
x = gcnew array<unsigned char>(arraysize);
}
array<unsigned char>^ x;
private:
literal int arraysize = 2;
};
|
|
|
|
|
Can anyone point me to some reading material or examples that would allow me to change a simple test menu program like this:
<br />
#include <iostream><br />
using namespace std;<br />
<br />
void main()<br />
{<br />
int iChoice;<br />
<br />
cout << "Choose one... " << endl << endl;<br />
cout << "1. First" << endl;<br />
cout << "2. Second" << endl;<br />
cout << "3. Third" << endl;<br />
cout << "4. Fourth" << endl << endl;<br />
<br />
cin >> iChoice;<br />
<br />
switch (iChoice)<br />
{<br />
case 1:<br />
if (iChoice == 1)<br />
cout << "First" << endl;<br />
break;<br />
case 2:<br />
if (iChoice == 2)<br />
cout << "Second" << endl;<br />
break;<br />
case 3:<br />
if (iChoice == 3)<br />
cout << "Third" << endl;<br />
break;<br />
case 4:<br />
if (iChoice == 4)<br />
cout << "Fourth" << endl;<br />
break;<br />
default:<br />
cout << "Not a valid choice." << endl;<br />
}<br />
}<br />
into a console application that uses the up and down arrows to make a selection inside of the menu box instead of typing in "1" and then "Enter"? I would like to be able to open the program with the list of options inside of a colored box and output the result into another colored box.
-- modified at 4:36 Friday 10th March, 2006
|
|
|
|
|
is your question .NET framework relative ?
|
|
|
|
|
I am working in the Visual Studio .net environment. No matter where I look, it seems I can't find any solid information on creating a simple DOS shell console application that uses keyboard events to make an up down selection menu.
|
|
|
|
|
I'd be surprised if there is such support in .NET for menus on a console window.
The way it was done in DOS is to output the hi-lighted menu item with inverted colors.
Mainly your program will wait for a key stroke and then pass the stroke when it arrives to a switch statement. The switch statements determines which menu items need to be re-output to the console screen - and with what colors (inverted/regular).
Note that you need to use positioning functions to be able to output text in the same spot with different colors.
I have not implemented this with the recent CRTs - so, I'm not sure what the exact function names are.
gmileka
|
|
|
|
|
If you need menu in doos shel, then you must use graphic ap0proach of programing and itersept cursor key.
or:
when you press up or down key, then clear scrren and selected menu shoud be diffrent color or higlitet
|
|
|
|
|
Hi,
i have an application which is running as a windows service,
it's purpose is to poll different sensors in a specific interval. No problem so far and with .Net memory profiler i was able to reduce the memory consumption drastically (allocs are almost -> 0 byte/s).
But now the downside, my idea was to present the sensors data on a ASP.NET page. My first thought was using a webservice to connect the windows service with the IIS. However after reading a comparison between Remoting vs. Webservices i decided to do remoting with an IPC channel.
So far so good, i have implemented a very light Remoting object, in addition i use the IPC channel and binary formatters. But when my application was finally running i discoverd that each remoting call will take around 8 KB of memory! Furthermore it allocates at least 178! Instances of differnt .Net classes for each call.
Imagine that i have to update my data on the IIS every second and addionally i have more than one sensor. This would mean for example that 5 Sensors would cost 40 KB or more memory per second, surely the garbage collector will take care of it. But how long will it take until i get in serious memory trouble (like Memory Pressure by the framework)? I saw that the garbage collector is triggered every 10 s in the current setup (without remoting it's between 45 min - 2h)
There are a couple of Questions:
1. Is it possible to reduce the memory consumption of .Net remoting? (i saw no difference between singleton & singecall)
2. Is remoting not the right choice for my task?
BTW: The service is written in C++/CLI, the logic and pages on the IIS are in C#.
I would really appreciate any help! If needed i could also publish some code to resolve the issue.
ThanX Tobias
the remoting Interface (each call of GetIndex costs 8KB):
public interface class IRemotingLink
{
ArrayList^ GetSensorKeys (void);
array <unsigned char>^ GetIndex (String^ pSensorGuid, unsigned char pIndex);
array <array <unsigned char>^>^ GetIndices (String^ pSensorGuid);
bool SetIndex (String^ pSensorGuid, unsigned char pIndex, array <unsigned char>^ pIndexContent);
};
-- modified at 2:34 Friday 10th March, 2006
|
|
|
|
|
|
You really think people here will do your homework for you ?
If you want an answer, post specific questions and post what you already did.
|
|
|
|
|
thk for u all...i knw my fault...
i cant do tat like tis...sorry for disturd u all....
very apologize wit it....
|
|
|
|
|
|
|
yup, typo...
|
|
|
|
|
cusack! this is professor ulhas from the university. it told all of student to not cheat by gone to cpian and make others doubt the homework. but here i see u cheating. when i heard of this i wanted to slice my tongue open and a salted knife. that is how much ur cheatin hurts me. now u get black grade and fail.
Sincelery yours, Computer Information conSciences Professor and grader, Sharada Ulhas
|
|
|
|
|
thk for u all...i knw my fault...
i cant do tat like tis...sorry for disturd u all....
very apologize wit it....
im 2 care of my homework...
i scare will fail...i really no idea how 2 done..
whatever,i will take more time to revision all the things...
thk a lot
|
|
|
|
|
This CP forum is for people who can't continue their work, becase of the problem they can't solve. If you have a problem then ask if you want to other make your program, then don't even ask and start thinking.
|
|
|
|
|
i will not give up, i will convet this if its the last thing i do....
i am getting better though!!
void ManagedReadVoltage::ManagedDAQmxBaseCreateTask(const char taskName __gc[], TaskHandle *taskHandle)
{
DAQmxBaseCreateTask(taskName,taskHandle);
}
i am stuck here, i get this error...
'DAQmxBaseCreateTask' : cannot convert parameter 1 from 'const char __gc[]' to 'const char []'
the orginal code...
void UnmanagedReadVoltage::UnmanagedDAQmxBaseCreateTask(const char taskName[], TaskHandle *taskHandle)
{
DAQmxBaseCreateTask(taskName,taskHandle);
}
i have looked on google, but i can't get it working..anyway i need some sleep
thanks
|
|
|
|
|
|
Here is the code:
<br />
#include "class2.h"<br />
<br />
class A<br />
{<br />
public:<br />
A(void) {}<br />
~A(void) { if ( _cls2) delete _cls2; }<br />
public:<br />
void Create(void) { _cls2 = new B(this); }
void Display(void) { printf("from A"); }<br />
private:<br />
B * _cls2;<br />
};<br />
<br />
#include "class1.h"<br />
<br />
class B<br />
{<br />
public:<br />
B(A * ptr) : _cls1(ptr) {}<br />
~B(void) {}<br />
public:<br />
void Do(void) { _cls1->Display(); }<br />
private:<br />
A * _cls1;<br />
};<br />
But I got error on compiling
How to solve it?
|
|
|
|
|
in one of the files, before the definition of the class, declare the other one.
for example :
class A;
class B {
};
|
|
|
|
|
You mean combine two .h files into one .h file?
Is it possible to solve it in two .h files?
THX for your quick reply
|
|
|
|
|
shaohao wrote: You mean combine two .h files into one .h file?
no
file A.h
#include "B.h"
class A {
};
file B.h
#include "A.h"
class A;
class B {
};
|
|
|
|
|
But I think it should be:
<br />
file A.h<br />
<br />
#include "B.h"<br />
<br />
class A {<br />
};<br />
<br />
file B.h<br />
<br />
class A;<br />
<br />
class B {<br />
};<br />
Any idea?
Is it right?
-- modified at 9:11 Friday 10th March, 2006
|
|
|
|