• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by rawatenator · Apr 14, 2012 at 12:51 PM · c#augmented-realitynamespacequalcommqcar

Name Spaces in C# and how to access external libraries

BACKGROUND

I have a free trial of unity pro, and am using QCAR augmented Reality. I am new to C#, (but well versed in JS), so I would appreciate some help using namespaces.

I want to use the method called projectPoint, described in the QCAR documentation here: https://ar.qualcomm.at/qdevnet/api . projectPoint usage is below:

QCAR_API Vec2F QCAR::Tool::projectPoint ( const CameraCalibration & calib, const Matrix34F & pose, const Vec3F & point )

QUESTION

How can I call this function inside C# script? And, what are the necessary imports/include(s)/namespace requirements?

PAST ATTEMPTS

Note, QCAR has been properly installed because the demo code from Qualcomm works fine. However, they don't use projectPoint or any similar function so I couldn't learn the usage from the samples.

I have tried and get the following errors:

  1. include QCAR (Error: QCAR is a type, not a namespace)

  2. using QCAR::Tool (Alias QCAR not found)

just executing the function in my C# class, I also get errors:

  1. QCAR.VideoMode videoMode = QCAR::CameraDevice.getInstance().getVideoMode(CameraDevice.MODE_DEFAULT); (The nested type VideoMode' does not exist in the type QCAR')

  2. QCAR::VideoBackgroundConfig config = QCAR::Renderer::getInstance().getVideoBackgroundConfig(); (error CS1525: Unexpected symbol `::')

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image rawatenator · Apr 20, 2012 at 04:27 AM 0
Share

Could somebody please suggest how to improve this question...I'm getting stuck and don't know how to get around it

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by senad · Apr 20, 2012 at 06:47 AM

The code in your question is all C++. Is it possible that you are trying to link/include a C++ library from C#?

If yes, then you would have to find a wrapper dll which exposes your QCAR-library to .NET. You could also write your wrapper library yourself if one does not exist.

This is just my best guess without knowing QCAR. :)

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image rawatenator · Apr 20, 2012 at 04:53 PM 0
Share

You are correct. I posted on the QCAR website and they said the same thing. I have to wait until the new QCAR docs come out for unity. Thanks.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Multiple Cars not working 1 Answer

Distribute terrain in zones 3 Answers

Unity Qualcomm API 1 Answer

How is the game's performance looking on Android? 0 Answers

Why should we don't use namespace? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges