Shape can't be showed with light?!

I create my own Geometry, log, using TriangleFanArray and TriangleStripArray and attach material to it. However, it can only get outline, but no shape. When I change my Geometry to Cylinder, it works well. I do Normal my geometry with vector(1.0f, 0.0f, 0.0f). Honestly, I don't know what that means, just copy from an example that I read.
parts of my code Attached here:
Geometry create
tfa = new TriangleFanArray (totalN,
TriangleFanArray.COORDINATES|TriangleFanArray.NORMALS,stripCounts);
tfa.setCoordinates(0, coords);
tfa.setNormals(0, normal);Add to TransformGroup
Shape3D shape1 = new Shape3D();
cone1.setGeometry(log());
cone1.setAppearance(logAppear);
Shape3D shape2 = new Shape3D();
cone2.setGeometry(twoSide());
cone2.setAppearance(logAppear);
logBG.addChild(logTGT1);
logTGT1.addChild(logTGR1);
logTGR1.addChild(shape1);
logTGR1.addChild(shape2);Anyone can tell me what is wrong here? Thanks in advance.
David

Hi,
trial an error with vector algebra can be a tiring task...
The normal vector is the vector, which is orthogonal to the polygon associated with that vertex, having a length of 1. The normal vectors are crucial for the calculation of scene lighting.
It's the developers task to calculate these normals and no one checks these resulting vectors for their correctness (sometimes it can be useful to intentionally use "incorrect" normals, but that's another topic).
But in almost every case (1.0f, 0.0f, 0.0f) will not be a suitable value.
Normals are usually calculated using the dot product of two "edge vectors" of a polygon and then normalizing the result.
Lights need to have influencing bounds set, otherwise they won't work. So in case you didn't do that somewhere else in you code...
Regards
Fleischer

Similar Messages

  • Can music be insync with slide show

    In iPhoto one may link with a music track and even time the the slide show to end with the music.
    Can a slide show with music from iPhoto be ex/imported to iWeb as is?
    What about auto-play music with an iWeb Album?

    Yes. The basic idea is that you make a playlist of songs and choose that to use with the slideshow, rather than any particular song. In iPhoto 11 you can do this in iPhoto. In earlier versions you do this in iTunes.
    There is a limitation. Each song will play the full way through, you can't croassfade from one to another and so on.
    Alternatives to iPhoto's slideshow include:
    iMovie, on every Mac sold.
    Others, in order of price: PhotoPresenter  $29
    PhotoToMovie  $49.95
    PulpMotion  $129
    FotoMagico $29 (Home version) ($149 Pro version, which includes PhotoPresenter)
    Final Cut Express  $199
    It's difficult to compare these apps. They have differences in capability - some are driven off templates. some aren't. Some have a wider variety of transitions. Others will have excellent audio controls. It's worth checking them out to see what meets your needs. However, there is no doubt that Final Cut Express is the most capable app of them all. You get what you pay for.

  • Interacting with light pen

    I've made an application that recognizes handwritten characters written on a canvas. For this I've used functions like mousePressed, mouseReleased and mouseDragged for taking coordinates where the mouse was dragged while writing.
    Can my application work with light pen instead of a mouse because the accuracy while writing with light pen is fairly high.
    Edited by: Shashank929 on Jan 24, 2008 4:58 PM

    I've not used any for about 4 years now, I never really liked it. The wife wanted it to do computer art, but she decided she didn't like drawing on the computer; she just scans her stuff in now. Just do a google search, be careful of the cheaper models though, they do not yeild a stable cursor or lack the sensitivity to do decent drawings.

  • I have ipad 2. Safari stopped working. Screen appears with light gray cover. Some websites show errors when debug is on. But how actually can I debug or fix it? Thank you.

    I have ipad 2. Safari stopped working. Screen appears with light gray cover and is frozen. Some websites show errors when debug is on.
    But how actually can I debug or fix it? Thank you.

    Here are a couple suggestions:
    1.  Go into Settings > Safari and Clear Cookies Clear Cache
    2.  Fully close Safari:  from your home screen, double tap your home button and the most recently used Apps will show up.  Hold your finger on the Safari App until all Apps start jiggling.  You'll see a minus sign on the upper left side of Safari.  Touch the minus and Safari will fully close.  Touch your home button again to stop apps from jiggline, then touch your home button again to return to your home page.
    3.  Reboot your iPad:  Press and hold BOTH the power and home buttons at the SAME time for at least 10 seconds (ignore the red slider) until the Apple Logo appears, then let go of both buttons and your iPad will restart, but no data or settings will be lost.
    After iPad comes back up, try Safari again, and you should be good to go.

  • How can I exchange all the images in a slide show with new ones

    I have 18 slide shows each is a different competition for our camera club. How can I exchange all the images from each slide show with new images as our club competitions commence? I am reluctant to just delete the slide show because I will have set it all back up. I want to leave the size shape and format of the show as is, but just exchange all of the current images with new ones. I am hoping there is a quick way to delete and replace all images for each show? Each slide show has around 40 images and I have 18 shows
    thank you for your help

    1. Activate "thumbnails" in the configuration panel
    2. Select one Thumbnail.
    3. Rightclick and choose "Select same"
    4. Press "backspace"
    5. Open the configuration panel and load the new images.

  • Ipone5 screen became curved so you can show filter lighting internal slightly from both sides and then taking the bend is growing even split-screen device by 2 mm from the top screen still works, even though it is no longer adjacent to the device, but fro

    ipone5 screen became curved so you can show filter lighting internal slightly from both sides and then taking the bend is growing even split-screen device by 2 mm from the top screen still works, even though it is no longer adjacent to the device, but from the bottom with the appearance of a blue line longitudinally as a result of the curvature of the screen is also a button home-does not function well will not make my device and search for a solution with my friends interested in the technology, because I am embarrassed by the form of the device after the holidays where it seemed like device industry is poor and I am writing to Mtabaana that the iPhone is the best among "smart phones" unwillingness on the label and I have reasons as he have many ideas Perhaps the first is to install the replacement screen with adhesive to Atsamad in front of the machine heat from the inside and the outside of the hot weather in another way Macaianikiholas latest device that will not require recharging,,, NOTE: void wrought screen contributed to increase the signal network and wifi is erase

    ipone5 screen became curved so you can show filter lighting internal slightly from both sides and then taking the bend is growing even split-screen device by 2 mm from the top screen still works, even though it is no longer adjacent to the device, but from the bottom with the appearance of a blue line longitudinally as a result of the curvature of the screen is also a button home-does not function well will not make my device and search for a solution with my friends interested in the technology, because I am embarrassed by the form of the device after the holidays where it seemed like device industry is poor and I am writing to Mtabaana that the iPhone is the best among "smart phones" unwillingness on the label and I have reasons as he have many ideas Perhaps the first is to install the replacement screen with adhesive to Atsamad in front of the machine heat from the inside and the outside of the hot weather in another way Macaianikiholas latest device that will not require recharging,,, NOTE: void wrought screen contributed to increase the signal network and wifi is erase

  • TS1365 My Mac book pre suddenly got power off meanwhile it was fully charged. I tried to turn on but it's not working. I reconnected charger and the green light showing with blinking.

    My Mac book pre suddenly got power off meanwhile it was fully charged. I tried to turn on but it's not working. I reconnected charger and the green light showing with blinking. How can I fix it?

    cooldedar wrote:
    I reconnected charger and the green light showing with blinking.
    Well the blinking light shows it's charging, however just to make sure.
    Reset the SMC, then connect the machine to a power source that doesn't have a lot of other power items on the same lines (in the walls) in the same room and see how it is in the morning.
    For instance use a powerline in another spare room that isn't being used as much.
    https://support.apple.com/kb/HT3964

  • How can I share a Keynote show with a large audience using Outlook email?

    I am working with a corporate client with a global employee audience of 7,000. They use Outlook as their email platform. Can I create an animated Keynote show and embed it into an Outlook email? So that the user opens the email note, and is either immediately presented with the animated show, or would click a play button to start the animated Keynote?  Do I have to house the Keynote show on YouTube, or some other server?
    There is no sound, only animation, and the entire show is approximately 75 seconds in length.
    Thank you for any direction.

    Note that any kind of file containing a slide show with multiple photos is going to be quite large, most likely, and thus is not really appropriate for e-mail.  Many servers won't accept attachments beyond a certain size, many people operate with strict mailbox size limits, and so your message may never arrive at its destination.  I'd encourage you to do something else.  For example, I think you can create a movie file - possibly using iMovie, I'm not sure though.  Do that and upload it to YouTube, then send people an e-mail invitation to view it.  If desired, YouTube allows you to set it to be viewable only to those who are invited and not to the general public.

  • When watching shows from my itunes with apple tv I can watch one show, but as soon as I try and watch a second it won't load.

    I just got my first apple tv.  It streams netflix beautifully and connected to my network and computer quickly.  Currently the bulk of my itunes library is on a PC, so I am attempting to stream from that.  I can watch a show or an episode of a tv show just fine, but when I try and watch the second I get the spinning wheel and nothing loads.  If I reset my apple tv and then turn home sharing off and on again I can watch another episode.  I disabled my firewall and my anti virus on my desktop to see if that was the problem, still I am watching one episode at a time.  HELP!

    Hello Putterking,
    After reviewing your post, I have located an article that can help with AirPlay. It contains a number of troubleshooting steps and helpful advice for the issue you are experiencing:
    Resolve issues with AirPlay and AirPlay Mirroring from iPhone, iPad, and iPod touch - Apple Support
    Thank you for contributing to Apple Support Communities.
    Cheers,
    BobbyD

  • I'm using iphoto9.1.3 but now it doesn't seem to work, whenever I try to open it, it just shows loading, but never loads. Can anybody help me with this ?

    I'm using iphoto9.1.3 but now it doesn't seem to work, whenever I try to open it, it just shows loading, but never loads. Can anybody help me with this ?    

    Option 1
    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Rebuild iPhoto Library Database from automatic backup.
    If that fails:
    Option 2
    Download iPhoto Library Manager and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one. .
    Regards
    TD

  • I have a new iPhone 6 plus and all is OK. But the mail shows more than 400 'unread' messages whereas there are none in the mailbox or trash or anywhere else I have looked. I can send and receive with no problem. I'm sure I have no unread messages.

    I have a new iPhone 6 plus and all is OK. But the mail shows more than 400 'unread' messages whereas there are none in the mailbox or trash or anywhere else I have looked. I can send and receive with no problem. I'm sure I have no unread messages.

        jsavage9621,
    It pains me to hear about your experience with the Home Phone Connect.  This device usually works seamlessly and is a great alternative to a landline phone.  It sounds like we've done our fair share of work on your account here.  I'm going to go ahead and send you a Private Message so that we can access your account and review any open tickets for you.  I look forward to speaking with you.
    TrevorC_VZW
    Follow us on Twitter @VZWSupport

  • Problem with setting up new Ipad Air2:I can't set up my new Ipad using new Apple ID and it keeps showing the notification that wrong email or password and try again. I can log in Itune with thesame

    I can't set up my new Ipad using new Apple ID and it keeps showing the notification that wrong email or password and try again. I can log in Itune with the same ID. Please help me if you have come across the same issue. Thank you!

    Contact the App store for Apple ID help. Their support link is on the right of the App store window
    LN

  • How can I send a slide show with email?

    I am trying to send an album but want the receiver to get them as a slide show. does someone knows how?

    Note that any kind of file containing a slide show with multiple photos is going to be quite large, most likely, and thus is not really appropriate for e-mail.  Many servers won't accept attachments beyond a certain size, many people operate with strict mailbox size limits, and so your message may never arrive at its destination.  I'd encourage you to do something else.  For example, I think you can create a movie file - possibly using iMovie, I'm not sure though.  Do that and upload it to YouTube, then send people an e-mail invitation to view it.  If desired, YouTube allows you to set it to be viewable only to those who are invited and not to the general public.

  • My old appleID use email with domain already deactivate. So I changed my appleID and primary email and now I can not access iCloud with iOS7. ICloud shows my old appleID but I can't change it. How do I get iCloud to work with my updated ID?

    My old email that using register for apple ID cannot access/check any mail because that domain already deactivate.
    So I changed my appleID and primary email and now I can not access iCloud with iOS7. ICloud shows my old appleID but I can't change it. How do I get iCloud to work with my updated ID?

    Hi ccharat,
    Welcome to the Apple Support Communities! It sounds like you did a good job editing your Apple ID and primary email address, but you didn’t sign out of iCloud on your iOS device before hand. What you may need to do in this situation is go back to the Apple ID website and edit your Apple ID and primary email address back to the email address that is signed in with iCloud (there is no need to verify the account after editing it back to the old account, just changing it back is enough). Once your Apple ID is back to the original account, delete the iCloud account from the iOS device and be sure to keep all info on the device when prompted. After you delete the iCloud account, go back to the website and edit your Apple ID and primary email address back to the new address. Once it is back to the account you would like, you can sign into the iCloud on the iOS device with that new account and merge all of the data when prompted. Please use the following article as a reference.
    iOS 7: If you're asked for the password to your previous Apple ID when signing out of iCloud
    http://support.apple.com/kb/ts5223
    Change your Apple ID temporarily
    If signing out and back in to iMessage or FaceTime didn't help, try these steps:
    Change your Apple ID to the Apple ID you used previously. You shouldn't need to verify the email address.
    Go to Settings > iCloud. Complete these steps only if the Find My [Device] setting is turned on:
    Scroll down and tap Delete Account, then tap Delete to confirm.
    Tap “Keep on My [Device]” or “Delete from My [Device].” In either case, your data remains in iCloud and will be updated on your device when you sign in to iCloud again.
    Enter the password for your previous Apple ID.
    Change your Apple ID to the new email address that you want to use. You'll need to verify the email address.
    Return to Settings > iCloud and sign in with your new Apple ID.
    I hope this helps,  
    -Joe

  • What will i do..there is a message show, "your device in not more eligible to create a free i cloud acount"..and when i try a new one it ask an account number, but i dont have...can you help me with this issue..

    What will i do..there is a message show, "your device in not more eligible to create a free i cloud acount"..and when i try a new one it ask an account number, but i dont have...can you help me with this issue..?
    I try also my old icloud user but its not recognizing the accoun...

    What will i do..there is a message show, "your device in not more eligible to create a free i cloud acount"..and when i try a new one it ask an account number, but i dont have...can you help me with this issue..?
    I try also my old icloud user but its not recognizing the accoun...

Maybe you are looking for

  • Safari quit unexpectedly and now won't open

    I had windows open and then safari quit. Now I'm getting a window that says safari quit unexpectedly okay or reopen, when i click reopen the same window pops up, when i click okay, the window disappears but nothing happens. If I click on Safari again

  • Essbase Cube Hierarchy Types in OBIEE 11g

    All, Is there any documentation anywhere that explains what the different hierarchy types are for Essbase? I see the following listed, but am totally confused as to what each means and when it should be used. 1. Fully balanced - Basically a flattened

  • Mail messes up html emails when the international panel set to "french"

    This is a fairly specific problem, under my normal settings everything works fine. I receive emails on a weekly basis from this sender who sends them with quite a bit of html encoding. Images, fancy formatting, tables, etc. Normally, they display jus

  • Using GPO to uninstall flash and then install latest version

    Hello, I wonder if someone could help me please.  Please bare with me as I am new to Group Policy, Scripting and Command Line usage. Given the recent security vulnerabilities in any Flash Player prior to 12.0.0.44 we need to get the latest version on

  • How to get the UnitOfWorkChangeSet in v. 9.0.3

    Is there any way to get the UnitOfWorkChangeSet on the version 9.0.3 of the API? I need a way to check the change status of any given row.