SetVertexBufferOffset

Sets the offset for a Vertex Buffer.
The offset will always be calculated in 64 bit, even if the vertex element size is 32 bit.
This function can be called just before updating the vertex buffer.

Syntax

//
//   Strong typing definition
//
void            SetVertexBufferOffset(
                        OwlModel                model,
                        double                  x,
                        double                  y,
                        double                  z
                    );

static  inline  void    SetVertexBufferOffset(
                                OwlModel                model,
                                const double            * offset
                            )
{
    if (offset) {
        return  SetVertexBufferOffset(
                        model,
                        offset[0],
                        offset[1],
                        offset[2]
                    );
    }
    else {
        return  SetVertexBufferOffset(
                        model,
                        0.,
                        0.,
                        0.
                    );
    }
}


//
//   Weak typing definition
//
void    __declspec(dllexport) __stdcall SetVertexBufferOffset(
                                                int64_t                 model,
                                                double                  x,
                                                double                  y,
                                                double                  z
                                            );

static  inline  void    SetVertexBufferOffset(
                                int64_t                 model,
                                const double            * offset
                            )
{
    if (offset) {
        return  SetVertexBufferOffset(
                        model,
                        offset[0],
                        offset[1],
                        offset[2]
                    );
    }
    else {
        return  SetVertexBufferOffset(
                        model,
                        0.,
                        0.,
                        0.
                    );
    }
}
    

Property model

Size: 64 bit / 8 byte (value)
The handle to the model. The model handle is static during its existance. Several models can be opened simultaniously within one session. Different models are always independent, threads are allowed to be running on different models simultaniously.

Property x

Size: 64 bit / 8 byte (value)
x Coordinate

Property y

Size: 64 bit / 8 byte (value)
y Coordinate

Property z

Size: 64 bit / 8 byte (value)
z Coordinate