Search Results

Search found 1346 results on 54 pages for 'ray casting'.

Page 20/54 | < Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >

  • Can I access type int (*)[] with [][]?

    - by Framester
    Hi coming from this question "What does (int (*)[])var1 stand for?" I tried to access the result of the cast like a multidimensional array. But I get following error: "assignment from incompatible pointer type" followed by a segmentation fault. I tried also some other variations, but none of them worked. How can I access the elements in var1 in the function example directly? Thank you! #include <stdlib.h> int i(int n,int m,int var1[n][m]) { var1[0][0]=5; return var1[0][0]; } int example() { int *var1 = malloc(100); // works int var2; var2 = i(10,10,(int (*)[])var1); printf("var2=%i",var2); //doesn't work I int *var3; var3=(int (*)[])var1; //"assignment from incompatible pointer type" printf("var3[0][0]=%i",var3[0][0]); //doesn't work II int *var4; var4=var1; printf("var4[0][0]=%i",var4[0][0]); //" error: subscripted value is neither array nor pointer" //doesn't work III int **var5; var5=var1; printf("var5[0][0]=%i",var5[0][0]); // assignment from incompatible pointer type return(1); } int main(){ int a; a=example(); return(1); }

    Read the article

  • How to cast correctly a struct in C++

    - by kriau
    Consider a code excerpt below: typedef struct tagTHREADNAME_INFO { DWORD dwType; LPCTSTR szName; DWORD dwThreadID; DWORD dwFlags; } THREADNAME_INFO; const THREADNAME_INFO info = { 0x1000, threadName, CurrentId(), 0}; ::RaiseException(kVCThreadNameException, 0, sizeof(info) / sizeof(ULONG_PTR), (ULONG_PTR*)&info); How to cast correctly into ULONG_PTR* using C++ style cast? p.s. it's platform dependent code.

    Read the article

  • How to initialize static const char array for ASCII codes [C++]

    - by Janney
    I want to initialize a static const char array with ASCII codes in a constructor, here's my code: class Card { public: Suit(void) { static const char *Suit[4] = {0x03, 0x04, 0x05, 0x06}; // here's the problem static const string *Rank[ 13 ] = {'A', '2', '3', '4', '5', '6', '7', '8', '9', '10', 'J', 'Q', 'K'}; // and here. } However i got a whole lot of errors stating that 'initializing' : cannot convert from 'char' to 'const std::string *' 'initializing' : cannot convert from 'int' to 'const std::string *' please help me! Thank you so much.

    Read the article

  • ?asting String to Time makes 01:00:00

    - by kawtousse
    Hi everyone, when i do the following: String start = request.getParameter("startp"); SimpleDateFormat sdf = new SimpleDateFormat("hh:mm:ss"); long ms=0; try { ms = sdf.parse(start).getTime(); } catch (ParseException e1) { e1.printStackTrace(); } Time ts = new Time(ms); it is inserted with this value 01:00:00 witch is not the correct one (entered by user). I didn't undertstand the error here. Please help. Thanks

    Read the article

  • Bluray Drives: 2x vs 4x vs 6x vs 8x read/writespeed.

    - by Wesley
    Hi all, I couldn't find a duplicate question, but I was wondering what the differences are between different read/write speeds for Bluray drive. I'm planning on buying one for a build but don't know if I can cheap out on getting a Bluray 2x drive or spend more money for a quality Bluray 8x drive. Will I just experience more lag/buffering times for Bluray discs on a 2x and none for a 6x or 8x? Thanks in advance.

    Read the article

  • PC BluRay - Multichannel HD Audio output

    - by sheepsimulator
    When playing a BluRay movie on a PC (any OS, Mac/Win/Linux), I have some questions about audio output: When playing a BluRay disc on the PC using a BluRay player program, can it decode the multichannel (7.1) LPCM/ Dolby Digital Plus / Dolby TrueHD / DTS-HD / DTS-HDMA soundtracks in their HD formats (ie, without downmixing to Dolby Digital or DTS or PCM) and output the audio directly to the soundcard's 7.1 line-level analog outputs? Is it possible to bitstream the the multichannel (7.1) LPCM/ Dolby Digital Plus / Dolby TrueHD / DTS-HD / DTS-HDMA soundtracks in their HD formats (ie, without downmixing to Dolby Digital or DTS or PCM) over the HDMI output to a receiver when using a BluRay player program? I'd kinda like to know. I'm contemplating building a home theater PC, and the above functionality is important. I'd prefer that #1 is possible, actually, because it would mean I wouldn't have to buy a receiver.

    Read the article

  • Loose component cables causing HDMI video problems

    - by jwir3
    I'm not sure this is the correct forum, but I'll ask anyway. I have an A/V setup at home that has something like the following: Five Components (actually a few more, like a CD player, but they don't really relate to this question): Older Pioneer Receiver Digital Set Top Box Sony BluRay Player Samsung Plasma TV Speakers The reason for the receiver is so that all the sound can go through the speakers, rather than some going to the TV speakers and some to the external speakers. They are connected as follows: Digital Set Top Box connects via component video to Samsung TV directly via Component 2 (audio goes to Older Pioneer Receiver). Sony BluRay player is connected via HDMI 1 to TV, but audio goes to the receiver. Now, the problem I'm having is that when I have the digital set top box connected, there are times when the Netflix or Hulu streams I watch through the Sony BluRay player (it's connected to a router for internet access) will lose video. What I mean by this is that the sound of the episode will keep playing, but the screen will go black. If I jiggle the component cables, it will often come back. If I disconnect the component cables, it will always come back. I've noticed that one of the connections (the red component cable) doesn't like to sit very well in the component socket in the back of the digital set top box. It seems like there is a bad connection here, but it doesn't seem like this should be affecting the HDMI input at all. What I've noticed, though, is that when I disconnect the digital set top box completely (i.e. remove the component cable from the back of the TV), the problem seems to resolve itself. I'm not talking about actually removing the cable physically, because I thought perhaps the cables were mashing against one another, and possibly jiggling each other loose. To correct this possible problem, I took the component cable completely out of the cable ties it was in in the back of my entertainment center, as well as pulled the digital set top box out from the entertainment center altogether. It's now connected directly to the TV, without any other cables touching it to cause some kind of weird interference or just physical pulling on the cable. Same problem. If, however, I disconnect the component cable and just leave it sitting behind the TV, then the problem goes away. So, my question is this - what could be causing this? Is it a case where it's an improperly shielded component cable that's causing interference with the HDMI input, or something that's wrong with the TV? It's an intermittent problem, so it's difficult to track down. The TV isn't that old, so it's probably still under warranty. I'm just wondering if there is something else I can do that might reduce this problem without having to haul a massive television set out of my house to get repaired/replaced.

    Read the article

  • HD movies stutter.

    - by Absolute0
    I just put together a new system build in the hopes that all of my daily tasks would run smoothly and without any hiccups. Unfortunately I am still seeing some sound and sometimes video stuttering when playing HD movies in VLC (no problems with xvid/divx files). My setup is as follows: Intel core i5 750 quad core 2.66mhz 4GB ram asus p55 motherboard radeon hd 5570 video card 650gb 7200rpm western digital sata HDD 23" Nec ea23wmi monitor Operating System: Windows 7 What might be the main bottleneck that needs upgrading to fix my delays? Seems like the hard drive might be the problem but anything faster than 7200rpm is beyond my budget for a decent hard drive. Could it be anything else?

    Read the article

  • Unable to play bluray movies or see bluray discs

    - by Jason Shultz
    I have a Optiarc BD ROM BC-5500S ATA Device and when I put bluray discs into the drive the computer doesn't read them. I hear the drive make 3 noises as if it's trying to read them. Nothing shows up in windows explorer. I am running windows 7 64bit. I can read DVDs and CDs just fine. Bluray seems to be the only problem. I have installed PowerDVD9, HP DVD Play and HP DVD Media Smart and nothing helps. My laptop is a hp dv7 1273cl. I bought it before the free upgrades to windows 7 were available so I wasn't able to get the upgrade and so HP won't assist me beyond telling me to format and reinstall Vista.

    Read the article

  • BDrip vs BRrip?

    - by ahmed
    What is the difference between a BDrip and a BRrip? I often see these term while downloading videos.And which one is better in quality ?

    Read the article

  • BluRay audio/video stuttering with PowerDVD 11, WinDVD 11 Pro, etc? Xonar/Auzen HD audio option?

    - by jrista
    I recently upgraded my Windows 7 MediaCenter HTPC due to a motherboard failure (really old motherboard and cpu, it was on its last legs.) I chose to upgrade to an i5 system with everything built into the motherboard. I did my due diligence, researched, and found some hardware that was within my budget. I ended up with: Core i5 2500K (3.3Ghz) Corsair XMS3 2x2Gb DDR3 (4Gb) ASUS P8H 61-M LE/CSM MicroCenter 64Gb SSD (Previous BluRay player, forget the brand) The system is pretty awesome, and plays everything I have perfectly. I almost went with an Atom solution, however there have been numerous notes that they do not play NetFlix Instant Watch well...and I am a heavy Netflix IW user. High definition BluRay rips work well, although they usually contain lower audio quality than the BluRay's they were ripped from. The real problem I am encountering is playing back BluRay video from discs. For some reason, I am encountering rather terrible stuttering problems with both the audio and video. The stuttering is synchronous in both, and occurs at seemingly random intervals. I've used PowerDVD 9, PowerDVD 11 trial, and WinDVD 11 Pro trial. All three have stuttering problems, although PowerDVD 11 seems to have the least. Watching system resource usage, CPU load is never above 20%, and memory usage tends to be a constant 1/3rd the total available system memory. When playback is fine, its superb...the video is crystal clear. The audio quality is ok, certainly not what I would expect from a BluRay disc. I did some research, and it seems that playing BluRay from a PC causes a downsampling of the audio? I am curious if the audio is my primary problem here, the cause of the stuttering I am encountering? When stuttering occurs, the audio gets REALLY bad, while the video just pauses momentarily every second until for whatever reason everything picks up and runs fine (usually after a few seconds to a couple minutes.) The audio chipset is a Realtek HD ALC887 8-channel, supposedly designed to support BluRay playback. Has anyone encountered any issues like this playing back bluray discs on a PC (namely with PowerDVD...WinDVD was FAR worse, and seemed to have real trouble even reading the discs, and I have no interest in fiddling with it further.) Is there any reason to suspect the video decoding as the problem?(Given how bad the audio gets during a stutter, and how clean the video remains, I am inclined to think the issue boils down to audio.) Is it even remotely possible that the motherboard, cpu, or ram are causing the stuttering (all three are pretty blazing fast...faster than the hardware that I replaced, which seemed to play BluRay fine with PowerDVD 9.) I've read a bit about the Asus Xonar HDAV 1.3 and the Auzen X-Fi HomeTheater HD home theater hi-fi audio cards. Seems they are the only way to get true full-quality, uncompressed BluRay audio bitstreaming over HDMI on a PC. None of the usual suspects seem to have these cards in stock, however. Are these cards worth getting? Are they even still available, or have they been discontinued (if so, that would indeed be sad...they sound simply fantastic.)

    Read the article

  • Does Win 7 still requires copying all files over before burning to a DVD-R or BD-R?

    - by Jian Lin
    It seems that Win 7 still needs to copy all files over to a folder, before it burns all files to the DVD-R or BD-R? I think since XP or Vista, Windows always copy everything over to a temporary folder before it will burn to an empty DVD-R. So if you just want to burn a 4GB file to an empty DVD-R, it will first make a copy of that file, and then burn it, instead of just burning it without making a copy first. And now on Win 7, it seems like it is the case also? Most other 3rd party burning tools won't make an extra copy of the files first... Win 7 is the exception. Is there a way around it? (to avoid copying over 25GB or 50GB of data before burning)

    Read the article

  • Can Linux play HDMI 1.4a 3D stereoscopic content?

    - by SofaKng
    I'm aware that there are no Bluray players for Linux but I'm wondering if it's possible to play Full 3D HD (1080p, Side-By-Side) MKV files (or Bluray BDMV folders, etc). Full 3D HD files are actually two 1080p frames "side-by-side" so the effective resolution is 3840x1200. In order to play these properly the software needs to switch to TV into 3D mode (or however HDMI 1.4a works). I don't think simply playing the 3840x1200 resolution file will work so are there any options out there?

    Read the article

  • Recommend a good DVD or BD replacement drive that can read older CD-R/DVD+R media?

    - by Irinotecan
    So I have a bunch of older CD-R (and a few DVD+R) discs that are either suffering from "bit rot", or a case of crappy no-name Chinese DVD drives being unable to read some or all of anymore. I just threw my last no-name DVD drive in the trash after it ejected a disk still spinning causing it to scratch to the point of being useless, so I'm looking for a replacement drive this time around with an eye for quality over a dirt cheap price. I'd prefer a BD drive, but I'll take any suggestions for good, reliable DVD or BD drives that people have reported having good success with for reading older burned media. Any takers?

    Read the article

  • Are there any free Windows based BluRay players out there?

    - by joshcomley
    I have a BluRay drive in my PC, and I'm wondering what the cheapest way to actually get it to play a movie is (I didn't expect this to be trouble). I'm using Windows 7. I installed CyberLink PowerDVD 8 (I'm currently downloading 10 but it's taking a very, very long time) and I get the below "error" when trying to watch a BluRay movie: CyberLink PowerDVD is not able to play the protected content on your digital output device. Please switch to an analog output (VGA, D-Sub) and then try again. I can't get VLC to play it and my research yields no plugins for VLC to enable it either - unless I'm vastly missing something. Help!

    Read the article

  • MKV video suddenly stops playing after random time - what could this be?

    - by MEM
    I have this HP USB drive (16GB, NTFS formatted) that has, a MKV video. The USB is always detectable, so is the MKV, but when I connect that USB drive with that MKV video on my HT-C5530 home cinema USB port, the playback just suddenly stops after random time, and it returns to the main menu when I can see the pen and it's contents. I really have no clue about what could be the issue here, has someone else experience something similar? That may help me out on this.

    Read the article

  • What do the ddx and ddy values do in this AABB ray intersect algorithm?

    - by Paz
    Does anyone know what the ddx and ddy values do in the AABB ray intersect algorithm? Taken from the following site http://www.blitzbasic.com/codearcs/codearcs.php?code=1029 (show below). Local txmin#,txmax#,tymin#,tymax# // rox, rdx are the ray origin on the x axis, and ray delta on the x axis ... y-axis is roy and rdy Local ddx# =1.0/(rox-rdx) Local ddy# =1.0/(roy-rdy) If ddx >= 0 txmin = (bminx - rox) * ddx txmax = (bmaxx - rox) * ddx Else txmin = (bmaxx - rox) * ddx txmax = (bminx - rox) * ddx EndIf If ddy >= 0 tymin = (bminy - roy) * ddy tymax = (bmaxy - roy) * ddy Else tymin = (bmaxy - roy) * ddy tymax = (bminy - roy) * ddy EndIf If ( (txmin > tymax) Or (tymin > txmax) ) Return 0 If (tymin > txmin) txmin = tymin If (tymax < txmax) txmax = tymax Local tzmin#,tzmax# Local ddz# =1.0/(roz-rdz) If ddz >= 0 tzmin = (bminz - roz) * ddz tzmax = (bmaxz - roz) * ddz Else tzmin = (bmaxz - roz) * ddz tzmax = (bminz - roz) * ddz EndIf If (txmin > tzmax) Or (tzmin > txmax) Return 0 Return 1

    Read the article

  • This Week in Geek History: YouTube goes Public, Blu-ray vs. HD DVD, and All Your Base Are Belong To Us

    - by Jason Fitzpatrick
    Every week we bring you a snapshot of the current week in the history of technological and geeky endeavors. This week we’re taking a look at the birth of YouTube, the death of the HD DVD format, and the first mega meme. Latest Features How-To Geek ETC How to Enable User-Specific Wireless Networks in Windows 7 How to Use Google Chrome as Your Default PDF Reader (the Easy Way) How To Remove People and Objects From Photographs In Photoshop Ask How-To Geek: How Can I Monitor My Bandwidth Usage? Internet Explorer 9 RC Now Available: Here’s the Most Interesting New Stuff Here’s a Super Simple Trick to Defeating Fake Anti-Virus Malware The Citroen GT – An Awesome Video Game Car Brought to Life [Video] Final Man vs. Machine Round of Jeopardy Unfolds; Watson Dominates Give Chromium-Based Browser Desktop Notifications a Native System Look in Ubuntu Chrome Time Track Is a Simple Task Time Tracker Google Sky Map Turns Your Android Phone into a Digital Telescope Walking Through a Seaside Village Wallpaper

    Read the article

  • Numerically stable(ish) method of getting Y-intercept of mouse position?

    - by Fraser
    I'm trying to unproject the mouse position to get the position on the X-Z plane of a ray cast from the mouse. The camera is fully controllable by the user. Right now, the algorithm I'm using is... Unproject the mouse into the camera to get the ray: Vector3 p1 = Vector3.Unproject(new Vector3(x, y, 0), 0, 0, width, height, nearPlane, farPlane, viewProj; Vector3 p2 = Vector3.Unproject(new Vector3(x, y, 1), 0, 0, width, height, nearPlane, farPlane, viewProj); Vector3 dir = p2 - p1; dir.Normalize(); Ray ray = Ray(p1, dir); Then get the Y-intercept by using algebra: float t = -ray.Position.Y / ray.Direction.Y; Vector3 p = ray.Position + t * ray.Direction; The problem is that the projected position is "jumpy". As I make small adjustments to the mouse position, the projected point moves in strange ways. For example, if I move the mouse one pixel up, it will sometimes move the projected position down, but when I move it a second pixel, the project position will jump back to the mouse's location. The projected location is always close to where it should be, but it does not smoothly follow a moving mouse. The problem intensifies as I zoom the camera out. I believe the problem is caused by numeric instability. I can make minor improvements to this by doing some computations at double precision, and possibly abusing the fact that floating point calculations are done at 80-bit precision on x86, however before I start micro-optimizing this and getting deep into how the CLR handles floating point, I was wondering if there's an algorithmic change I can do to improve this? EDIT: A little snooping around in .NET Reflector on SlimDX.dll: public static Vector3 Unproject(Vector3 vector, float x, float y, float width, float height, float minZ, float maxZ, Matrix worldViewProjection) { Vector3 coordinate = new Vector3(); Matrix result = new Matrix(); Matrix.Invert(ref worldViewProjection, out result); coordinate.X = (float) ((((vector.X - x) / ((double) width)) * 2.0) - 1.0); coordinate.Y = (float) -((((vector.Y - y) / ((double) height)) * 2.0) - 1.0); coordinate.Z = (vector.Z - minZ) / (maxZ - minZ); TransformCoordinate(ref coordinate, ref result, out coordinate); return coordinate; } // ... public static void TransformCoordinate(ref Vector3 coordinate, ref Matrix transformation, out Vector3 result) { Vector3 vector; Vector4 vector2 = new Vector4 { X = (((coordinate.Y * transformation.M21) + (coordinate.X * transformation.M11)) + (coordinate.Z * transformation.M31)) + transformation.M41, Y = (((coordinate.Y * transformation.M22) + (coordinate.X * transformation.M12)) + (coordinate.Z * transformation.M32)) + transformation.M42, Z = (((coordinate.Y * transformation.M23) + (coordinate.X * transformation.M13)) + (coordinate.Z * transformation.M33)) + transformation.M43 }; float num = (float) (1.0 / ((((transformation.M24 * coordinate.Y) + (transformation.M14 * coordinate.X)) + (coordinate.Z * transformation.M34)) + transformation.M44)); vector2.W = num; vector.X = vector2.X * num; vector.Y = vector2.Y * num; vector.Z = vector2.Z * num; result = vector; } ...which seems to be a pretty standard method of unprojecting a point from a projection matrix, however this serves to introduce another point of possible instability. Still, I'd like to stick with the SlimDX Unproject routine rather than writing my own unless it's really necessary.

    Read the article

  • Bluray Burner in Java - Where to start?

    - by Jay
    Like the subject of this post suggests, I am looking at developing a suite like nero which helps burn bluray discs. I am kind of clueless as to where to start. Is there anything in Java API that lets you do this? If I were to start from scratch, would I need to start with the bluray disc spec? Are there any open source tools which are already doing this? I tried searching at sourceforge.net and found nothing useful. Any help is much appreciated.

    Read the article

  • Drag camera/view in a 3D world

    - by Dono
    I'm trying to make a Draggable view in a 3D world. Currently, I've made it using mouse position on the screen, but, when I move the distance traveled by my mouse is not equal to the distance traveled in the 3D world. So, I've tried to do that : Compute a ray from mouse position to 3D world. Calculate intersection with the ground. Check intersection difference old position <- new position. Translate camera with the difference. I've got a problem with this method: The ray is computed with the current camera's position I move the camera I compute the new ray with new camera position. The difference between old ray and new ray is now invalid. So, graphically my camera don't stop to move to previous/new position everytime. How can I do a draggable camera with another solution ? Thanks!

    Read the article

  • What is the kd tree intersection logic?

    - by bobobobo
    I'm trying to figure out how to implement a KD tree. On page 322 of "Real time collision detection" by Ericson The text section is included below in case Google book preview doesn't let you see it the time you click the link text section Relevant section: The basic idea behind intersecting a ray or directed line segment with a k-d tree is straightforward. The line is intersected against the node's splitting plane, and the t value of intersection is computed. If t is within the interval of the line, 0 <= t <= tmax, the line straddles the plane and both children of the tree are recursively descended. If not, only the side containing the segment origin is recursively visited. So here's what I have: (open image in new tab if you can't see the lettering) The logical tree Here the orange ray is going thru the 3d scene. The x's represent intersection with a plane. From the LEFT, the ray hits: The front face of the scene's enclosing cube, The (1) splitting plane The (2.2) splitting plane The right side of the scene's enclosing cube But here's what would happen, naively following Ericson's basic description above: Test against splitting plane (1). Ray hits splitting plane (1), so left and right children of splitting plane (1) are included in next test. Test against splitting plane (2.1). Ray actually hits that plane, (way off to the right) so both children are included in next level of tests. (This is counter-intuitive - shouldn't only the bottom node be included in subsequent tests) Can some one describe what happens when the orange ray goes through the scene correctly?

    Read the article

< Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >