Adding a 3D sphere onto a 3D cube

Hi, currently i have created a 3D cube and was thinking to create a 3D sphere so that the sphere can stay onto the cube. And so when the cube is being rotated, the sphere that is on the cube will move according too. Can any1 show me the code to create the sphere and add it to the existing Universe. I will paste my code of creating the 3D cube below. Hope you all can use my existing code and add the code for the sphere and show me. Thank you Very Much for your help.
* IconGlassPanel3D.java
* Created on October 30, 2006, 2:57 PM
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
package Pas3DGUI;
import CobraNet.Zone;
import DbConnection.DAOFactory;
import DbConnection.ZoneDAO;
import Pas2DGUI.ZoneIcons;
import com.sun.j3d.utils.geometry.Sphere;
import java.applet.Applet;
import java.awt.BorderLayout;
import java.awt.Frame;
import com.sun.j3d.utils.applet.MainFrame;
import com.sun.j3d.utils.geometry.ColorCube;
import com.sun.j3d.utils.universe.*;
import com.sun.j3d.utils.behaviors.mouse.*;
import java.awt.Graphics;
import java.awt.Point;
import javax.media.j3d.*;
import javax.vecmath.*;
import java.awt.Image;
import java.awt.Toolkit;
import java.awt.event.*;
import java.util.Enumeration;
* @author 042255f
public class IconGlassPanel3D extends Applet {
/** Creates a new instance of IconGlassPanel3D */
public BranchGroup createSceneGraph() {
// Create the root of the branch graph
BranchGroup objRoot = new BranchGroup();
TransformGroup objTransform = new TransformGroup();
objTransform.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
objTransform.setCapability(TransformGroup.ALLOW_TRANSFORM_READ);
objRoot.addChild(objTransform);
objTransform.addChild(new ColorCube(0.4));
MouseRotate myMouseRotate = new MouseRotate();
myMouseRotate.setTransformGroup(objTransform);
myMouseRotate.setSchedulingBounds(new BoundingSphere());
objRoot.addChild(myMouseRotate);
MouseTranslate myMouseTranslate = new MouseTranslate();
myMouseTranslate.setTransformGroup(objTransform);
myMouseTranslate.setSchedulingBounds(new BoundingSphere());
objRoot.addChild(myMouseTranslate);
MouseZoom myMouseZoom = new MouseZoom();
myMouseZoom.setTransformGroup(objTransform);
myMouseZoom.setSchedulingBounds(new BoundingSphere());
objRoot.addChild(myMouseZoom);
// Let Java 3D perform optimizations on this scene graph.
objRoot.compile();
return objRoot;
} // end of CreateSceneGraph method of MouseBehaviorApp
// Create a simple scene and attach it to the virtual universe
public IconGlassPanel3D() {
setLayout(new BorderLayout());
Canvas3D canvas3D = new Canvas3D(null);
add("Center", canvas3D);
BranchGroup scene = createSceneGraph();
// SimpleUniverse is a Convenience Utility class
SimpleUniverse simpleU = new SimpleUniverse(canvas3D);
// This will move the ViewPlatform back a bit so the
// objects in the scene can be viewed.
simpleU.getViewingPlatform().setNominalViewingTransform();
simpleU.addBranchGraph(scene);
} // end of IconGlassPanel (constructor)
// The following allows this to be run as an application
// as well as an applet
public static void main(String[] args) {
System.out.println("Hold the mouse button while moving the mouse to make the cube move.");
System.out.println(" left mouse button - rotate cube");
System.out.println(" right mouse button - translate cube");
System.out.println(" Alt+left mouse button - zoom cube");
Frame frame = new MainFrame(new IconGlassPanel3D(), 256, 256);
} // end of main (method of IconGlassPanel)
}

What I figured out was that the model MUST be saved in one of the file formats acrobat recognizes - it won't come in straight from AutoCAD's native .dwg format.  So I save it as a .SAT file and then it works as advertised.
Thanks for your response.

Similar Messages

  • When I download word docs my MacBook is adding the flv extension onto the doc extension and I can't open the doc. Any ideas?

    When I download word docs my MacBook is adding the flv extension onto the doc extension and I can't open the doc. Any ideas?

    Go to the main Library folder and look for a folder called Application Support / Microsoft.
    There are a few folders in there, and you may have to do some digging. In one of them (mine is called MAU2.0), there should be a file called Microsoft Autoupdate. Open it.
    It looks like this:
    check the button for manual updates.
    That should let you open the apps without triggering an automatic update.

  • Problem while adding a new dimension in a existing cube with data in BW3.5

    Hi,
    We are trying to create a new dimension with new characteristics in a existing cube. But while activating we are getting error that "InfoCube contains data; intentional changes not permitted". Can we add a new dimension in a existing cube with data in BW3.5? If it is not possible then we can take the backup and delete the data from cube and then change the cube. But my question is that, when we will transport the cube with changes to quality then will it transport successfully or same procedure needs to be done there as well.
    Regards,
    Saikat

    hi,
    Adding new infoobject /dimension to the cube containing data in 3.5 is not possible.
    easier solution is create a new cube similar to old and add the new dimension and proceed.
    else you have to drop data and transport.
    Ramesh

  • Error while adding an Info Object in an Info Cube

    Hi Experts,
    I am trying to add one InfoObject to my info cube but I get following error:
    "InfoObject GSMBUHR is only allowed as an attribute (not in InfoCubes)"
    The Data Type of the InfoObject is TIMS.
    The Reference Char. for it is 0TIME
    And in other Properties Attribute only is checked.
    but its not maintained as an attribute of any InfoObject as I checked in where used list for this InfoObject.
    Please let me know to add it in cube.
    Regards
    Shubh Karan

    hi,
    u will not be able to add an 'attribute only' info object as characteristic in the cube
    it can only be added as an attribute in another master data characteristic. so if u still want  to include this info object , u need to unchecck 'attribute only' flag.
    hope it helps
    Regards,
    Rathy

  • Adding a day of week to a cube

    I need to add the day of the wek to a cube and I am wodering whaer i should do this.  In the trasnfer rule or update rule or somwwhere else.  basically I want to Call this fuction module DATE_COMPUTE_DAY and then use this to convert to the day: DAY_NAMES_GET.
    If want to store day of week returned from DATE_COMPUTE_DAY in my cube in a new infoobject. Then bring in the text for the infoobject from table T246.
    Can I do this in the update rule?

    You can do that in update or also in trasnfer rules, where you prefer.
    For me it's better to do that in update rules.
    Hope it helps.
    Rergards

  • Adding a new key figure to Info Cube

    Can I add a new key figure to an existing Info cube in which data is loaded?
    Assume that In Info Cube we have the following.
    Stu Id -- Characteristic
    Maths , Physics , Chemistry -- Key figures
    These are the info objects which are already available and transfer rules are already available for the same in the infosource.
    Could any one let me know how to add one more new key figure (total ) , which is the sum of the three marks to the Info Cube and populate the data in to the same.
    I have tried the following steps ,  but could not get the solution.
    1). Create a new key figure info object (total).
    2). Add the same to the communication and pull the same into transfer rules of the existing info source and activate the same.
    3). Add the new key figure to the info cube.
    4). Open transfer rules for the info cube and change the mode from NO updation to Addition for the particular key figure (total).
       When I perform the 4th step it is giving a red symbol beside the key figure in update rules and I'm not able to activate the same.
    Any help on how to add key figures to update rules and transfer rules is highly appreciated and points would be assigned.
    Thanks

    1.add new Keyfigure to Infocube.
    2.Go to Update rules> go to update type of that Keyfigure>selct formula in update method>create new formula>here you can add up your 3 keyfigures-->OK.
    activate update rules and InfoProvider.Check all are active or not..
    by using Export generate datasouce ,you populate data(historical data)  to new keyfigure as well.Then you have to delete historical data requests.
    or iyou can create formula in query designer as well as srinivas suggested.that would be better option.

  • Upgrading to iPhone and adding old phone back onto plan later... is it possible?

    I am on the verge of upgrading my non-smart-LG Octane to an iPhone. Currently my husband has a very very cheap Tracfone, which is fine for him as he rarely uses it- we don't have a land line so it's basically an emergency phone. However, Tracfone is not that great and his cheap phone is falling apart. My current Verizon plan is just for one phone, with no data plan. If I upgrade to an iPhone now, can I hang onto my Octane and add it back to my current plan as his phone later on if he decides he would rather do that than keep the Tracfone? Last time I upgraded I was able to let him have my old phone and use it as the second phone on the Verizon plan, but I want to be sure I can do it later on instead of having to decide when I get the iPhone. I'm trying to keep my costs down as much as possible, and he won't be needing a data plan (I don't have one currently) so I want to wait until know for certain what the iPhone will cost monthly before deciding if it's a good idea to add another Verizon line and give up the very cheap Tracfone line. Thanks for any help you can give!

    edna_million wrote:
    ...  If I upgrade to an iPhone now, can I hang onto my Octane and add it back to my current plan as his phone later on if he decides he would rather do that than keep the Tracfone? Last time I upgraded I was able to let him have my old phone and use it as the second phone on the Verizon plan, but I want to be sure I can do it later on instead of having to decide when I get the iPhone.
    Yes, you can upgrade now, add the data plan for the iPhone ($30 for 2 GB data), and then later add a second line using the Octane.  At that point you MAY have to switch to the Share Everything, since you are on an individual (I'm assuming) Nationwide plan with limited minutes; the option to add a line and make it shared plan may convert it to SHare Everything (unlimited minutes and texting, shared data).
    In either case, you don't need to decide when you upgrade to the iPhone.  The options will be similar now or later.

  • Adding a DVI port onto my Imac

    I want to to display another computer onto my imac. It only has a mini dvi out. Is there a way to install a dvi in port??

    jessylee13 wrote:
    Is there a way to install a dvi in port??
    For all practical purposes, NO.
    The LCD panel is driven by LVDS signals, while DVI uses TMDS signals.
    So, you'd have to add TMDS receiver chips and LVDS driver chips, plus
    whatever logic might be required to convert from one to the other. The
    conversion is non-trivial; a monitor is much more than an LCD panel.
    You'd also have to add video switching to select between internal and
    external sources.
    Looby

  • Adding a Z Field onto an SAP Std  Screen

    Hello Experts,
    I need to add my own Z field onto an SAP Std screen. The Z field already exist in the Append stucture of the table VBAK.
    How to do this? Will it come under a screen exit or field exit?
    May i know if i need to go for screen programming such as loop at screen..endloop. etc.
    Please explain in Tech terms(code) wih an example.
    Appreciate your response with points.
    Thanks
    Dan

    Hi
    1) Here you need only to design the dynpro using the structeu VBAK and the system'll automatically store them in VBAK table.
    Could you please tell me the dynpr prog involved?
    Use trx SE80:
    - choose program option and insert 'SAPMV45A';
    - Press display and open SCREEN node;
    - Search screen 8309, do a doubleclick and press MODIFY: now you're in screen painter.
    - To insert the input/output fields use the structure VBAK: in this way the headerline of VBAK'll automatically be filled. You need only to insert the code in screen flow (PBO and/or PAI) if you need to insert some controls;
    2) U should consider all saving are made in update task, so it should be better you create a z-function to update your z-table and call that fm in update tusk into USEREXIT_SAVE_DOCUMENT
    What is the code to do the above. Pls explian.
    If you see the user-exit USEREXIT_SAVE_DOCUMENT you can see a example:
    FORM USEREXIT_SAVE_DOCUMENT.
    * Example:
    * CALL FUNCTION 'ZZ_EXAMPLE'
    *      IN UPDATE TASK
    *      EXPORTING
    *           ZZTAB = ZZTAB.
    ENDFORM.                    "USEREXIT_SAVE_DOCUMENT
    So you have to create a your function module with importing parameters structurated like your Z-table, in this way you can transfer the record you need to update/insert. In the fm you insert all code you need to do the updating/inserting:
    FUNCTION 'ZZ_EXAMPLE'.
      MODIFY ZZTAB FROM ZZTAB.
    ENDFUNCTION.
    Max

  • Place image icon onto a 3D cube

    Hi, I am currently doing a project on 3D java. I have created 3D color cube and
    i am planning to put movable image icon on the cube so that i can move the image
    icon to anywhere on the cube. The color cube can be rotated, translated and
    zoomable. Lastly, when the cube is being rotated,the image icon on the cube must
    move together also.
    i am currently stuck at the part where i dont know how to do the coding on
    creating the image icon and when the cube is rotated, the image icon will move
    also. Can you give me some sample code on doing that as this is my first time
    using java 3D.
    Below is the code that i use to create the cube.
    CODE
    * IconGlassPanel3D.java
    * Created on October 30, 2006, 2:57 PM
    * To change this template, choose Tools | Template Manager
    * and open the template in the editor.
    package Pas3DGUI;
    import CobraNet.Zone;
    import DbConnection.DAOFactory;
    import DbConnection.ZoneDAO;
    import Pas2DGUI.ZoneIcons;
    import java.applet.Applet;
    import java.awt.BorderLayout;
    import java.awt.Frame;
    import com.sun.j3d.utils.applet.MainFrame;
    import com.sun.j3d.utils.geometry.ColorCube;
    import com.sun.j3d.utils.universe.*;
    import com.sun.j3d.utils.behaviors.mouse.*;
    import java.awt.Graphics;
    import java.awt.Point;
    import javax.media.j3d.*;
    import javax.vecmath.*;
    import java.awt.Image;
    import java.awt.Toolkit;
    import java.awt.event.*;
    import java.util.Enumeration;
    * @author 042255f
    public class IconGlassPanel3D extends Applet {
    // nImg =
    Toolkit.getDefaultToolkit().getImage("C:\\TEMP\\unselected_speaker.gif");
    /** Creates a new instance of IconGlassPanel3D */
    public BranchGroup createSceneGraph() {
    // Create the root of the branch graph
    BranchGroup objRoot = new BranchGroup();
    TransformGroup objTransform = new TransformGroup();
    objTransform.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
    objTransform.setCapability(TransformGroup.ALLOW_TRANSFORM_READ);
    objRoot.addChild(objTransform);
    objTransform.addChild(new ColorCube(0.4));
    // objRoot.addChild(new Axis());
    MouseRotate myMouseRotate = new MouseRotate();
    myMouseRotate.setTransformGroup(objTransform);
    myMouseRotate.setSchedulingBounds(new BoundingSphere());
    objRoot.addChild(myMouseRotate);
    MouseTranslate myMouseTranslate = new MouseTranslate();
    myMouseTranslate.setTransformGroup(objTransform);
    myMouseTranslate.setSchedulingBounds(new BoundingSphere());
    objRoot.addChild(myMouseTranslate);
    MouseZoom myMouseZoom = new MouseZoom();
    myMouseZoom.setTransformGroup(objTransform);
    myMouseZoom.setSchedulingBounds(new BoundingSphere());
    objRoot.addChild(myMouseZoom);
    // Let Java 3D perform optimizations on this scene graph.
    objRoot.compile();
    return objRoot;
    } // end of CreateSceneGraph method of MouseBehaviorApp
    // Create a simple scene and attach it to the virtual universe
    public IconGlassPanel3D() {
    setLayout(new BorderLayout());
    Canvas3D canvas3D = new Canvas3D(null);
    add("Center", canvas3D);
    BranchGroup scene = createSceneGraph();
    // SimpleUniverse is a Convenience Utility class
    SimpleUniverse simpleU = new SimpleUniverse(canvas3D);
    // This will move the ViewPlatform back a bit so the
    // objects in the scene can be viewed.
    simpleU.getViewingPlatform().setNominalViewingTransform();
    simpleU.addBranchGraph(scene);
    } // end of MouseBehaviorApp (constructor)
    // The following allows this to be run as an application
    // as well as an applet
    public static void main(String[] args) {
    System.out.println("Hold the mouse button while moving the mouse to make
    the cube move.");
    System.out.println(" left mouse button - rotate cube");
    System.out.println(" right mouse button - translate cube");
    System.out.println(" Alt+left mouse button - zoom cube");
    Frame frame = new MainFrame(new IconGlassPanel3D(), 256, 256);
    } // end of main (method of MouseBehaviorApp)
    Thank You all for your help.I apprepciate it.

    Use a Box instead of the ColorCube.. This might give you a start.
    To texture the Box, assuming you have extended Applet -
            java.net.URL texImage = null;// the URL of the image to load
         Appearance app = new Appearance();
         Texture tex = new TextureLoader(texImage, this).getTexture();
         app.setTexture(tex);
         TextureAttributes texAttr = new TextureAttributes();
         texAttr.setTextureMode(TextureAttributes.MODULATE);
         app.setTextureAttributes(texAttr);
         Box textureCube = new Box(0.4f, 0.4f, 0.4f,
                          Box.GENERATE_TEXTURE_COORDS, app);IMHO you will be well served by texturing a plane congruent in size with the sides of the cube and manipulating that using the coords of each side of a Box derived from Shape3D.getGeometry. Don`t forget to add a Light or two.
    regards

  • How to get the histoical data for newly added field in the cube?

    Hi Experts,
    I have small doubt on remodeling the infocube.
    After adding the characteristic or keyfigure  to a cube by using remodeling concept, how can I get the historical data for that particular field.
    I have searched in SDN also but I didn't get proper information.
    Please excuse me if I posted repeated question.
    helpful answer will be awarded with poitns.
    Thanks & regards,
    Venkat.

    hi
    depending on your customer need you could use the remodelling functionnality but sometimes you have no way to retrieve what you want so another option you should consider is the following:
    Advantages
    that will cost less effort and guarantee the result.
    Drawbacks
    data is redondant for a while
    space (depending on the volume of historical data)
    So here are the steps :
    step 1Adjust your extraction process according to the fields you need to add to populate the cube.
    step 2 Then create a dso next or even a cube, feed the dso with a full load with the enhanced extractor you adjusted with the new fields in step 1 only once in fact this should be one shot.
    step 3 Copy the query to the previous built  multi-provider on top of the new historical data from dso and the running live delta cube. Adjust the queries if necessary.
    optionnal Then if you want to get rid of the dso or new cube for historical data you could empty the actual one push the data from the new data provider and that's all.
    bye
    Boujema

  • Newly added Keyfigures to the cube is not shown in Bex designer

    Hi,
    We have added some new keyfigures to the base cube and multicube in our dev system. In multicube we correctly assigned the "source" for the new infoobjects.
    We are able to see the new fields in the query also, but the same we have transported to GWP system.
    We are able to see the new infoobjects in the cube and multicubel. but the report we are not able to see the same.
    When we execute the query, it is throwing error because of missing fields.,
    Can you please help me here, My system version is Bi 7.01 Ehp1 sp3

    Hi Karthik,
                           Some times it happens this way. Once again you save the existing query, close the entire applications and then try to change the query. Hopefully it shows up the new fields now.
    Regards
    R Karthik K

  • Does Position Of Cube Dimension Matter While Adding it as Measure

    I've created a cube on the Adventure Works Database. And when tried to process the Cube i get error
    Errors in the OLAP storage engine: The attribute key cannot be found when processing: Table: 'dbo_DimProduct', Column: 'ProductKey', Value: '1'. The attribute is 'Product Key'. Errors in the OLAP storage engine: The attribute key was converted to an unknown
    member because the attribute key was not found. Attribute Product Key of Dimension: Dim Product from Database: Analysis Services Project, Cube: Adventure Works DW, Measure Group: Dim Product, Partition: Dim Product, Record: 1. Errors in the OLAP storage engine:
    The process operation ended because the number of errors encountered during processing reached the defined limit of allowable errors for the operation. Errors in the OLAP storage engine: An error occurred while processing the 'Dim Product' partition of the
    'Dim Product' measure group for the 'Adventure Works DW' cube from the Analysis Services Project database.
    This is faced When Dimproduct Dimension was added first and later Dimtime Dimension.
    I delete Dim Product Database Dimension and have Added it again as both Measure and Cube Dimension and it process succesfully.
    Only Difference i've Found is now Dimproduct is listed last in cube dimensions.
    Question - Does position of Cube Dimension matters when adding its a Measure?
    And what is causing this error?
    HS

    Hi HS,
    Since this issue is related to Analysis Services, I will move this thread to Analysis Services forum. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated. 
    Thank you for your understanding and support.
    Regards,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • AWM adding very less rows in cube as compared to source fact table

    AWM is adding just 4 lack rows in the cube. While there are above 10 billion rows in fact table. Even I have applied no aggregation rule at any dimension in cube. And number of rejected records is zero.I am confused what could be the possible reason

    Take a look at the SQL query generated by OLAP during cube load.
    You can look at it in AWM cube mapping, OR in the CUBE_BUILD_LOG table.
    Maybe a SUM..GROUP BY ... is happening during cube load and that is why 1 billion rows are becoming 400,000 rows.
    Are the numbers correct when you look at the data at top nodes?

  • Connect a Date Dimension to a cube without relationship

    Hi everybody,
    I would like to answers to one business requirements.
    I create a cube that models the following event : a customer send a product from an agency to another customer who receives it in another agency.
    So I have a fact table with only two measures
    Amount
    Count
    which is connected to these dimensions
    Product
    Sending Date
    Receiving Date
    Sender (Customer)
    Receiver (Customer)
    Sender (Agency)
    Receiver (Agency)
    The users would like to analyse the following KPI, at a specific date :
    Number of transactions sent, the amount
    Number of transactions received, the amount
    Number of transactions pending, the amount
    To answer this business requirement, I have added a new date dimension in the cube with no relation, so that the user can select a date from this independent dimension and get the different KPIs. 
    But I don't get any results.
    Is it a good model ? How to make it possible for the user to use the independent Date Dimension to perform analyzes of different KPI ?

    Is it a good model ? How to make it possible for the user to use the independent Date Dimension to perform analyzes of different KPI ?
    Hi Meal,
    According to your description, you want to know if is it possible for the user to use the independent Date Dimension to perform analyzes of different KPI, right?
    As per my understanding, we cannot do this without relationship between dimension tables and the independent Date table. However, we can add the relationship between the added date table and the fact table Sending Date and Receiving Date column. Please refer
    to the link below to see the details.
    http://msdn.microsoft.com/en-us/library/ms175427.aspx
    Regards,
    Charlie Liao
    TechNet Community Support

Maybe you are looking for