188 lines
5.2 KiB
C
188 lines
5.2 KiB
C
/* =========================================================================
|
|
|
|
Program: Multiple Projector Library
|
|
Language: C++
|
|
Date: $Date$
|
|
Version: $Revision$
|
|
|
|
Copyright (c) 2013 Scalable Display Technologies, Inc.
|
|
All Rights Reserved
|
|
The source code contained herein is confidential and is considered a
|
|
trade secret of Scalable Display Technologies, Inc
|
|
|
|
===================================================================auto== */
|
|
|
|
#ifndef _EasyBlendSDKMesh_H_
|
|
#define _EasyBlendSDKMesh_H_
|
|
|
|
|
|
|
|
#include "EasyBlendSDKTypes.h"
|
|
#include "EasyBlendSDKFrustum.h"
|
|
|
|
|
|
// This structure is exported from the EasyBlendSDK.dll
|
|
|
|
|
|
// Description:
|
|
// This structure contains all of the state held by an 'instance' of the
|
|
// EasyBlend SDK. To create a new Mesh strucutre, call the Initialize
|
|
// SDK function with a valid EasyBLend calibration mesh ( .ol file ).
|
|
// The reasources used by this structure MUST be released using the
|
|
// UnInitialize SDK function call.
|
|
typedef struct {
|
|
|
|
// Description:
|
|
// The mapping of coordinates used by the mesh
|
|
// Coordinates can be normalized ( (0,1) )
|
|
// or in pixel values.
|
|
// Note: constants defined in EasyBlendTypes.h file.
|
|
EasyBlendSDKMapping Mapping;
|
|
|
|
// Description:
|
|
// The samplingmode for the mesh.
|
|
// Currently can be one of either linear sampling,
|
|
// anisotropic, or cubic sampling.
|
|
// Note: constants defined in EasyBlendTypes.h file.
|
|
EasyBlendSDKSampling Sampling;
|
|
|
|
// Description:
|
|
// The type of projection that should be used when applying
|
|
// the mesh. Another way to think about this is the type of
|
|
// correction already applied to the mesh when generated
|
|
// by the EasyBlend calibration system.
|
|
// Currently, can be one of orthographic or perspective.
|
|
// Note: constants defined in EasyBlendTypes.h file.
|
|
EasyBlendSDKProjection Projection;
|
|
|
|
// Description:
|
|
// The frustum which corresponds to the section of
|
|
// the rendered scene needed as input to the mesh
|
|
// generated by the EasyBlend calibration system.
|
|
// This is only filled and valid if the projection type is
|
|
// perspective.
|
|
EasyBlendSDK_Frustum Frustum;
|
|
|
|
// Description:
|
|
// The anisotropic filtering value used if the
|
|
// Sampling type is anisotropic
|
|
float AnisValue;
|
|
|
|
// Description:
|
|
// The region of the overall scene represented by this
|
|
// particualr mesh. In the case of Orthographic projection,
|
|
// these are the coordinates of the overall scene that are
|
|
// needed as input for this mesh. In the case of perspective
|
|
// projection, these coordinates define the boundary of the input
|
|
// for this mesh given that it were a flat mesh, however
|
|
// the Frustum structure represents tha actual viewing
|
|
// pyramid required to generate the correct section of the
|
|
// rendered scene.
|
|
// Note: the coordinate unit are dependant on the Mapping for this
|
|
// mesh
|
|
float Bottom;
|
|
float Top;
|
|
float Left;
|
|
float Right;
|
|
|
|
// Description:
|
|
// A floating point number describing the version number
|
|
// for this mesh.
|
|
float Version;
|
|
|
|
// Description:
|
|
// The output resolution of this mesh, in pixels, as it pertains
|
|
// to having the mesh map an image into a warped image
|
|
unsigned long Xres;
|
|
unsigned long Yres;
|
|
|
|
// Description:
|
|
// Approximate values of the effective resolution, in pixels,
|
|
// of this mesh's output. This differs from the output
|
|
// resolution because some care is taken to deal with
|
|
// overlaps between the outputs of separate meshes given the
|
|
// EasyBlend calibration generated for a particular system.
|
|
unsigned long ApproxXres;
|
|
unsigned long ApproxYres;
|
|
|
|
// Description:
|
|
// SDK operating mode.
|
|
int SDKMode;
|
|
|
|
// Description:
|
|
// Client mesh data - only available if SDKMode is EasyBlendSDK_ClientData.
|
|
EasyBlendSDK_ClientMesh *ClientMesh;
|
|
|
|
// Description:
|
|
// Internal state of the EasyBlend SDK stored with each mesh.
|
|
void* token;
|
|
|
|
} EasyBlendSDK_Mesh;
|
|
|
|
typedef EasyBlendSDK_Mesh MeshSDK_Mesh;
|
|
|
|
/* ====================================================================== */
|
|
|
|
// Description:
|
|
// Structures for client data
|
|
// - used only if SDKMode is EasyBlendSDK_SDKMODE_ClientData.
|
|
struct _ClientMesh {
|
|
int NumVertices;
|
|
const EasyBlendSDK_ClientVertex2 *Vertices2;
|
|
const EasyBlendSDK_ClientVertex3 *Vertices3;
|
|
float DynamicTransform[4][4];
|
|
|
|
int NumFaces;
|
|
const EasyBlendSDK_ClientFace *Faces;
|
|
|
|
float Gamma;
|
|
const unsigned char *BlackLevel;
|
|
const unsigned char *Mask;
|
|
int ColorDim[3];
|
|
const unsigned char *Color; //this field is deprecated, use ColorF instead
|
|
const float* ColorF;
|
|
};
|
|
|
|
struct _ClientVertex2 {
|
|
// Projector coordinates.
|
|
float x;
|
|
float y;
|
|
|
|
// Texture coordinates.
|
|
float u;
|
|
float v;
|
|
|
|
// Alpha.
|
|
float a;
|
|
};
|
|
|
|
struct _ClientVertex3 {
|
|
// Projector coordinates.
|
|
float x;
|
|
float y;
|
|
|
|
// 3D coordinates.
|
|
float X;
|
|
float Y;
|
|
float Z;
|
|
|
|
// Alpha.
|
|
float a;
|
|
};
|
|
|
|
struct _ClientFace {
|
|
// Vertex indices.
|
|
unsigned int v1;
|
|
unsigned int v2;
|
|
unsigned int v3;
|
|
};
|
|
|
|
// Description:
|
|
// Callback type - only used if SDKMode is EasyBlendSDK_SDKMODE_ClientData.
|
|
typedef EasyBlendSDKError (* EasyBlendSDKCallback)(EasyBlendSDK_Mesh *msm,
|
|
void *cbData);
|
|
|
|
/* ====================================================================== */
|
|
|
|
#endif
|