The inventor mentor-Chapter 1 file format

Source: Internet
Author: User

Chapter 4 File Format

 

Objectives of this Chapter

After reading this chapter, we will be able to do the following:

 

L outputs scenario data to a file in ASCII or binary format.

L read the scenario file and input the data to the inventor database.

L create a graphic scenario using an inventor scenario file.

L read graphics from the memory buffer.

 

This chapter describes the ASCII file format of inventor. Whenever we apply the write action to a node, path, or path list, scenario data is output in ASCII format. Using the database's file reading method, we can read files in the ASCII file format and input data to the inventor database. This file format can also be used to transfer 3D copy and paste data between two program processes.

 

 

Output graphics scenarios

As described in Chapter 9th, we can apply the output action to a node, path, or path list. When the output action is applied to a node, it uses this node as the root node and outputs the entire sub-scenario.

SoWriteAction    writeAction;

writeAction.apply(root); //writes the entire scene graph to stdout

 

 

Scenario for reading from files

TheReadall ()Method, we can read the graphic scenario data from a file to the scenario database. The following code reads a file with a given name, and then returnsSoseparatorNode. If an error occurs during file reading, the function returns NULL.

 

For the complete translation of this chapter, please download the following link:

The inventor mentorOriginal English version. Download

The inventor mentorChinese translation. Download

The inventor mentorSample Code. Download

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.