|
joost.versteegen wrote: have a nice weekend!
Thank you! You too!
Cheers,
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
hi,
i have drawn a cube in tao framework in c#.i want to draw a big container(truck) and some small packages(boxes ).These boxes will be packed in the big container.The color of the boxes should be of different colors pertaining to a particular customer.Plz help me out.
regards
aurosikha
|
|
|
|
|
hi all.
i have some problem in using directx to show 3d model in windows.
1.I loaded some .x file in c# and want to rotate them.but there is some problem .when a object rotate some of it's side disappear.
2.problem is that how can i set center of my object for rotate object around it not around Coordinate System .
3.when i assign some bitmap on my object it repeat many time on object surface.
i want to it cover all of my object no tile on it.
its code:
device.Transform.World =
Matrix.Scaling(handle.XScale, handle.YScale, handle.ZScale) *
Matrix.RotationZ(Geometry.DegreeToRadian(handle.ZRotate)) *
Matrix.RotationY(Geometry.DegreeToRadian(handle.Yrotate)) *
Matrix.RotationX(Geometry.DegreeToRadian(handle.XRotate)) *
Matrix.Translation(handle.X, handle.Y, handle.Z);
for (int i = 0; i < handle.MeshMaterial.Length; i++)
{
device.Material = handle.MeshMaterial[i];
device.SetTexture(0, handle.MeshTexture[i]);
handle.mesh.DrawSubset(i);
}
handle is my object that contains my 3d info.
sepel
modified on Wednesday, September 24, 2008 3:18 AM
|
|
|
|
|
anyone have links, magazine articles, book titles, or open source project references
question 1:
what are some algorithms available to simulate how ms word draws each page as i scroll through 1000+ page document. Assuming the whole document cannot be loaded+drawn in memory all at once. How does the buffering work?
Realistically i'll be rendering a printed circuit board that might have many circles, rectangles using filled polygons. If the user zooms in, a given polygon might border the canvas and outside region. how would this partially on screen object be drawn? Should i send my canvas containing perspective+coordinate to all the objects and have the actual objects draw themselves to the canvas. Each shape will need to know how to partially render itself.
are there any advanced articles in this subject?
question 2:
what are some algorithms for
snapping to grid,
when connecting components how auto route lines (shortest route + no overlapping.)
thanks,
-lm
|
|
|
|
|
I need some 3D Models ( cars, people, trees etc. )
Where can I download them from and use them LEGALLY in my applications.
My applications are non-commercial. But I may upload them in codeproject.
Thanks in Advance.
|
|
|
|
|
I forgot to mention. I don't want to pay for the models.
|
|
|
|
|
AmitDey wrote: I don't want to pay for the models.
Of course.
You didn't say what formats but here are a couple of links I've been sitting on for years.
3D Archive[^]
Great Buildings[^]
If you don't have the data, you're just another a**hole with an opinion.
|
|
|
|
|
I want format supported by XNA (.fbx)
But I can convert 3D Studio (.3ds) , DirectX (.x) file using blender to .fbx
|
|
|
|
|
a design that is simple but can make others shock when they see it..
anyone.. pls help me..
|
|
|
|
|
Black font on black background - shockingly simple.
Or what about mintgreen font on pink background, frame and title bar in all rainbow colours... nausea guaranteed.
|
|
|
|
|
Hey everyone, do you know particle deposition?it is an algorithm used to create 3D models. By any chance,does anyone here knew bout this algorithm?thanks
|
|
|
|
|
hello friends,
how can i make a simple, soft and nice brush like that is in the microsoft paint?
My solution was to draw consecutive circles in my mouse drag event and add them to the array list and then repaint all circles in the array list. but some of the events of mouse drag are missed and this make my brush dotted. i want to know how can i make it more smooth. please guide me.
thanks
|
|
|
|
|
You can use a pen instead. First adjust the width of your pen. Then set StartCap and EndCap of the pen to LineCap.Round. Finally draw lines, instead of 'points', from the previous point to the current point, in the mouse move event.
|
|
|
|
|
|
The best way to handle this situation is to use an interpolation function to create a curve that smoothly joins the input points of the mouse.
The easiest pseudo sample is below, but you can expand it to use bicubic or any spline function.
void DrawPoint( double x, double y )
{
...paint single brush dab.
}
void DrawLine( double x0, double y0, double x1, double y1, double spacing )
{
double dx = x1-x0;
double dy = y1-y0;
double dist = sqrt( dx * dx + dy * dy );
dx *= 1.0 / dist;
dy *= 1.0 / dist;
for ( double p = spacing; p <= dist; p+= spacing ) {
double px = x0 + p * dx;
double py = y0 + p * dy;
DrawPoint( px, py );
}
}
void MyPaintCode( )
{
for ( int i = 0; i < NumberofPoints; i++ ) {
PaintLine( Input_x[ i ], Input_y[ i ], 1.0 );
}
}
|
|
|
|
|
Hey guys
So today a bought a webcam, now i want to capture the video, or rather for starters just display the feed on a panel.
Ive googled till im blue in the face(and will continue after posting this), i simply cant find a MINIMALISTIC article or tutorial on how to do this. From what I've read i need to use DirectShow...
Can someone please help?
Thanks
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.Passion != Programming & you.Occupation == jobTitles.Programmer)
1000100 1101111 1100101 1110011 100000 1110100 1101000 1101001 1110011 100000 1101101 1100101 1100001 1101110 100000 1101001 1101101 100000 1100001 100000 1100111 1100101 1100101 1101011 111111
|
|
|
|
|
You can certainly use DirectShow although you've got to love COM to do it and the documentation sucks. If you're using XP, an alternative is OpenCV[^] which probably has the functionality you want built in. If you're using Vista, the capture parts of OpenCV are broken because they use VFW and that's not supported on Vista, although the camera display parts are ok since they're DirectShow based. There's a very active OpenCV group on Yahoo, if you get interested.
If you don't have the data, you're just another a**hole with an opinion.
|
|
|
|
|
Google for "Windows Image Acquisition webcam".
|
|
|
|
|
Advertising is expressly forbidden in the forums. Buy advertising space like everyone else. That alone will make you far more legitimate than stealing free space in a forum.
|
|
|
|
|
Hi,
I am writing an aplication where I would like to use the method of picking the object using their id color.
I use the glReadPixels function to read the color under the cursor, but it always send back the null values. I don´t know what I am doing wrong.
Here is my sample code:
picking(int x, int y)
{
glDisable(GL_DITHER);
glDisable(GL_LIGHTING);
glClearColor(0,0,1,0);
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
/* drawing */
glColorub(50,50,50);
glutSolidSphere(0.7, 20, 20);
glPushMatrix();
glPushName(1);
glColor3ub(255,0,0);
glRotatef(90,0,1,0);
glutSolidCone(0.6, 4.0, 20, 20);
glPopName();
glPopMatrix();
glPushMatrix ();
glPushName(2);
glColor3ub(0,255,0);
glRotatef(-90,1,0,0);
glutSolidCone(0.6, 4.0, 20, 20);
glPopName();
glPopMatrix();
glColor3ub(0,0,255);
glPushName(3);
glutSolidCone(0.6, 4.0, 20, 20);
glPopName();
glPopMatrix();
unsigned char pixel[3];
GLint viewport[4];
glGetIntegerv(GL_VIEWPORT,viewport);
glReadPixels(x,viewport[3]-y,1,1,GL_RGB, GL_UNSIGNED_BYTE,(void*)pixel);
/* just to see the result - always null */
byte a = pixel[0];
byte b = pixel[1];
byte c = pixel[2];
}
Thank you in advance for your help, Tomas
|
|
|
|
|
Have you checked glError after your call to glReadPixels? Probably won't tell you much, but just wondering.
Sounds like the x, y are out of bounds.
- S
50 cups of coffee and you know it's on!
A post a day, keeps the white coats away!
|
|
|
|
|
I am digging deep here: 999 times out of a thousand I can eventually find the information I need without posting on forum(s) [looks like I must be upto the thousand tolerance level ]
"Since a single mouse position has only two degrees of freedom, a pair of positions—the ends of an arc—are used.This part of Arcball has wider applicability, including a translation controller to be described in a future paper." "ARCBALL: a user interface for specifying three-dimensional orientation using a mouse",Ken Shoemake,September 1992,Proceedings of the conference on Graphics interface '92
1992, 16 long years ago.This is about the mysterious 'translation controller to be described in a future paper'. Does anybody know if that future paper materialised over the last 16 years? The last cited Shoemake paper I could find was: "Arcball rotation control",Ken Shoemake, August 1994 Graphics gems IV. And most of his other papers seem to diverge into the discipline of animation.
My conclusion so far is that Shoemake never got around to doing that 'translation controller' paper, or my understanding of that term is different to what he meant.
OR
Does anyone know of published works/papers by other authors that continued in Shoemake's footsteps towards describing a translation controller. Just to clarify: A brief description of my understanding of 'translation controller' can be found in my post(s) here
modified on Tuesday, September 16, 2008 10:56 AM
|
|
|
|
|
|
This[^] looks like it might cover what you're looking for. However, the link to the code no longer works. I seem to remember that when I was playing seriously with OpenGL, Mark Kilgard had some examples that used Arcball and the arrow keys to let you zoom, pan, etc, as well as rotate the object. I think there was something I didn't like about the implementation and changed it to better match my intuition.
If you don't have the data, you're just another a**hole with an opinion.
|
|
|
|
|
Thanks for that Tim. But I have already found that. It seems to actually talk about extending/handling the camera's 6 DOF of movement in relation to something like an Arcball implementation.
Where a 'Virtual Trackball/Arcball is used to rotate objects in 3D space", I am looking for an extension of the concept so that something like "Virtual Plane(s) are used to translate objects in 3D space" [bit like what is in the link to my other post(s)].
|
|
|
|
|