|
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)].
|
|
|
|
|
I am now thinking my understanding of the term "translation controller" is not what Shoemake meant when he wrote it. Anyone agree?
All I will have is conjecture.
And I don't think I will ever really find evidence to confirm exactly what Shoemake meant in that statement without actually asking him.
modified on Sunday, September 14, 2008 9:19 PM
|
|
|
|
|
hi all,
I m a student, currently having problem on how i can start programming.
my project require the use of an measurement device and it measurement are taken from the usb port and save in notepad .txt format, i am suppose to come out with an real time graphical display of the measurement, but i have no idea how i could start on it as i am new in programming. any help or suggest would be greater appreciated. Thanks
|
|
|
|
|
You say you're new to programming. How new? This isn't exactly a first project. What language do you plan to use? Unless you're actively monitoring the Notepad file as the data comes in, the data display wouldn't be considered "realtime". And if you're going to go to that much trouble, why not read the data from the instrument directly. If you need a text file, then write it from your program. Using Notepad this way is kind of hokey.
If you don't have the data, you're just another a**hole with an opinion.
|
|
|
|
|
hi,
this is exactly my first program, i will be using C#. The device i am using is a usb connected PC digital TV receiver this receiver software actually have a function which measure the signal strength, BER and these data are save into an log file (thus it real time measurement data) once i start the device (start watch TV).
I am suppose to use C# to get the real time measurement and convert it into graphic (line chart).
I have try to get the data for the log file and display it in the textbox using the following code
using System;
using System.IO;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace Testing_1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
StreamReader objstream = new StreamReader("c:\\measurement.log");
textBox1.Text = objstream.ReadToEnd();
}
but this is the error i got : the file been use by another program.
I also try another method which is directly from the usb port which the device is connected to but i am unable to start working on it coding. i had been looking into example of usb_hib and ICSHARPUSBlib but i was unable to get anything out.
Thus please help me, if i am in the right direction (get the data from usb directly?) or do you have any better item on how i should get this done, any code to refer to.
thank so much
|
|
|
|
|
You have my sympathy. If this is your first program, I'd suggest your teacher is a sadist, or just grossly imcompetent.
If you don't have the data, you're just another a**hole with an opinion.
|
|
|
|
|
Hi
The following code produces a screen capture of the whole desktop to a .bmp file. It works fine when you have 16-bit color depth set at Windows display properties, but when you use it with 32-bit color depth, the image produced is crooked and disorted in a very strange way. I have tried absolutely everything to figure out what causes this, but nothing seems to work.
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <fstream>
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
HWND hWnd = GetDesktopWindow();
HDC hDc = GetDC(hWnd);
WINDOWINFO window_info;
window_info.cbSize = sizeof(WINDOWINFO);
GetWindowInfo(hWnd, &window_info);
const unsigned width = window_info.rcClient.right - window_info.rcClient.left;
const unsigned height = window_info.rcClient.bottom - window_info.rcClient.top;
const unsigned size = ((width * 24 + 31) & ~31) / 8 * height;
PSTR pixels = NULL;
BITMAPINFO bitmap_info = {0};
bitmap_info.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
bitmap_info.bmiHeader.biWidth = width;
bitmap_info.bmiHeader.biHeight = height;
bitmap_info.bmiHeader.biPlanes = 1;
bitmap_info.bmiHeader.biBitCount = 24;
bitmap_info.bmiHeader.biCompression = BI_RGB;
bitmap_info.bmiHeader.biSizeImage = size;
HDC hCompatibleDc = CreateCompatibleDC(hDc);
HBITMAP hBitmap = CreateDIBSection(NULL, &bitmap_info, DIB_RGB_COLORS, (void **)&pixels, NULL, 0);
SelectObject(hCompatibleDc, hBitmap);
BitBlt(hCompatibleDc, 0, 0, width, height, hDc, window_info.rcClient.left, window_info.rcClient.top, SRCCOPY);
BITMAPFILEHEADER file_header = {0};
file_header.bfType = 0x4d42;
file_header.bfSize = sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFOHEADER) + size;
file_header.bfOffBits = sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFOHEADER);
std::ofstream image("image.bmp");
image.write((PSTR)&file_header, sizeof(BITMAPFILEHEADER));
image.write((PSTR)&bitmap_info.bmiHeader, sizeof(BITMAPINFOHEADER));
image.write(pixels, size);
image.close();
SelectObject(hCompatibleDc, NULL);
DeleteObject(hBitmap);
DeleteDC(hCompatibleDc);
ReleaseDC(hWnd, hDc);
return 0;
}</fstream></windows.h>
Does anyone have any clue to why this doesn't work? I've also tried to create a DC using the CreateDC function with TEXT("DISPLAY") and NULL parameters to create a device context that spans all display areas, but that produces the same error in the image using 32-bit color depth.
|
|
|
|
|
rikshot wrote: std::ofstream image("image.bmp");
Ouch Text streams will really screw up image data.
Try binary...
std::ofstream image("image.bmp", ios_base::out | ios_base::binary);
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hello.
I have a problem rendering a simple sprite from my book tutorial (Beginning DirectX 10 Game Programming) and from any website tutorial that I've found.
When I run the application, the screen is completely black, the sprite does not show.
But the thing is, if I change the Type Driver from D3D10_DRIVER_TYPE_HARDWARE to D3D10_DRIVER_TYPE_REFERENCE, it works just fine (slow, but fine).
My graphics card is Radeon HD 4870x2 so I should have directx 10 support. I have the latest drivers and august 2008 SDK. My operating system is Vista 64-bit Ultimate.
One of the example codes can be found here: http://www.kevindonde.com/downloads/KevinDonde_D3D10_MultipleSpriteTut_092007.rar
from this tutorial:
http://www.kevindonde.com/index.php/tutorial-4-multiple-sprites-in-directx-10/
Looking forward for reply!
note: a friend who runs it sees the sprites just fine can it be with my graphics card?
|
|
|
|
|
Hello,
I'm updating a legacy GDI and C plotting program in GDI+ and C#. The legacy application is capable of plotting 500,000 points in under a second while it takes 10 - 12 seconds for my application to do the same thing.
I know that GDI is hardward accelerated while GDI+ is not, but I do need a significantly faster draw rate for my updated application to be acceptable.
for (Int64 q = PlotTimeStart + 1; q < PlotTimeStop; q++)
{
YPt = (float)(ZeroMark - SeriesY[p][q] * RangeFactor);
dc.DrawLine(PenSeries[p], XPtOld, YPtOld, XPt, YPt);
XPtOld = XPt;
YPtOld = YPt;
XPt += PlotTimeWidth;
}
SeriesY is a List<double[]> .
I feel that my inner-loop is as concise as it can be, but I'm looking for any suggestions to help increase the draw speed.
Thanks
modified 12-Jul-20 21:01pm.
|
|
|
|
|
Not that it has the potential to make much the kind of performance difference you're looking for, but I'm curious why your loop counter, q, is a 64 bit int. Are you guaranteed to be running on a 64 bit computer so it's moot or do you really have over 2 billion iterations to perform?
I think you've mostly answered your own question though. Hardware accelerated graphics vs non accelerated. It just won't come close. And throw C# on top of it, blech.
If you don't have the data, you're just another a**hole with an opinion.
|
|
|
|
|
It is unlikely that I'd have more than 4 billion points, I could probably scale back to a 32bit int.
Any preference as to GDI or DirectX?
Thanks for the feedback
modified 12-Jul-20 21:01pm.
|
|
|
|
|
If you believe the propaganda, DirectX should be faster. And you can stomach the API, I've never been able to. But as a disclaimer, I've been very annoyed with Microsoft's graphics efforts for a long, long time.
If you don't have the data, you're just another a**hole with an opinion.
|
|
|
|
|
I replaced my DrawLine to collect the points in an array then use DrawLines, I get a 3x-4x performance boost. Its acceptable for now.
Thanks for the tips, I'll jump into DX if I have to.
modified 12-Jul-20 21:01pm.
|
|
|
|
|
Hello
I am working on a new virtual world and I need help. I do not want to use a game engine like Multiverse or anything like that. I have used them for past project but now I feel that I move up a stage in virtual world development. I am planning to use DirectX because it is popular and used by for virtual worlds.
Thank you.
|
|
|
|
|
Can I blt bitmap directly on backbuffer surface of IDirect3DDevice?
I first obtained backbuffer surface using
IDirect3DDevice::GetBackBuffer() then got HDC of surface by using GetDC() and then I used blt function of CDC; but it did not work.
I need to draw different bitmaps using Direct3D9 one by one on window's client area; how should I do?
|
|
|
|
|
hi every one.
i waant to load a .3d file generated in sd maxx in .net;
i know that i should convert it to .x file.
how can i convert .3d file to .x file?
is there any tools on 3dmax or directx sdk to do it?
or any other app?
sepel
|
|
|
|
|
The directx sdk has a utility called Conv3ds.exe in it. You can use that.
|
|
|
|
|
but i could not find it in directx folder.
where can i find it?
sepel
|
|
|
|
|
It's part of the DirectX SDK, which you can find here[^].
|
|
|
|
|
hi again.
thanks for your help.
i installed dxsdk_apr2007.exe befor.
but i dont find that file ?
sepel
|
|
|
|
|
Hi, is there a tool allowing to replace easily a certain color in a 24bit texture with transparent black for the use with DirectX3D 9? The image should be saved with precomputed alpha values (32bit), so that there is no need for using colorkey while loading the textures.
|
|
|
|