
NAME
Direct Transfer Application Programming Interface
SYNOPSIS
#include <Dt.h>
DESCRIPTION
The Dt API is provided by GameExport to support third party
exporting modules. Through the use of this API, a programmer
can write new export DSO's which GameExport will then load
at start time. When the user invokes the export DSO, all
scene information is available for exporing to any given
file format.
To ensure your DSO will be found and loaded you will need
to add the following variables and structure to your DSO:
// These variables are searched for by the DSO loader
// to determine if this DSO should be loaded for this
// application. If they are not in your DSO exactly
// as seen below your DSO will NOT get loaded.
//
char *program = "GameExport";
char *version = "2.0";
char *type = "Export";
// Table structure for DSO labels and entry functions.
// This table is used to supply the GameExport application
// with entry points into your DSO.
//
typedef struct {
char *label;
int (*DtEntryFunc)( void );
int (*DtCmdFunc)( int argc, char **argv );
int (*DtExitFunc)( void );
} DtEntryTable;
label - The name that will be placed in the export menu.
DtEntryFunc - A pointer to the entry function for your
DSO.
DtCmdFunc - A pointer to the command line function for
your DSO. If you do not want a command line option for
your DSO, set this function to NULL.
DtExitFunc - A pointer to the exit function for your DSO.
This should ensure that any X resources are cleaned up, before
unloading from memory. Be careful that the X widgets are not
destroyed after the DSO is unloaded, or else Alias will core dump.
For example, these declarations are used for the Wavefront
export utility, which can be found in the
$GAMES_LOCATION/source/GetWavefront directory.
char *program = "GameExport";
char *version = "2.0";
char *type = "Export";
int DtExportCount = 1;
DtEntryTable DtExportTable[] = {
{ EXPORT_LABEL, WaveExport, WaveCmdExport, WaveExit },
};
FUNCTIONS
The following is a list of all functions available in the Dt
API. Simply include the header file Dt.h to get prototypes
for these functions and all constants used by them.
DtCameraGetAspect - Get the given camera's aspect ratio.
DtCameraGetCount(3W) - Get the number of cameras in the
scene.
DtCameraGetFarClip(3W) - Get the given camera's far clipping
plane value.
DtCameraGetFocalDistance(3W) - Get the given camera's focal
distance.
DtCameraGetHeight(3W) - Get the given camera's height.
DtCameraGetHeightAngle(3W) - Get the given camera's height
angle.
DtCameraGetInterest(3W) - Get the Interest position for the
given camera.
DtCameraGetMatrix(3W) - Get the current matrix for the given
camera.
DtCameraGetNearClip(3W) - Get the given camera's near
clipping plane value.
DtCameraGetOrientation(3W) - Get the orientation for the
given camera.
DtCameraGetOrientationQuaternion(3W) - Get the orientation in
quaternions for the given camera.
DtCameraGetPosition(3W) - Get the position for the given
camera.
DtCameraGetType(3W) - Get the camera type for the given
camera.
DtCameraIsValid(3W) - Get the state of the valid bits for
the given camera.
DtCnetCharacterCount(3W) - Get the number of characters in
the current model.
DtCnetCharacterGetFrameRange(3W) - Get the range of frames
in the character network.
DtCnetCharacterGetshapes(3W) - Get the number and list of
shapes that belong to the characters.
DtCnetCharacterName(3W) - Get the name of the specified
character.
DtCnetGetStateTable(3W) - Get the state table for the
specified character.
DtEnvGetAmbientColor(3W) - Get the ambient color of the
scene enviornment
DtEnvGetAmbientIntensity(3W) - Get the global ambient
intensity value of the scene.
DtEnvGetAttenuation(3W) - Get the global attenuation value
of the scene.
DtFaceCount(3W) - Determine the number of faces in a given
indexed face set.
DtFaceGetIndexByGroup(3W) - Get the list of polygonal indices for
all the indexed face set.
DtFaceGetIndexByShape(3W) - Get the list of polygonal indices for
all the indexed face set.
DtFaceGetMaterialIndex(3W) - Get the list of polygonal
material indices for the indexed face set.
DtFaceGetNormalIndexByShape(3W) - Get the list of polygonal normal
indices for all the indexed face set.
DtFaceGetNormalIndexByGroup(3W) - Get the list of polygonal normal
indices for all the indexed face set.
DtFaceGetTextureIndexByShape(3W) - Get the list of polygonal
texture indices for all the indexed face set.
DtFaceGetTextureIndexByGroup(3W) - Get the list of polygonal
texture indices for all the indexed face set.
DtFrameGet(3W) - Get the current frame of the animation.
DtFrameGetBy(3W) - Get the by frame value in the animation.
DtFrameGetCount(3W) - Get the number of frames in the animation.
DtFrameGetEnd(3W) - Get the ending frame number in the animation.
DtFrameGetKeyFrames(3W) - Get the user defined key frames.
DtFrameGetRange(3W) - Get the range of frame numbers in the animation.
DtFrameGetStart(3W) - Get the beginning frame number in the animation.
DtFrameSet(3W) - Set the current frame of the animation.
DtFrameSetBy(3W) - Set the current By frame of the animation.
DtFrameSetEnd(3W) - Set the current End frame of the animation.
DtFrameSetStart(3W) - Set the current Start frame of the animation.
DtGetDirectory(3W) - Get the directory name of the export directory.
DtGetFilename(3W) - Get the filename for the output files.
DtGetParent(3W) - Get the parent window ID of the GameExport window.
DtGroupGetBlindData(3W) - Get blind data attached to
the given group.
DtGroupGetCount(3W) - Get the number of groups in a given shape.
DtGroupGetMatrix(3W) - Get the current matrix for the given group.
DtGroupGetName(3W) - Get the name of a given group.
DtGroupGetNormal(3W) - Get a normal for the given group by its index.
DtGroupGetNormalCount(3W) - Get the number of normals in the group.
DtGroupGetNormals(3W) - Get a list of normals for the given group.
DtGroupGetParentID(3W) - Get the parent shape ID of the
specified group.
DtGroupGetParentName(3W) - Get the name parent for the
specified group.
DtGroupGetName(3W) - Get the name of the parent group of the
specified group.
DtGroupGetTextureVertex(3W) - Get a texture vertex for the
given group by its index.
DtGroupGetTextureVertexCount(3W) - Get the number of texture
vertices in the group.
DtGroupGetTextureVertices(3W) - Get a list of texture
vertices for the given shape.
DtGroupGetVertex(3W) - Get a vertex for the given group by
its index.
DtGroupGetVertexCount(3W) - Get the number of vertices in
the group.
DtGroupGetVertices(3W) - Get a list of vertices for the
given group.
DtGroupIsValid(3W) - Get the state of the valid bits for the
given group of a shape object.
DtImageWrite(3W) - Write an RGBA image to disk.
DtIndexCount(3W) - Determine the number of vertices in a
given polygon, line, or list of points.
DtKinGetBodyCount(3W) - Get the number of bodies in the
kinemation file
DtKinGetBodyName(3W) - Get the name of the given kinemation
body.
DtKinGetGroupCount(3W) - Get the number of groups in a
kinemation body segment.
DtKinGetGroupName(3W) - Get the group name in a kinemation
body segment.
DtKinGetSegmentCount(3W) - Get the number of segments in a
kinemation body.
DtKinGetSegmentName(3W) - Get the name of the given
kinemation body segment.
DtKinGetSegmentXfm(3W) - Get the transfomation matrix of a
kinemation body segment.
DtLightGetColor(3W) - Get the color for the given light.
DtLightGetCount(3W) - Get the number of lights in the scene.
DtLightGetCutOffAngle(3W) - Get the cut off angle for the
given light.
DtLightGetDirection(3W) - Get the direction for the given
light.
DtLightGetDropOffRate(3W) - Get the drop off rate value for
the given light.
DtLightGetIntensity(3W) - Get the intensity value for the
given light.
DtLightGetOn(3W) - Get the state for the given light.
DtLightGetPosition(3W) - Get the position for the given
light.
DtLightGetType(3W) - Get the light type for the given light.
DtLightIsValid(3W) - Get the state of the valid bits for the
given light.
DtLineGetIndex(3W) - Get the list of line indices for all
the lines in the given group.
DtLineGetNormalIndex(3W) - Get the list of line normal
indices for all the lines in the given group.
DtLineGetTextureIndex(3W) - Get the list of line texture
indices for all the lines in the given group.
DtMatrixGetQuaternion(3W) - Given a 4x4 matrix this routine
will return the quaternion components.
DtMatrixGetTransforms(3W) - Given a 4x4 matrix this routine
will return the translation, quaternion and euler components.
DtMatrixGetTranslation(3W) - Given a 4x4 matrix this routine
will return the translation component.
DtMatrixGetScale(3W) - Given a 4x4 matrix this routine will
return the scale component.
DtMatrixGetRotation(3W) - Given a 4x4 matrix this routine
will return the rotation component.
DtMtlGetAllClrbyID(3W) - Get all the parameters of the given
material.
DtMtlGetAmbientClr(3W) - Get the ambient color of the given
material.
DtMtlGetDiffuseClr(3W) - Get the diffuse color of the given
material.
DtMtlGetDynProps(3W) - Get the dynamic properties of the given
material.
DtMtlGetEmissiveClr(3W) - Get the emissive color of the
given material.
DtMtlGetLightSource(3W) - Get the lightsource of the material.
DtMtlGetName(3W) - Get the name of the material assigned to
a shape and group.
DtMtlGetShininess(3W) - Get the shininess of the material.
DtMtlGetSpecularClr(3W) - Get the specular color of the
given material.
DtMtlGetTransparency(3W) - Get the transparency value of the
material.
DtMtlIsRflMap(3W) - Determine if the material is a
reflection (enviornment) map.
DtMtlIsValid(3W) - Get the state of the valid bits for the
given material.
DtMtlsUpdate(3W) - Update the material data.
DtNurbsGetIndex(3W) - Get the indices for the given NURBS
surface.
DtNurbsGetNumCtrlPoints(3W) - Get the number of control
points for the given NURBS surface.
DtNurbsGetTrimVertices(3W) - Get the trim vertices for the
given NURBS surface.
DtNurbsGetUKnotVector(3W) - Get the u knot vectors for the
given NURBS surface.
DtNurbsGetVKnotVector(3W) - Get the V knot vectors for the
given NURBS surface.
DtNurbsTrimGetCount(3W) - Get the number of trim vertices in
the NURBS surface.
DtNurbsTrimGetIndex(3W) - Get the trim indices for the given
NURBS surface.
DtNurbsTrimGetKnotVector(3W) - Get the trim knot vectors for
the given NURBS surface.
DtOpenModel(3W) - Determine if running with AliasAPI.
DtPointGetIndex(3W) - Gets the list of point indices for all
the points in the given group.
DtPointGetNormalIndex(3W) - Gets the list of point normal
indices for all the points in the given group.
DtPointGetTextureIndex(3W) - Gets the list of point texture
indices for all the points in the given group.
DtPolygonGetCount(3W) - Get the number of polygons in a
given group.
DtPolygonGetIndices(3W) - Get the vertex, normal and texture
vertex indices for the given polygon.
DtPolygonMtlGetName(3W) - Get the name of the material
assigned to the given polygon.
DtPrintf(3W) - printf type interface.
DtSearchAndOpenFile(3W) - Extended file-open routine.
DtSceneGetName(3W) - Get the name of the loaded scene.
DtSceneGetType(3W) - Get the type of the scene.
DtSceneSetRedraws(3W) - Set update model for Alias.
DtShapeGetBlindData(3W) - Get blind data attached to
specified shape.
DtShapeGetChildren(3W) - Get the list of children for a given shape.
DtShapeGetCount(3W) - Get the number of shapes in the
database.
DtShapeGetMatrix(3W) - Get the current matrix for the given
shape.
DtShapeGetName(3W) - Get the name of a given shape.
DtShapeGetNormal(3W) - Get a normal for the given shape and
index.
DtShapeGetNormalCount(3W) - Get the number of normals in the
shape.
DtShapeGetNormals(3W) - Get a list of normals for the given
shape.
DtShapeGetParentID(3W) - Get the parent's ID for the given shape.
DtShapeGetParentName(3W) - Get the parent's Name for the given shape.
DtShapeGetPolygonNormalCount(3W) - Get the number of polygon normals in
the shape.
DtShapeGetPolygonNormals(3W) - Get the normals list for the shape.
DtShapeGetPolygonNormal(3W) - Get the normal for the given index.
DtShapeGetRotation(3W) - Get the rotation angles for the given shape.
DtShapeGetRotationPivot(3W) - Get the rotation pivot for the given shape.
DtShapeGetScale(3W) - Get the scale for the given shape.
DtShapeGetScalePivot(3W) - Get the scale pivot for the given shape.
DtShapeGetSetName(3W) - Get the name of the set for the given shape.
DtShapeGetTextureVertex(3W) - Get a texture vertex for the
given shape and index.
DtShapeGetTextureVertexCount(3W) - Get the number of texture
vertices in the shape.
DtShapeGetTextureVertices(3W) - Get a list of texture
vertices for the given shape.
DtShapeGetTranslation(3W) - Get the translation for the given shape.
DtShapeGetType(3W) - Obsolete function.
DtShapeGetVertex(3W) - Get a vertex for the given shape and
index.
DtShapeGetVertexColor(3W) - Get the vertex colour for the given index.
DtShapeGetVertexCount(3W) - Get the number of vertices in
the shape.
DtShapeGetVertices(3W) - Get a list of vertices for the
given shape.
DtShapeGetVerticesAnimated(3W) - Get a list of animated vertices.
DtShapeGetVerticesColor(3W) - Get a list of vertices for the
given shape.
DtShapeIsValid(3W) - Get the state of the valid bits for the
given shape object.
DtShapeIsDoubleSided(3W) - Get the double sided setting for the
given shape.
DtShapeIsFlatShaded(3W) - Get the shading mode for the
given shape.
DtTextureGetBlendClr(3W) - Get the texture's blend color.
DtTextureGetCenter(3W) - Get the texture's center.
DtTextureGetCount(3W) - Get the number of unique texture
maps associated with the given material.
DtTextureGetFileName(3W) - Get the file name of the texture map for a
given material.
DtTextureGetFileNameID(3W) - Get the file name of the texture map for a
given material.
DtTextureGetID(3W) - Get the texture ID for a
given material.
DtTextureGetImage(3W) - Get the texture image array.
DtTextureGetImageByID(3W) - Get the texture image array.
DtTextureGetImageSize(3W) - Get the texture image size.
DtTextureGetImageSizeByID(3W) - Get the texture image size.
DtTextureGetMode(3W) - Get the texture mode.
DtTextureGetName(3W) - Get the name of the texture map for a
given material.
DtTextureGetNameID(3W) - Get the name of the texture map for
a given texture ID.
DtTextureGetRotation(3W) - Get the texture's rotation value.
DtTextureGetScale(3W) - Get the texture's scale values.
DtTextureGetSceneCount(3W) - Get the number of unique
texture maps in the entire model.
DtTextureGetTranslation(3W) - Get the texture's translation.
DtTextureGetWrap(3W) - Get the wrap type for the given
texture.
DtTextureIsValid(3W) - Get the state of the valid bits for
the given texture.
SEE ALSO
DtOM(3W)
LIBRARIES
When compiling a DSO the compiler will not complain about
unresolved functions. It assumes that the parent binary
which loads the DSO will have the functions loaded. Thus you
can make a call to any function of a library that GameExport
already links with. To make calls to any additional library,
you will need to place that library on the compile line when
compiling the DSO. Here is a list of libraries that
GameExport links with.
InventorXt
GLw
GL
Xpm
Xm
Xt
X11
Pw
bsd
malloc
m
DtOMio
To make calls to any other library, make sure to put that
library on the compile line for the DSO.