Scaling two objects to match exactly pixel to pixel.

I have two art objects on two layers. I want to match to the pixel the two objects that otherwise could be exactly the same but one layered object was imported slightly smaller. The scale tool has good scale handling, I just want to measure the tool spots to the pixel to gain an exact scale size factor and match sizes.

If they could be the same  size what caused the scale difference. Were the images taken with or different cameras, or different focal length or angle are you sure only the scale is off.  That the perspectives and sizes of the objects are the same. Photoshop has a measure tool just remember perspective, angle, axis all effect the measurements size.

Similar Messages

  • Problem matching two objects

    This is my code
    import java.util.Vector;
    public class Matching {
         public Matching() {
         public Vector getMatch(int custID, Vector allCustomer, Vector allHouses) {
              //Vector allCustomers;
              //allCustomers = client.getCustomers;
              //Vector allHouses;
              //allHouses = properties.getHouses;
              Customer customer = new Customer();
              Property house = new Property();
              boolean priceMatch; priceMatch = false;
              boolean typeMatch; typeMatch = false;
              boolean bedroomsMatch; bedroomsMatch = false;
              boolean parkingMatch; parkingMatch = false;
              int matchCounter; matchCounter = 0;
              boolean overallMatch; overallMatch = false;
              Vector matches = new Vector(0);
              if ( allCustomer.size() > 0 ) {
                   customer = (Customer) allCustomer.elementAt(custID);
              System.out.println("Customer Name is: "+customer.name);
              house = (Property) allHouses.elementAt(0);
              int i; i = 0;
              //while (customer.name != null) {     
                   matches.addElement(customer);
                   while (i < allHouses.size()) {
                        house = (Property) allHouses.elementAt(i);
                        i++;
                        try {
                             int customerPrice;
                             customerPrice = Integer.valueOf(customer.price).intValue();
                             int housePrice;
                             housePrice = Integer.valueOf(house.price).intValue();
                             int highPrice;
                             highPrice = customerPrice + ((customerPrice / 100) * 10);
                             int lowPrice;
                             lowPrice = customerPrice - ((customerPrice / 100) * 10);
                             if ((housePrice < highPrice) && (housePrice > lowPrice)) {
                                  priceMatch = true;
                        catch ( NullPointerException e ) {
                             //The price field was blank
                             priceMatch = false;
                        catch ( NumberFormatException e ) {
                             //the price field was blank
                             priceMatch = false;
                        if ( (house.parking != null) && (customer.parking != null) ){
                             parkingMatch = true;
                        }else{
                             parkingMatch = false; }
                        try {
                             if (customer.type.equals(house.type)) {
                                  typeMatch = true;
                        catch ( NullPointerException e ) {
                             typeMatch = false;
                   catch ( NumberFormatException e ) {
                             typeMatch = false;
                        try {
                             if (customer.bedrooms.equals(house.bedrooms)) {
                                  bedroomsMatch = true;
                        catch ( NullPointerException e ) {
                             bedroomsMatch = false;
                        catch ( NumberFormatException e ) {
                             bedroomsMatch = false;
         //if ((priceMatch == true) && (typeMatch == true)) {
         //     overallMatch = true;
         //     }else{
         //          overallMatch = false; }
                   if (priceMatch == true) {
                   matchCounter++; }
                   if (typeMatch == true) {
                   matchCounter++; }
                   if (bedroomsMatch == true) {
                   matchCounter++; }
                   if (parkingMatch == true) {
                   matchCounter++; }
                        if (matchCounter == 4) {
                        overallMatch = true;
                   }else{
                   overallMatch = false; }
                                                 //continue
                             if (overallMatch == true) {
                                  matches.addElement(house);
                                  overallMatch = false;
                                  typeMatch = false;
                                  priceMatch = false;
                                  bedroomsMatch = false;
                                  parkingMatch = false;
    matchCounter = 0;
                        //i ++;
                        //house = (Property) allHouses.elementAt(i);
         return matches;
    This class gets two objects (a house and a customer) and then matches them based on criteria, puts the objects in a vector and then sends it to another class to be used in a report. If i turn the rest of the code into comments so that i am only matching the house and customer with one criteria (e.g. is the house type the same as the customer type), then it works correctly and produces a vector with one customer and all the houses which have the same type. however whenever i try and match the houses with the customer based on two or more criteria, then it picks houses which dont necessarily match this criteria.
    any help would be greatly appreciated as i am really stuck and dont know who to turn to
    thanx

    import java.util.Vector;
    public class Matching {
    public Matching() {
    public Vector getMatch(int custID, Vector allCustomer, Vector allHouses) {
    //Vector allCustomers;
    //allCustomers = client.getCustomers;
    //Vector allHouses;
    //allHouses = properties.getHouses;
    Customer customer = new Customer();
    Property house = new Property();
    boolean priceMatch; priceMatch = false;
    boolean typeMatch; typeMatch = false;
    boolean bedroomsMatch; bedroomsMatch = false;
    boolean parkingMatch; parkingMatch = false;
    int matchCounter; matchCounter = 0;
    boolean overallMatch; overallMatch = false;
    Vector matches = new Vector(0);
    if ( allCustomer.size() > 0 ) {
    customer = (Customer) allCustomer.elementAt(custID);
    System.out.println("Customer Name is: "+customer.name);
    house = (Property) allHouses.elementAt(0);
    int i; i = 0;
    //while (customer.name != null) {
    matches.addElement(customer);
    while (i < allHouses.size()) {
    house = (Property) allHouses.elementAt(i);
    i++;
    try {
    int customerPrice;
    customerPrice = Integer.valueOf(customer.price).intValue();
    int housePrice;
    housePrice = Integer.valueOf(house.price).intValue();
    int highPrice;
    highPrice = customerPrice + ((customerPrice / 100) * 10);
    int lowPrice;
    lowPrice = customerPrice - ((customerPrice / 100) * 10);
    if ((housePrice < highPrice) && (housePrice > lowPrice)) {
    priceMatch = true;
    catch ( NullPointerException e ) {
    //The price field was blank
    priceMatch = false;
    catch ( NumberFormatException e ) {
    //the price field was blank
    priceMatch = false;
    if ( (house.parking != null) && (customer.parking != null) ){
    parkingMatch = true;
    }else{
    parkingMatch = false; }
    try {
    if (customer.type.equals(house.type)) {
    typeMatch = true;
    catch ( NullPointerException e ) {
    typeMatch = false;
    catch ( NumberFormatException e ) {
    typeMatch = false;
    try {
    if (customer.bedrooms.equals(house.bedrooms)) {
    bedroomsMatch = true;
    catch ( NullPointerException e ) {
    bedroomsMatch = false;
    catch ( NumberFormatException e ) {
    bedroomsMatch = false;
    //if ((priceMatch == true) && (typeMatch == true)) {
    // overallMatch = true;
    // }else{
    // overallMatch = false; }
    if (priceMatch == true) {
    matchCounter++; }
    if (typeMatch == true) {
    matchCounter++; }
    if (bedroomsMatch == true) {
    matchCounter++; }
    if (parkingMatch == true) {
    matchCounter++; }
    if (matchCounter == 4) {
    overallMatch = true;
    }else{
    overallMatch = false; }
    //continue
    if (overallMatch == true) {
    matches.addElement(house);
    overallMatch = false;
    typeMatch = false;
    priceMatch = false;
    bedroomsMatch = false;
    parkingMatch = false;
    matchCounter = 0;
    //i ++;
    //house = (Property) allHouses.elementAt(i);
    return matches;
    }

  • Two objects created at the same time with the same hashcode

    We have this object with the following constructor:
    2010-06-24 00:10:31,260 [LoadBalancerClientSubscriber(3)(pid:24312)] INFO  com.intel.swiss.sws.netstar.application.caching.framework.data
    set.synchronizer.DatasetSynchronizer - Initializing dataset synchronizer for: [/nfs/iil/iec/sws/work/damar/ds_cama/tmp/ds_126631277304794
    /d81], i am com.intel.swiss.sws.netstar.application.caching.framework.dataset.synchronizer.DatasetSynchronizer@2ed3cae0
    2010-06-24 00:10:31,260 [LoadBalancerClientSubscriber(5)(pid:24315)] INFO  com.intel.swiss.sws.netstar.application.caching.framework.data
    set.synchronizer.DatasetSynchronizer - Initializing dataset synchronizer for: [/nfs/iil/iec/sws/work/damar/ds_cama/tmp/ds_126631277304794
    /d31], i am com.intel.swiss.sws.netstar.application.caching.framework.dataset.synchronizer.DatasetSynchronizer@2ed3cae0Note that two objects are created by different threads with exactly the same hash code. Any idea if/how this is possible?

    isocdev_mb wrote:
    The last part definitely suggests already that relying on uniqueness is incorrect. Hash codes are very often equal on distinct objects, viz. new String("java").hashCode == new String("java").hashCode(). Use a class level counter as suggested earlier.For that case we would of course expect the hashCodes to be equal, since the objects are equal. But even in the case of non-equal objects that don't override hashCode, you can still get the same value. Or, for that matter, non-equal objects that do override it. There are 2^32 possible hashCode values. There are 2^64 possible Long values. That means that there are 2^32 Longs that have a hashCode of 1, 2^32 Longs that have a hashCode of 2, etc.
    And for non-equal objects...
    package scratch;
    import java.util.Set;
    import java.util.Map;
    import java.util.HashMap;
    public class HashCodeIsNotUnique {
      public static void main(String[] args) throws Exception {
        Map<Integer, Integer> hashCodeCounts = new HashMap<Integer, Integer>();
        int numObjects = 10000;
        for (int i = 0; i < numObjects; i++) {
          Object obj = new Object();
          int hashCode = obj.hashCode();
          if (!hashCodeCounts.containsKey(hashCode)) {
            hashCodeCounts.put(hashCode, 0);
          hashCodeCounts.put(hashCode, hashCodeCounts.get(hashCode) + 1);
        for (Map.Entry<Integer, Integer> entry : hashCodeCounts.entrySet()) {
          int key = entry.getKey();
          int value = entry.getValue();
          if (value > 1) {
            System.out.println(key + " occurred " + value + " times");
    9578500 occurred 2 times
    14850080 occurred 2 times

  • Why in Ai CC 2014, when I use a pathfinder tool on two objects, their anchor points snap slightly off from where they were? I'm looking under all the snap to options under VIEW & cannot find the culprit. Please help!

    Why in Ai CC 2014, when I use a pathfinder tool on two objects, their anchor points snap slightly off from where they were? I'm looking under all the snap to options under VIEW & cannot find the culprit. Please help!

    You're welcome.
    There are a couple of issues connected to it:
    http://www.vektorgarten.de/problems-align-to-pixel-grid.html
    I don't think that list is complete

  • Need this explained: Two objects reporting back same values...

    Hello,
    I have a datagrid and a form binded to the selectedItem record of the datagrid.  I need to update the values according to whatever is typed into the form fields.
    I use a CFC to handle the update.  I have a newBean class which holds the new values from the form and also an oldBean object which holds old values to verify I'm updating the correct record.
    In my actionscript I have two objects, newObj and oldObj.  Here is how I set them up in my update function.
    var oldObj:Object = new Object;
    oldObj = dg.selectedItem;
    var newObj:Object = newObject;
    newObj = dg.selectedItem;
    newObj.value1 = field1.text;
    newObj.value2 = field2.text;
    newObj.value3 = field3.text;
    remoteObject.update(oldObj, newObj);
    So, I set the oldObj to the selectedItem and then I set the newObj to that same item, which initially should give them the current values of the selectedItem in the datagrid.  Then I set the values of newObj to match the form fields.  Lastly I have a remoteObject method "update()" send the two objects to the CFC I mentioned above.  When I found out it wasn't updating properly, I set up a cfdump to my email to list the values for both oldObj and newObj.
    Results:
    newObj properly takes all the new values as intended.  oldObj strangely also takes on the new values, yet I never assigned oldObj to accept the new values.  So why is oldObj also accepting the values in the form fields when there's no visible connection between oldObj and any of the fields?

    I don't have an external site I can load this on.  It's a component of an application as well, so I'd have to publish the whole thing.  Instead, I'll just post all relevent code.  Notes: cfc is generated from the ColdFusion wizard.  apptTable is a valueObject that contains the structure of the record data.
    The Remote Object:
        <mx:RemoteObject id="apptRO" endpoint="http://10.118.40.100:85/flex2gateway/"
            destination="ColdFusion" source="cms.cfc.apptTableDAO" showBusyCursor="true" fault="Alert.show(event.fault.faultString, 'Error')">
            <mx:method name="read" result="apptsReceived(event)"/>
            <mx:method name="create" result="apptCreated(event)"/>
            <mx:method name="update" result="apptUpdated(event)"/>
            <mx:method name="deleted" result="apptDeleted(event)"/>
        </mx:RemoteObject>
    The original update function in Flex:
        private var upObj:apptTable;
        private var oldObj:Object;
        private function updateAppt():void{
            oldObj = new Object;
            oldObj = dg.selectedItem;
            upObj = new apptTable;
            upObj = apptTable(dg.selectedItem);
            upObj.clientName = clientNameInput.text;
            upObj.topic = topicInput.text;
            upObj.info = infoInput.text;
            upObj.apptDate = dateInput.text;
            upObj.apptTime = timeInput.text + ' ' + ampmCbx.value.toString();
            apptRO.update(oldObj,upObj);
    The UPDATE function in the CFC:
        <cffunction name="update" output="false" access="public">
            <cfargument name="oldBean" required="true" type="cms.cfc.apptTable">
            <cfargument name="newBean" required="true" type="cms.cfc.apptTable">
            <cfset var qUpdate="">
            <cfquery name="qUpdate" datasource="cmsdb" result="status">
                update dbo.apptTable
                set clientName = <cfqueryparam value="#arguments.newBean.getclientName()#" cfsqltype="CF_SQL_VARCHAR" />,
                    topic = <cfqueryparam value="#arguments.newBean.gettopic()#" cfsqltype="CF_SQL_VARCHAR" />,
                    info = <cfqueryparam value="#arguments.newBean.getinfo()#" cfsqltype="CF_SQL_VARCHAR" />,
                    dateSubmitted = <cfqueryparam value="#arguments.newBean.getdateSubmitted()#" cfsqltype="CF_SQL_VARCHAR" />,
                    apptDate = <cfqueryparam value="#arguments.newBean.getapptDate()#" cfsqltype="CF_SQL_VARCHAR" />,
                    apptTime = <cfqueryparam value="#arguments.newBean.getapptTime()#" cfsqltype="CF_SQL_VARCHAR" />,
                    userID = <cfqueryparam value="#arguments.newBean.getuserID()#" cfsqltype="CF_SQL_BIGINT" null="#iif((arguments.newBean.getuserID() eq ""), de("yes"), de("no"))#" />,
                    userName = <cfqueryparam value="#arguments.newBean.getuserName()#" cfsqltype="CF_SQL_VARCHAR" />
                where apptID = <cfqueryparam value="#arguments.oldBean.getapptID()#" cfsqltype="CF_SQL_BIGINT" />
                  and clientName = <cfqueryparam value="#arguments.oldBean.getclientName()#" cfsqltype="CF_SQL_VARCHAR" />
                  and topic = <cfqueryparam value="#arguments.oldBean.gettopic()#" cfsqltype="CF_SQL_VARCHAR" />
                  and info = <cfqueryparam value="#arguments.oldBean.getinfo()#" cfsqltype="CF_SQL_VARCHAR" />
                  and dateSubmitted = <cfqueryparam value="#arguments.oldBean.getdateSubmitted()#" cfsqltype="CF_SQL_VARCHAR" />
                  and apptDate = <cfqueryparam value="#arguments.oldBean.getapptDate()#" cfsqltype="CF_SQL_VARCHAR" />
                  and apptTime = <cfqueryparam value="#arguments.oldBean.getapptTime()#" cfsqltype="CF_SQL_VARCHAR" />
                  and userID = <cfqueryparam value="#arguments.oldBean.getuserID()#" cfsqltype="CF_SQL_BIGINT" />
                  and userName = <cfqueryparam value="#arguments.oldBean.getuserName()#" cfsqltype="CF_SQL_VARCHAR" />
            </cfquery>
            <!--- if we didn't affect a single record, the update failed --->
            <cfquery name="qUpdateResult" datasource="cmsdb"  result="status">
                select apptID
                from dbo.apptTable
                where apptID = <cfqueryparam value="#arguments.newBean.getapptID()#" cfsqltype="CF_SQL_BIGINT" />
                  and clientName = <cfqueryparam value="#arguments.newBean.getclientName()#" cfsqltype="CF_SQL_VARCHAR" />
                  and topic = <cfqueryparam value="#arguments.newBean.gettopic()#" cfsqltype="CF_SQL_VARCHAR" />
                  and info = <cfqueryparam value="#arguments.newBean.getinfo()#" cfsqltype="CF_SQL_VARCHAR" />
                  and dateSubmitted = <cfqueryparam value="#arguments.newBean.getdateSubmitted()#" cfsqltype="CF_SQL_VARCHAR" />
                  and apptDate = <cfqueryparam value="#arguments.newBean.getapptDate()#" cfsqltype="CF_SQL_VARCHAR" />
                  and apptTime = <cfqueryparam value="#arguments.newBean.getapptTime()#" cfsqltype="CF_SQL_VARCHAR" />
                  and userID = <cfqueryparam value="#arguments.newBean.getuserID()#" cfsqltype="CF_SQL_BIGINT" />
                  and userName = <cfqueryparam value="#arguments.newBean.getuserName()#" cfsqltype="CF_SQL_VARCHAR" />
            </cfquery>
            <cfif status.recordcount EQ 0>
                <cfthrow type="conflict" message="Unable to update record">
            </cfif>
            <cfreturn arguments.newBean />
        </cffunction>
    If you look at the update code from the CFC, you can see all my table columns, some of which are not present in my form fields because they should never change.
    Fields in form: clientNameInput, topicInput, infoInput, dateInput, timeInput, and a combo box for am/pm.
    Columns not in form: apptID, dateSubmitted, userID, userName
    Working code:
    private function updateAppt():void{
            oldObj = new Object;
            oldObj = dg.selectedItem;
            upObj = new apptTable;
            upObj.apptID = dg.selectedItem.apptID;
            upObj.clientName = clientNameInput.text;
            upObj.topic = topicInput.text;
            upObj.info = infoInput.text;
            upObj.dateSubmitted = dg.selectedItem.dateSubmitted;
            upObj.apptDate = dateInput.text;
            upObj.apptTime = timeInput.text + ' ' + ampmCbx.value.toString();
            upObj.userID = dg.selectedItem.userID;
            upObj.userName = dg.selectedItem.userName;
            apptRO.update(oldObj,upObj);
    This code does not set upObj to the selectedItem record of the dg.  Instead it just accepts the values of the form fields and any values in the datagrid that do not change.

  • How to check two fields are matching in a validator?

    I have a "Password" field and a "Conform password" field. I like to check whether these two fields are matching in the password_validate(FacesContext context, UIComponent component, Object value) method. How to do that?
    Thanks.

    The actual problem is you can't get the value of one
    component into the next component's validator
    method.I do not find this to be true. For example, in the blog that I gave the URL to, you can see this code
    public void endCalendar_validate(FacesContext context, UIComponent component, Object value) {
    Date endDate = (Date)value;
    Date startDate = startCalendar.getSelectedDate();
    Here the validator for the endCalendar component is getting the value from a different component, the startCalendar component.

  • Angle between two objects approximated as lines

    Hi there,
    I have NI Vision and have been wondering the best way to get the angle of two objects that has been approximated by a line (say using edge detection). I have attached one frame of the avi file for your perusal. The scene is changing from frame to frame where the objects are constantly being shifted and rotated. I can track either the small object or the big object in isolation using pattern matching algorithms but the issue lies in moving the edge detection rake from frame to frame for two objects in a single trial. Please advise.
    Cheers, B.
    Attachments:
    example.jpg ‏20 KB

    Hi,
    You can do this in several ways. The straight forward way would be to use the trigonometric funtions. If you filter the image you are acquiring to get the co-ordinates of the edges of the stick and also the refence to ground, as shown in the image attached, you can use the known values to calculate the angle the stick is aligned to ground.
    Here, treat the picture as a 2D image, get the x,y co-ordinates of the point of interception (C) and the co-ordinates of a point in your stick (A). The difference in value of y between A and ground is your "p" and the difference in value of x between C and x value of the point (A) is your "b". Use the supplied equation to work out the angle as shown in image.
    This should get you started and hope it helps.
    Regards,
    CLA | LabVIEW 7.1... 2013
    www.renishaw.com
    Attachments:
    triangle1.JPG ‏12 KB

  • Additional data on relationship between two objects

    Hi
    We have a requirement to capture additional data on a relationship between two objects.  The data to be captured are custom fields that are unique to the relationship between the objects and not specific to either of the objects.
    We created a new object type and related it to the position (S)and the job (C) object.  In the customising (Personnel Management/Personnel Development/Basic Settings/Maintain Relationships there is an option to set up Additional Data.  There are however several restrictions (e.g. the substructure has to be in T77AD).  When you set up an existing substructure (e.g. PAD22) and screen (e.g. 3000), it works really well, however we have not been able to get this to read our own substructure and screen (since there is no customer include on HRP1001 and the 'Additional data' button seems to go to MP100100 to find the screen).
    My question is two fold:
    a) Is this an allowed customisation (e.g. can we create our own substructure, screen and Query string)? And if so, how does the data get into T77AD (since SAP recommends that data should not be added to this table)? and
    b) Is there any documentation on this (thus far I have only received info on how to enhance infotypes which I don't think is relevant???)?
    If this can not be maintained is there any other suggestions on how to deal with this scenario?
    Any assistance will be appreciated.
    Regards
    Liezl

    Hi everyone
    Thanks for everyone who tried to assist us with this.  I am happy to report that our in-house guru's have found the answer.  So, for anyone who is interested:
    In programme MP100100 you have a screen 6000 which is a customer enhancements screen.  We set up two in-house function modules for the PBO and PAI with its own screen and added an append structure to PAD31 to add the fields required.  In the configuration, we then specified PAD31 as the substructure with screen 6000 and then also specified our own PBO and PAI function modules.  The parameters required for screen 6000 is set up within our own customer screens.
    Hope this will be helpful to someone - it certainly seemed to open up some doors for us!
    Regards
    Liezl

  • How to add two objects on scene and how to rotate them?

    I am beginer on 3d. I am trying do write applet where are 3x3x3 rubic.
    My plans are to have 27 litle cubes. There are 6 flats (9 cubes in a flat) so i have six objects groups. My problem at this moment is that i cant find out how to make two objets. Each of this two objects consists from couple more litle objects. Some of litle objects can be in first and second big object. For example it can be two flats of rubic (corner).
    Is anybody have some examples or somehow to hepl me to find out.
    Thanks a lot

    I have code :
    import java.applet.Applet;
    import java.awt.*;
    import java.awt.event.MouseEvent;
    import java.awt.event.MouseListener;
    import com.sun.j3d.utils.applet.MainFrame;
    import com.sun.j3d.utils.behaviors.mouse.*;
    import com.sun.j3d.utils.universe.SimpleUniverse;
    import javax.media.j3d.*;
    import javax.vecmath.AxisAngle4f;
    import javax.vecmath.Color3f;
    import javax.vecmath.Vector3f;
    public class RubicApplet extends Applet implements MouseListener
         TransformGroup objRotate = null;
    public BranchGroup createSceneGraph(SimpleUniverse su,Canvas3D canvas)
         // Create the root of the branch graph
         BranchGroup objRoot = new BranchGroup();
         objRoot.setCapability(BranchGroup.ALLOW_DETACH);
    Transform3D transform = new Transform3D();
         transform.setRotation(new AxisAngle4f(.5f,1f,1f,.5f));
    BoundingSphere behaveBounds = new BoundingSphere();
    // create Cube and RotateBehavior objects
    objRotate = new TransformGroup(transform);
    objRotate.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
    objRotate.setCapability(TransformGroup.ALLOW_TRANSFORM_READ);
    objRotate.setCapability(TransformGroup.ENABLE_PICK_REPORTING);
    // Colors
    Color3f gray = new Color3f(0.2f,0.2f,0.2f);
    Color3f red = new Color3f(1.0f,0.0f,0.0f);
    Color3f white = new Color3f(1.0f,1.0f,1.0f);
    Color3f yellow = new Color3f(1.0f,1.0f,0.0f);
    Color3f green = new Color3f(0.0f,1.0f,0.0f);
    Color3f blue = new Color3f(0.0f,0.0f,1.0f);
    Color3f purple = new Color3f(1.0f,0.0f,1.0f);
         // Object possition
    float x=-0.5f;
    float y=-0.5f;
    float z=-0.5f;
    objRoot.addChild(objRotate);
         // colors for: back, front, right, left, bottom, top
    Color3f[] myColors0 = {white,gray,gray,red,blue,gray};
    RCube cube1 = new RCube(myColors0,new Vector3f(x-1,y-1,z-1));
         // colors for: back, front, right, left, bottom, top
    Color3f[] myColors1 = {gray,gray,gray,red,blue,gray};
         RCube cube2 = new RCube(myColors1,new Vector3f(x-1,y-1,z+1));
         // colors for: back, front, right, left, bottom, top
    Color3f[] myColors2 = {gray,yellow,gray,red,blue,gray};
         RCube cube3 = new RCube(myColors2,new Vector3f(x-1,y-1,z+3));
    // colors for: back, front, right, left, bottom, top
    Color3f[] myColors3 = {white,gray,gray,red,gray,gray};
         RCube cube4 = new RCube(myColors3,new Vector3f(x-1,y+1,z-1));
    objRotate.addChild(cube1);
    objRotate.addChild(cube2);
    objRotate.addChild(cube3);
    objRotate.addChild(cube4);
    MouseRotate myMouseRotate = new MouseRotate();
    myMouseRotate.setTransformGroup(objRotate);
    myMouseRotate.setSchedulingBounds(new BoundingSphere());
    objRoot.addChild(myMouseRotate);
    MouseTranslate myMouseTranslate = new MouseTranslate();
    myMouseTranslate.setTransformGroup(objRotate);
    myMouseTranslate.setSchedulingBounds(new BoundingSphere());
    objRoot.addChild(myMouseTranslate);
    MouseZoom myMouseZoom = new MouseZoom();
    myMouseZoom.setTransformGroup(objRotate);
    myMouseZoom.setSchedulingBounds(new BoundingSphere());
    objRoot.addChild(myMouseZoom);
    // Let Java 3D perform optimizations on this scene graph.
    objRoot.compile();
         return objRoot;
    public RubicApplet()
    setLayout(new BorderLayout());
    GraphicsConfiguration config =SimpleUniverse.getPreferredConfiguration();
    Canvas3D canvas3D = new Canvas3D(config);
    canvas3D.addMouseListener(this);
    add("Center", canvas3D);
    SimpleUniverse simpleU = new SimpleUniverse(canvas3D);
    BranchGroup scene = createSceneGraph(simpleU,canvas3D);
         simpleU.getViewingPlatform().setNominalViewingTransform();
    simpleU.addBranchGraph(scene);
    public static void main(String[] args)
    Frame frame = new MainFrame(new RubicApplet(), 600, 600);
         public void mouseClicked(MouseEvent e)
         public void mouseEntered(MouseEvent e)
         public void mouseExited(MouseEvent e)
         public void mousePressed(MouseEvent e)
         public void mouseReleased(MouseEvent e)
    I need to rotate with some event two cubes and with some other event rotate three cubes

  • HT1977 I'm a iPhone 4s and new iPad 3 owner.  I'd like the apps and organization I've invested in the iphone to be exactly transfered to the ipad.  Is this possible?  Will all the applications and folders match exactly?  Thank you for your help

    I'm a iPhone 4s and new iPad 3 owner.  I'd like the apps and organization time I've invested in the iphone to be exactly transfered to the ipad.  Is this possible?  Will all the applications and folders match exactly?  Thank you for your help

    Restore the latest iPhone backup you made to the iPad.

  • Two objects claim ownership of UID: U15536 Class: TextFrame

    I have a problem : When I try to save a project of Muse or attempt to modify it, the error " : U15536 Class: Two objects claim ownership of UID. TextFrame "
    I have installed the version 2014.2 CC Muse
    How I can fix it?
    Thankyou.

    My sincere apologies for the disconnect. I searched the [email protected] case system and found no messages from your e-mail address. Perhaps the file was sent using a file sharing service or from a different e-mail address? We sometimes receive files from sharing services that provide no return e-mail address and that have no other information to connect the sharing invite with a forum thread or customer, so we're left with no way to reconnect with the customer.
    I'm personally far less active on the forums since the first of the year. My primary role on Muse has always been as a Developer. I've historically spent a lot of my own time and too much of my work time here on the forum, versus directly working on developing Muse. Since the first of the year, I'm redirecting my time to development. I'm no longer reading every message or checking forum traffic on a regular basis, so I didn't see you last two messages until now.
    If you send your current .muse file to [email protected], I'll see that it gets repaired and returned in a timely fashion. If you send a second message with no attachment directly to me, [email protected], I'll confirm the message to [email protected] was received.
    We very recently had a break through and determined the pattern of activity that can lead to this damage within a file. We have a fix currently in testing that will be included in the next release (in a few weeks).

  • Two objects claim ownership of UID: U3615 Class: Text Frame

    Hi guys,
    since i updated today i can't save my project file anymore. Getting an error when i try to save saying:
    Two objects claim ownership of UID: U3615 Class: Text Frame
    Is there a way to fix it or did i lose all my progress from today? That would be devastating.
    Greetings,
    Joern

    Please send us a copy of your .muse file at [email protected] and include a link to this thread. If it's too big for e-mail (>20 mb) you could use a service like Dropbox, Adobe SendNow, WeTransfer, etc. We'll repair and return.

  • Two objects moving around with mouse

    I'm making a catching game and I only wanted the falling objects hit certain area on my catcher. My catcher is a girl with mouth open and I wanted the falling objects to hit only the mouth, not any other parts of her body like arms. So I made two objects, the full girl and just the mouth. How do I make the two objects (movieclips) move around with the mouse?
    I tried to embed one object into another but it didn't work....
    This is actionscript I wrote so far:
    package {
        import flash.display.*;
        import flash.events.*;
        import flash.text.*;
        import flash.utils.Timer;
        import flash.utils.getDefinitionByName;
        public class CatchingSkittles extends MovieClip {
            var girlmouthfront:GirlMouthFront;
            var girlmouth:GirlMouth;
            var nextObject:Timer;
            var objects:Array = new Array();
            var score:int = 0;
            const speed:Number = 7.0;
            public function CatchingSkittles() {
                girlmouthfront = new GirlMouthFront();
                girlmouthfront.y = 258.00;
                addChild(girlmouthfront);
                setNextObject();
                addEventListener(Event.ENTER_FRAME, moveObjects);
            public function setNextObject() {
                nextObject = new Timer(1000+Math.random()*1000,1);
                nextObject.addEventListener(TimerEvent.TIMER_COMPLETE,newObject);
                nextObject.start();
            public function newObject(e:Event) {
                var goodObjects:Array = ["Red","Purple","Yellow","Orange","Green"];
                if (Math.random() < .5) {
                    var r:int = Math.floor(Math.random()*goodObjects.length);
                    var classRef:Class = getDefinitionByName(goodObjects[r]) as Class;
                    var newObject:MovieClip = new classRef();
                    newObject.typestr = "good";
                } else {
                    r = Math.floor(Math.random()*goodObjects.length);
                    classRef = getDefinitionByName(goodObjects[r]) as Class;
                    newObject = new classRef();
                    newObject.typestr = "good";
                newObject.x = Math.random()*500;
                addChild(newObject);
                objects.push(newObject);
                setNextObject();
            public function moveObjects(e:Event) {
                for(var i:int=objects.length-1;i>=0;i--) {
                    objects[i].y += speed;
                    if (objects[i].y > 425) {
                        removeChild(objects[i]);
                        objects.splice(i,1);
                    if (objects[i].hitTestObject(girlmouthfront)) {
                        if (objects[i].typestr == "good") {
                            score += 5;
                        } else {
                            score += 5;
                        if (score < 0) score = 0;
                        scoreDisplay.text = "Score: "+score;
                        removeChild(objects[i]);
                        objects.splice(i,1);
                girlmouthfront.x = mouseX;

    Never mind. I got everything to work. Thanks for your help! I changed my code to:
    [code]
    public class CatchingSkittles extends MovieClip {
            var girlmouth:GirlMouth;
            var girlmouthfront:GirlMouthFront;
            var nextObject:Timer;
            var objects:Array = new Array();
            var score:int = 0;
            const speed:Number = 7.0;
            public function CatchingSkittles() {
                girlmouthfront = new GirlMouthFront();
                girlmouthfront.y = -49.00;
                girlmouth = new GirlMouth();
                girlmouth.y = 308.55;
                addChild(girlmouth);
                girlmouth.addChild(girlmouthfront);
                setNextObject();
                addEventListener(Event.ENTER_FRAME, moveObjects);
    [/code]

  • Two objects from one table

    My current setup is two tables and two objects with a one to one relationship between them, Object and ObjectMD (metadata).
    Not sure why my predecessors set it up like this but...that's how it is.
    The problem is that my Object table (and thus ObjectMD also) has reached 40 million rows and large joins between Object and ObjectMD are taking forever and are completely unnecessary.
    I want to import the ObjectMD data into the Object table and go forward with a single table. The problem is that the ObjectMD table has it's own java surrounding it and that code is used in way too many places to weed it out. I need to leave the Java object structure in place.
    I think I should be able to create both these objects from a single table, but I can not figure out the descriptor. My set method needs to be getMetaData().setMethod, but of course TL's reflection doesn't like this. I suppose I could create new methods in Object to get/set all these fields and just forward them to the real methods.
    How can I define descriptors to create two objects from a single table?

    What I decided on for my last problem was to use a method to setBar, and inside that method, set the Foo of the Bar.
    Here are my files for future reference:
    --------------------------------------Foo.java-------------------------------------
    public class Foo {
         public int id;
         public String first;
         public Bar bar;
         public void setBar(Bar newBar){
              if(newBar != null){
                   newBar.foo = this;
              this.bar = newBar;
    --------------------------------------Bar.java-------------------------------------
    public class Bar {
         public Foo foo;
         public String second;
    --------------------------------------Descriptors.java-------------------------------------
    public class Descriptors {
         public static void addDescriptors(Project project) {
    project.addDescriptor(Descriptors.buildFooDescriptor());
    project.addDescriptor(Descriptors.buildBarDescriptor());
    private static Descriptor buildFooDescriptor() {
    Descriptor descriptor = new Descriptor();
    //     basic information
    descriptor.setJavaClass(Foo.class);
    descriptor.addTableName("FOO");
    descriptor.setPrimaryKeyFieldName("ID");
    //     mappings
    DirectToFieldMapping directToFieldMapping;
    AggregateObjectMapping aggregateObjectMapping;
    //     id mapping
    directToFieldMapping = new DirectToFieldMapping();
    directToFieldMapping.setAttributeName("id");
    directToFieldMapping.setFieldName("ID");
    descriptor.addMapping(directToFieldMapping);
    //     first mapping
    directToFieldMapping = new DirectToFieldMapping();
    directToFieldMapping.setAttributeName("first");
    directToFieldMapping.setFieldName("FIRST");
    descriptor.addMapping(directToFieldMapping);
    //     bar mapping
    aggregateObjectMapping = new AggregateObjectMapping();
    aggregateObjectMapping.setAttributeName("bar");
    aggregateObjectMapping.setReferenceClass(Bar.class);
    aggregateObjectMapping.setSetMethodName("setBar");
    aggregateObjectMapping.dontAllowNull();
    descriptor.addMapping(aggregateObjectMapping);
    return descriptor;
    private static Descriptor buildBarDescriptor() {
    Descriptor descriptor = new Descriptor();
    // basic information
    descriptor.descriptorIsAggregate();
    descriptor.setJavaClass(Bar.class);
    //     mappings
    DirectToFieldMapping directToFieldMapping;
    //     second mapping
    directToFieldMapping = new DirectToFieldMapping();
    directToFieldMapping.setAttributeName("second");
    directToFieldMapping.setFieldName("SECOND");
    descriptor.addMapping(directToFieldMapping);
    return descriptor;
    ----------------------------------------Go.java------------------------------------
    public class Go {
         public static void main(String[] args) {
              if(args.length != 0){
                   throw new RuntimeException("Arguments are not supported");
              Project project = new Project();
              project.setName("fooBarProject");
              DatabaseLogin login = new DatabaseLogin();
         login.usePlatform(new Oracle9Platform());
         login.setDriverClassName("oracle.jdbc.driver.OracleDriver");
         login.setConnectionString("jdbc:oracle:thin:@nnn.nnn.nnn.nnn:nnnn:SERVICE");
         project.setDatasourceLogin(login);
         Descriptors.addDescriptors(project);
         Server server = project.createServerSession(2, 2);
         server.setLogLevel(oracle.toplink.sessions.SessionLog.FINE);
         server.login("schema", "password");
         Session session = server.acquireClientSession();
         UnitOfWork uow = session.acquireUnitOfWork();
         Foo fooBar = (Foo) uow.newInstance(Foo.class);
         fooBar.id = (int) (Math.random() * 10000);
         fooBar.first = "abcd";
         uow.commit();
         ExpressionBuilder builder = new ExpressionBuilder();
         Foo fooBarLoad = (Foo) session.readObject(Foo.class, builder.get("id").equal(fooBar.id));
         System.out.println("ID:" + fooBarLoad.id + " FIRST:" + fooBarLoad.first + " SECOND:" + fooBarLoad.bar.second );
         session.release();
         server.logout();
    ------------------------------------------------------------------------------------------

  • Can I combine two objects into one?

    Hi all:
    I got a problem here: I just wonder if anyone knows how to combine the informations which I grabed from a SQL database to an object I obtained from an OO database at runtime.
    I look forward to your reply and appreciate your concern!
    regards
    David
    at [email protected]

    Thanks for you reply, but the combined two objects can not be pre-defined because it is defined at runtime, say, there are a number of objects in database, only when you select the one for combining, you know what it is!
    Cheers
    David

Maybe you are looking for

  • Issue when opening Xcelsius-file in InfoView

    Hi all, We have a setup with following hw/sw: Srv: MS Windows 2003 SP2 4 GB RAM 40 GB HD (9 GB unused) Intel Xeon E5430 @ 2.66 GHz BO Edge XI 3.1 Integration Kit for SAP systems Microsoft Office 2003 Crystal Reports 2008 Xcelsius 2008 Live Office The

  • Why is my iPhone locked after update to iOS 7.0.4.

    Hi, I installed iOS 7.04 on my iPhone 4.  I have not been able to use the phone since because it is asking for a password, which I did not have before the upgrade.  My Apple ID password does not work.  This means that I cannot go to "settings" in my

  • Word to the wise: title 3d and autorender function

    If you have the auto-render function turned on, open title 3-d and walk away for lunch, you'll freeze FCP. You get the little "Auto render complete" box, but you cannot click OK because it comes from FCP, which becomes idle when you open 3d. Possible

  • Solaris 9 Oracle 10.1.0.4 (release 2) install into current database?

    How would I install a newer version of Oracle using the old tablespaces and other database objects (controlfiles, undo, dictionary, schemas, ... Can I install 10.1.0.4 into a new directory and somehow make it own the stuff from 10.1.02?

  • Empty Crystal Report

    Hi Experts, I tried to change old crystal Reports template (AR invoice)  after I imported in into 8.8 like this. 1. Rename parameter to DocKey@ 2. Change Selection Record fomulas as  {OINV.DocNum} = {?DocKey@} 3. Change Datasource to SAPB1 (In ODBC s