Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9166837
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T15:14:44+00:00 2026-06-17T15:14:44+00:00

I am in the process of converting an OpenGL java application into Objective-C. Here

  • 0

I am in the process of converting an OpenGL java application into Objective-C. Here is a copy of the constructor from my java constructor from a file called AmbientMovement:

public class AmbientMovement {

private final float         FPS;

private final Frame[]               FRAMES;
private final int           NUMBER_FRAMES;
private final float         CYCLE;
private final Random            RANDOM;
private int             indexAmbient;
private float               timeAmbient;
private float               timeCurrent;

public AmbientMovement(Frame[] frames, float fps) {

    this.FPS              = fps;

    this.FRAMES           = frames;
    this.NUMBER_FRAMES    = frames.length;

    Frame lastframe       = frames[this.NUMBER_FRAMES - 1];
    this.CYCLE            = lastframe.getTime() + lastframe.getDuration();
    this.RANDOM           = new Random();

    this.resetClock();
}

This is my attempt to write the code using Objective-c for iOS 6 and X-Code 4.5:

AmbientMovement.h

    #import "VA-Frame.h"
    #import "VA-TRSet.h"
    #import "VA-Morph.h"
    #import "VA-Quaternion.h" 
    #import "math.h"

    @interface VA_AmbientMovement : NSObject{

    /* Private members */
    @private {
        @property float const*  FPS;
        @property int const*    NUMBER_FRAMES;
        @property float const*  CYCLE;
        @property int           indexAmbient;
        @property float         timeAmbient;
        @property float         timeCurrent;
    }

}

AmbientMovement.m

#import "VA_AmbientMovement.h"

@implementation VA_AmbientMovement

/* Initialise the AmbientMovement constructor */
-(id)initAmbientMovement:(Frame[])frames AndFPS :(float)fps{
    self=[super init];
    if(self){
        FPS                 = 0;
        NUMBER_FRAMES       = 0;
        CYCLE               = 0;
        indexAmbient        = 0;
        timeAmbient         = 0;
        timeCurrent         = 0;

        Frame* frame = [[Frame alloc]      initAmbientManager:frames AndFPS:fps];
        TRSet* trset = [[TRSet alloc]      initAmbientManager:frames AndFPS:fps];
        Morph* morph = [[Morph alloc]      initAmbientManager:frames AndFPS:fps];
        Quaternion* quat   = [[Quaternion alloc]    initAmbientManager:frames AndFPS:fps];
    }
    return self;
};

-(id)init{
    return [self initAmbientMovement:0 AndFPS: 0];
};

One of the major things I am confused with, is how to pass a parameter of type class. In java this is done through “Frame[] frames”. Can I do this in objective-c using the following line “(Frame[])aframes” or am I making a mistake?

Many Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T15:14:46+00:00Added an answer on June 17, 2026 at 3:14 pm

    What you have there will work fine – but generally when passing arrays around in objective-c you would want to use either an NSArray or an NSMutableArray rather than the c-style arrays.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am in the process of converting a legacy application from proprietary technology to
I am in the process of converting some code from C# to Java. I
In the process of converting a C# application to Java, I came across the
Has anybody gone through the process of converting a real-world business application from ASP.NET
Our shop is in the process of converting our internal project management application from
Scenario : We are in the process of converting an application from PHP 4
What is the process of converting win32 application (a small popup window actually) to
I'm in the process of converting/migrating a Visual Studio OpenGL project to an Xcode
I am in process of converting Visual Basic app into Python Django. Currently, it
We are in the process of converting from CVS to Mercurial hg. Our infrastructure

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.