Chapter 1. Introduction

Realsoft 3D™ SDK is a general purpose object-oriented 'C' cross-platform toolkit. It can be used for:

In addition to C language plugins and applications can be written in any language that can call the the Realsoft-C API. As the API is pure 'C' all the standard 'C' coding conventions and rules apply.

The SDK consists of the following folders:

Contents

inc

standard 'C' header files defining public methods and attributes for Realsoft 3D classes

libs

'C' link libraries through which you can link Realsoft 3D libraries to your applications and plugins (link libraries are only needed for the Windows platform). On unix platforms Realsoft 3D uses shared libraries included with the actual Realsoft Graphics Oy sofware products.

makes

platform specific makefiles for building executables, libraries, and other artifacts for applications.

scripts

setup scripts for initializing the cross-platform build environment for use. There is a script for each supported platform

samples

example plugins and applications demonstrating the Realsoft 3D API.

The samples folder contains examples for most commonly needed purposes

Examples

kernel

General purpose examples demonstrating the actual cross-platform Realsoft-C kernel API. The kernel library implements all the platform specific features, such as semaphores, threads, sliders, making rest of the code platform independent.

applications

example applications demonstrate how to build new applicatiosn built on top of the Realsoft Graphics Oy libraries.

plugins

examples demonstrating how to write new plugins for Realsoft Graphics Oy applications.

Realsoft-C API

As Realsoft-C is pure 'C' API it implements a set of functions for creating and manipulating objects.

New objects can be created with R3New() :

    
// create a sphere
R3VECTOR center = {0.1, 0.0, 0.0};
R3FLOAT radius = 1.0;            
sphere = R3New(R3CLID_SPHERE,
               R3T(R3SPHA_Center, &center),
               R3T(R3SPHA_Radius, &radius),
               R3TAG_END);
    
  

To set object attributes:

   
R3SetAttrs(sphere,
           R3T(R3SPHA_Center, &center),
           R3T(R3SPHA_Radius, &radius),
           R3TAG_END);
   
 

Correspondingly there is a method R3GetAttrs(), for fetching object attributes.

The following two example demonstrates typical method call in Realsoft-C

   
rc=R3DoA(sphere, R3PRIMA_TRANSFORM, &transformation);
   
 

For more information on Realsoft-C object-oriented API check out the the section called “C++ vs. Realsoft-C”. There is also an example samples/kernel/cplusplus demonstrating how to integrate C++ and to Realsoft-C code.

If you can't find appropriate example from the 'samples' folder, please contact us at realsoft.com.

[Important] Important
Realsoft 3D SDK is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL REALSOFT GRAPHICS OY BE LIABLE FOR ANY DAMAGES CAUSED USE OF THIS MATERIAL.