home *** CD-ROM | disk | FTP | other *** search
Wrap
Attribute VB_Name = "TsxApi" '------------------------------------------------------------------------------ ' VbTsxApi ' v.1.1 ' ' VB5 Declarations for ' TsxAPI 3.1 ' ' v1.0 - 10/21/97 ' v1.1 - 12/04/97 '------------------------------------------------------------------------------ '------------------------------------------------------------------------------ '// File: tsxTypes.h '// Descr: Basic data types used in most places '// Return type for functions that test a condition. Enum tsxBool e_tsxFALSE = 0 e_tsxTRUE End Enum '// Return type for functions that simply report success or failure. Enum tsxRET e_tsxFAILURE = 0 e_tsxSUCCESS End Enum '// Return type for functions that return an error code when they fail. '// These are documented in "tsxErr.h". 'typedef int tsxERR; '// Geometry '// Reference Frames: World or Model Enum tsxFRAMEID e_tsxWorldFrame e_tsxModelFrame End Enum '// Specifying Vectors and Points Type CtsxVector2f x As Single y As Single End Type Type CtsxVector3f x As Single y As Single z As Single End Type '// Specifying axes. Type CtsxAxes3f xAxis As CtsxVector3f '//Unit vector specifying orientation of Model's X axis. yaxis As CtsxVector3f '// ... Y ... zAxis As CtsxVector3f '// ... Z ... End Type '// Transformation Matrix. Type CtsxTxmx3f matrix(0 To 3, 0 To 2) As Single End Type '// Bounding Box. Type CtsxBBox3f minbounds As CtsxVector3f maxbounds As CtsxVector3f End Type '// For specifying color, e.g. in a material or for a vertex. Type CtsxColor red As Byte green As Byte blue As Byte alpha As Byte End Type '// For specifying UV-space coordinates of a vertex. Type CtsxUV u As Single v As Single End Type '// Object types in a scene. Enum tsxSOBJTYPE e_tsxUNDEFINED = 0 '//Not a TSX-supported SOBJ type '// SOBJ types e_tsxMATERIAL = 1 e_tsxSCENE e_tsxPLUGIN_FILTER e_tsxPHYS_WIND e_tsxMATRECT '// Selectable objects e_tsxSELECTABLE = 50 '//(Not a legal SOBJ type) e_tsxAXES '// GNODE types e_tsxGNODETYPES = 100 '//(Not a legal SOBJ type) e_tsxCAMERA e_tsxLIGHT e_tsxJOINT e_tsxNAIL e_tsxLATTICE e_tsxPATH '// MNODE types e_tsxMNODETYPES = 200 '//(Not a legal SOBJ type) e_tsxPOLYHEDRON e_tsxGROUP e_tsxLODGROUP '//Levels of Detail e_tsxMBALLOBJ '//Object with meta-balls '// e_tsxOPARTICLE e_tsxSADEF '// Free-standing deformation e_tsxIKGROUP '//Object with joints (Inverse Kinematics) e_tsxSOBJEND '//(Not a legal SOBJ type) End Enum '------------------------------------------------------------------------------ '// File: tsxErr.h '// Descr: TSX Error Codes #Const tsxERR_SUCCESS = 0 '// Defined Error Codes #Const tsxERR_NOGOOD = -1 '// something generally went wrong #Const tsxERR_NO_MEMORY = -2 '// no memory available #Const tsxERR_NULL_REF = -3 '// null pointer reference #Const tsxERR_BAD_INPUT = -4 '// bad input data #Const tsxERR_FORMAT = -5 '// general bad data format #Const tsxERR_ABORT = -8 '// user abort request #Const tsxERR_REPORTED = -10 '// still an error but was reported below #Const tsxERR_UNIMPL = -11 '// feature unimplemented #Const tsxERR_IDENTIFIER = -12 '// bad identifier on data or record #Const tsxERR_VERSION = -13 '// Correct file type but wrong version #Const tsxERR_NOT_FOUND = -14 '// object not found #Const tsxERR_OVERFLOW = -15 '// data overflow for size of result #Const tsxERR_RANGE = -16 '// value out of range #Const tsxERR_INIT = -18 '// subsystem improperly initialized '// system errors #Const tsxERR_SYSERR_BASE = -50 #Const tsxERR_STDIO = (tsxERR_SYSERR_BASE - 0) '// error occurred in io #Const tsxERR_MSWIN = (tsxERR_SYSERR_BASE - 1) '// error occurred in windows '------------------------------------------------------------------------------ '// File: tsxGeom.h '// Descr: Basic geometric manipulation in 2D and 3D. #Const M_PI = 3.14159265359 '// 180/pi #Const tsxRAD2DEG_FAC = 57.29577951308 '// pi/180 #Const tsxDEG2RAD_FAC = 0.01745329251994 '// |vect| Declare Function tsxMagnitude3f Lib "tsxapi.dll" (ByRef vec As CtsxVector3f) As Single Declare Function tsxMagnitude2f Lib "tsxapi.dll" (ByRef vec As CtsxVector2f) As Single '// Normalizing ... returns the length of the original vector `vec'. Declare Function tsxNormalize3f Lib "tsxapi.dll" (ByRef vec As CtsxVector3f) As Single Declare Function tsxNormalize2f Lib "tsxapi.dll" (ByRef vec As CtsxVector2f) As Single '// norm = vec/|vec| Declare Function tsxGetNormalized3f Lib "tsxapi.dll" (ByRef norm As CtsxVector3f, ByRef vec As CtsxVector3f) As Single Declare Function tsxGetNormalized2f Lib "tsxapi.dll" (ByRef norm As CtsxVector2f, ByRef vec As CtsxVector2f) As Single '// Scalar-Vector arithmetic ... `vec' is modified and returned '// vec = vec + s Declare Function tsxAddScalar3f Lib "tsxapi.dll" (ByRef vec As CtsxVector2f, s As Single) As Variant '// vec = vec * s Declare Function tsxMulScalar3f Lib "tsxapi.dll" (ByRef vec As CtsxVector2f, s As Single) As Variant '// Vector-Vector arithmetic ... Vector `u' is modified and returned '// u = u + v Declare Function tsxAddVec3f Lib "tsxapi.dll" (ByRef u As CtsxVector3f, ByRef v As CtsxVector3f) As Variant '// u = u - v Declare Function tsxSubVec3f Lib "tsxapi.dll" (ByRef u As CtsxVector3f, ByRef v As CtsxVector3f) As Variant '// Vector Multiplication '// u . v ... Dot Product Declare Function tsxDProdVec3f Lib "tsxapi.dll" (ByRef u As CtsxVector3f, ByRef v As CtsxVector3f) As Single '// uxv = u x v ... Cross Product Declare Function tsxXProdVec3f Lib "tsxapi.dll" (ByRef uxv As CtsxVector3f, ByRef u As CtsxVector3f, ByRef v As CtsxVector3f) As Variant '// Returns Signed angle from vector `u' to `v' about the axis `axis'. '// `axis' gets the (unnormalized) cross-product (axis = u x v). Angle in radians. Declare Function tsxAngleBtwVecs3f Lib "tsxapi.dll" (ByRef u As CtsxVector3f, ByRef v As CtsxVector3f, ByRef axis As CtsxVector3f) As Single '// Distance between 2 points `p', `q'. Declare Function tsxDistanceToPoint3f Lib "tsxapi.dll" (ByRef p As CtsxVector3f, ByRef q As CtsxVector3f) As Single '// Distance from a point `p' to a line containing point `line_point' and '// with unit direction vector `line_unitvec'. Declare Function tsxDistanceToLine3f Lib "tsxapi.dll" (ByRef p As CtsxVector3f, ByRef line_point As CtsxVector3f, ByRef line_unitvec As CtsxVector3f) As Single '// Distance from a Point `p' to a Plane with normal `plane_norm' and '// containing Point `plane_point'. This distance is positive only if '// `plane_norm' points towards `p'. Declare Function tsxDistanceToPlane3f Lib "tsxapi.dll" (ByRef p As CtsxVector3f, ByRef plane_norm As CtsxVector3f, ByRef plane_point As CtsxVector3f) As Single '// A = B x C ... Matrix Multiplication. '// A may be the same as B or C. Declare Function tsxXProdMx3f Lib "tsxapi.dll" (ByRef A As CtsxTxmx3f, ByRef B As CtsxTxmx3f, ByRef C As CtsxTxmx3f) As Variant '// Minv = Inverse(M) ... Matrix Inverse '// Returns e_tsxFAILURE if result is not reliable. Declare Function tsxInvertMx3f Lib "tsxapi.dll" (ByRef Minv As CtsxTxmx3f, ByRef M As CtsxTxmx3f) As Long '// Makes Transformation Matrix from specified X and Z axes and Origin. '// pTxmx points to matrix where result Transformation Matrix is stored. '// If pInvTxmx is specified, the inverted Transform is stored there. '// Returns reference to Txmx. Declare Function tsxMakeMxFromXZO3f Lib "tsxapi.dll" (ByRef xAxis As CtsxVector3f, _ ByRef zAxis As CtsxVector3f, _ ByRef origin As CtsxVector3f, _ ByRef pTxmx As CtsxTxmx3f, _ pInvTxmx As Any) As Variant '// Makes a transformation matrix for rotation by `angle' about a line '// defined by the center point `cent' and the normalized axis vector `axis'. '// Returns reference to Txmx. Declare Function tsxMakeRotMx3f Lib "tsxapi.dll" (ByRef cent As CtsxVector3f, _ ByRef axis As CtsxVector3f, _ ByVal angle As Single, _ ByRef pTxmx As CtsxTxmx3f, _ pInvTxmx As Any) As Long '// This version builds a pure rotation matrix, leaving other cells untouched. '// The rotation is about a (unit) vector `axis'. Declare Function tsxMakePureRotMx3f Lib "tsxapi.dll" (ByRef axis As CtsxVector3f, _ ByVal angle As Single, _ ByRef pTxmx As CtsxTxmx3f, _ pInvTxmx As Any) As Long '// Translation in the Txmx '// Get the translation components {x, y, z} into `trvec'. Declare Function tsxGetMxTranslation3f Lib "tsxapi.dll" (ByRef trvec As CtsxVector3f, ByRef txmx As CtsxTxmx3f) As Long '// Set the translation components of a Txmx Declare Function tsxSetMxTranslation3f Lib "tsxapi.dll" (ByRef txmx As CtsxTxmx3f, ByRef trvec As CtsxVector3f) As Long '// Add translation vector `trvec' to Txmx Declare Function tsxAddMxTranslation3f Lib "tsxapi.dll" (ByRef txmx As CtsxTxmx3f, ByRef trvec As CtsxVector3f) As Long '// Subtract translation vector `trvec' from Txmx Declare Function tsxSubMxTranslation3f Lib "tsxapi.dll" (ByRef txmx As CtsxTxmx3f, ByRef trvec As CtsxVector3f) As Long '// Extract the pure rotation matrix (Rot) and scaling/shearing factors '// from a Transformation Matrix (Txmx). '// If specified, pScaleShear must be float[6], and is assigned as follows: '// { Sx, Sy, Sz, Sxy, Sxz, Syz } Declare Sub tsxUnMatrix3f Lib "tsxapi.dll" (ByRef txmx As CtsxTxmx3f, ByRef Rot As CtsxTxmx3f, pScaleShear As Long) '// Transform an array of vectors `pInVecs', placing result in `pOutVecs'. Declare Sub tsxTransformVecs3f Lib "tsxapi.dll" (ByVal numVecs As Long, _ ByRef pOutVecs As CtsxVector3f, _ ByRef pInVecs As CtsxVector3f, _ ByRef txmx As CtsxTxmx3f) '// Apply only the rotational part of the Txmx to an array of vectors. Declare Sub tsxRotateVecs3f Lib "tsxapi.dll" (ByVal numVecs As Long, _ ByRef pOutVecs As CtsxVector3f, _ ByRef pInVecs As CtsxVector3f, _ ByRef txmx As CtsxTxmx3f) '// OutAxes = Rotate InAxes using Txmx. Ignore non-rotational part of Txmx. '// IF InAxes are orthogonal and unit, then OutAxes are also valid axes. Declare Sub tsxRotateAxes3f Lib "tsxapi.dll" (ByRef pOutAxes As CtsxAxes3f, ByRef pInAxes As CtsxAxes3f, ByRef txmx As CtsxTxmx3f) '// Initialize BBox to negative volume. Declare Sub tsxBBoxInit Lib "tsxapi.dll" (ByRef pBBox As CtsxBBox3f) '// Returns e_tsxTRUE if BBox1 and BBox2 intersect. '// If they do intersect, and pBBintx is non-zero, '// then BBintx gets their intersection. Declare Function tsxBBoxIntersection Lib "tsxapi.dll" ( _ ByRef pBBintx As CtsxBBox3f, _ ByRef pBBox1 As CtsxBBox3f, _ ByRef pBBox2 As CtsxBBox3f) As Long '------------------------------------------------------------------------------ '// File: tsxSobj.h '// Descr: Definition of tsxSOBJ '// Sobj Type Declare Function tsxSobjGetType Lib "tsxapi.dll" (ByVal pSobj As Long) As Long '// e_tsxTRUE if Node is a Sobj Declare Function tsxIsSobj Lib "tsxapi.dll" (ByVal pSobj As Long) As Long '// Get the first child of an object. Declare Function tsxSobjGetFirstChild Lib "tsxapi.dll" (ByVal pSobj As Long) As Long '// Get the last child of an object. Declare Function tsxSobjGetLastChild Lib "tsxapi.dll" (ByVal pSobj As Long) As Long '// Get the next node of valid tsx Sobj Type '// pSobj is any Calobj Declare Function tsxSobjGetNext Lib "tsxapi.dll" (ByVal pSobj As Long) As Long '// Get the prev node of valid tsx Sobj Type '// pSobj is any Calobj Declare Function tsxSobjGetPrev Lib "tsxapi.dll" (ByVal pSobj As Long) As Long '// Delete and free memory, including internal allocations. '// Also delete all children, if any. '// Erases objects from all Views. Declare Sub tsxSobjDelete Lib "tsxapi.dll" (ByVal pSobj As Long) '------------------------------------------------------------------------------ '// File: tsxMisc.h '// Descr: Miscellaneous items 'procedure tsxGetTsVersionNbrs( ' var pMajor: Short; // Major version nbr ' var pMinor: Short // Minor version nbr ' ); cdecl; Declare Sub tsxGetTsVersionNbrs Lib "tsxapi.dll" _ (ByRef pMajor As Integer, ByRef pMinor As Integer) '// Returns handle to the main view window. 'TSXAPIFN HWND tsxGetMainViewHwnd(void); Declare Function tsxGetMainViewHWND Lib "tsxapi.dll" () As Long '// Get the number of Faces (0 if not a Polyhedron). 'function tsxPolyhGetNbrFaces(pPolyh: PTsxPolyhedron): Integer; cdecl; Declare Function tsxPolyhGetNbrFaces Lib "tsxapi.dll" _ (ByVal pPolyh As Long) As Long '------------------------------------------------------------------------------ '// File: tsxMatrl.h '// Descr: Definition of tsxMATERIAL '// Solid texture direction values (used in the grain fields). #Const tsxSOLID_DIR_X = 0 #Const tsxSOLID_DIR_Y = 1 #Const tsxSOLID_DIR_Z = 2 '// Simulates a granite like texture with upto 4 colors. Type CtsxGraniteProps color1 As CtsxColor '//The different stone colors. color2 As CtsxColor color3 As CtsxColor color4 As CtsxColor amount1 As Single '//Relative amount of color1 [0.0 - 1.0] (0=none) amount2 As Single '//Relative amount of color2 [0.0 - 1.0] amount3 As Single '//Relative amount of color3 [0.0 - 1.0] amount4 As Single '//Relative amount of color4 [0.0 - 1.0] sharpness As Single '//[0.0 (max blurring to one color) - 1.0 (no blur)] scale As CtsxVector3f 'Scaling along solid texture directions. Non-negative. '// Larger values result in finer texture. seed As Integer '//Random seed for generating pattern [0 - 64k] End Type '// Simulates texture of swirling veins produced by turbulent forces '// applied before marble solidifies. Type CtsxMarbleProps stonecol As CtsxColor '//Base stone color veincol As CtsxColor '//Color of veins turbulence As Integer '//Higher numbers result in larger, bumpier veins. '// 0 produces straight veins. Typically [0 - 20]. sharpness As Single '//Blending between vein and stone colors at vein edges. '// Higher values increase sharpness. [0.0 - 1.0] grain As Integer '//Vein direction (tsxSOLID_DIR_*). scale As CtsxVector3f '//Scaling along solid texture directions. Non-negative. '// Larger values result in more veins. seed As Integer '//Random seed for generating pattern [0 - 64k] End Type '// This produces concentric light (Spring) and dark (Summer) colored rings, '// around an axis. Type CtsxWoodProps lightcol As CtsxColor '//The light or spring color darkcol As CtsxColor '//The dark or summer color ldratio As Single '//Light/Dark ratio. '// [0.0 (almost all dark) - 1.0 (almost all light)] rdensity As Single '//Number of rings per unit distance. rwidthvar As Single '//Variation in ring width [0.0 (uniform) - 1.0] rshapevar As Single '//Variation in ring shape [0.0 (perfect circle) - 1.0] center As CtsxVector3f '//Location of rings center. grain As Integer '//Ring axis direction (tsxSOLID_DIR_*). scale As CtsxVector3f '//Scaling along solid texture directions. Non-negative. seed As Integer '//Random seed for generating pattern [0 - 64k] End Type '// Values for CtsxProcTexture::txtrtype #Const tsxTEXTURE_NONE = 0 #Const tsxTEXTURE_GRANITE = 1 #Const tsxTEXTURE_MARBLE = 2 #Const tsxTEXTURE_WOOD = 3 '// returned by `tsxMaterialGetTextureType' if texture is not procedural. '// Not a valid value for field txtrtype. #Const tsxTEXTURE_IMAGE = 4 '// Structure for specifying one of the procedural textures in tsxMATERIAL 'struct CtsxProcTexture '{ 'short txtrtype; //one of tsxTEXTURE_* 'Union '{ 'CtsxGraniteProps gprops; 'CtsxMarbleProps mprops; 'CtsxWoodProps wprops; '}; '}; Type CtsxGraniteTexture txtrtype As Integer '// one of tsxTEXTURE_* gprops As CtsxGraniteProps End Type Type CtsxMarbleTexture txtrtype As Integer '// one of tsxTEXTURE_* mprops As CtsxMarbleProps End Type Type CtsxWoodTexture txtrtype As Integer '// one of tsxTEXTURE_* wprops As CtsxWoodProps End Type '// Reflection shading types (mutually exclusive) #Const tsxSHADER_FLAT = 1 #Const tsxSHADER_PHONG = 2 #Const tsxSHADER_METAL = 4 '// Surface smoothness (mutually exclusive) #Const tsxFACET_FACETED = 1 #Const tsxFACET_AUTO = 2 #Const tsxFACET_SMOOTH = 4 '// Surface properties ...................................... Type CtsxSurfaceProps ka As Single '//ambient coefficent [0.0 -(0.01)- 1.0] ks As Single '//specular coefficent [0.0 -(0.01)- 1.0] exp As Single '//exponent of specularity (roughness) [0.0 -(0.01)- 1.0] End Type '// Texture Map properties .................................. #Const tsxTXTR_OVERLAY = 1 #Const tsxTXTR_ON = 2 '//otherwise OFF #Const tsxTXTR_MOVIE = 4 #Const tsxTXTR_MARBLE = 1024 #Const tsxTXTR_WOOD = 2048 #Const tsxTXTR_GRANITE = 4096 '// Only one of MARBLE, WOOD or GRANITE may be set. Type CtsxTextureProps offsetu As Single '//texture U offset [-1.0 -(.001)- 1.0] offsetv As Single '//texture V offset [-1.0 -(.001)- 1.0] repeatsu As Single '//texture repeats in U [0.01 -(.1)- 100.0] repeatsv As Single '//texture repeats in V [0.01 -(.1)- 100.0] flags As Integer '//see above End Type '// Bump Map properties ..................................... #Const tsxBUMP_ON = 2 '//otherwise OFF #Const tsxBUMP_MOVIE = 4 Type CtsxBumpProps offsetu As Single '//bump U offset [-1.0 -(.001)- 1.0] offsetv As Single '//bump V offset [-1.0 -(.001)- 1.0] repeatsu As Single '//bump repeats in U [0.01 -(.1)- 100.0] repeatsv As Single '//bump repeats in V [0.01 -(.1)- 100.0] amplitude As Single '//bump amplitude [-10.0 - 10.0] flags As Integer '//see above End Type '// Environment Map properties .............................. #Const tsxENVR_CUBIC = 1 '//cubic environment, otherwise its spherical #Const tsxENVR_ON = 2 '//otherwise OFF #Const tsxENVR_MOVIE = 4 #Const tsxUVPROJ_PLANE = 1 #Const tsxUVPROJ_PLANE_SQUARE = 2 #Const tsxUVPROJ_CYLINDER = 4 #Const tsxUVPROJ_SPHERE = 8 '// Create a new material object with default properties: '// - reflection shading = tsxSHADER_FLAT '// - Surface smoothness = tsxFACET_FACETED '// - alpha-chanel = 1 '// - index of refraction = 1 '// - Texture U repeats = 1 '// - Texture V repeats = 1 '// - Bump U repeats = 1 '// - Bump V repeats = 1 '// - Bump amplitude = 1 '// - Zero (0) in the rest of the fields '// Ptr to new object assigned to ppMatrl on success. 'TSXAPIFN tsxERR tsxMaterialCreate( tsxMATERIAL** ppMatrl ); Declare Function tsxMaterialCreate Lib "tsxapi.dll" _ (ByRef ppMatrl As Long) As Long '// Create a new material object, with same properties as pOldMatrl. '// Ptr to new object assigned to ppNewMatrl on success. 'TSXAPIFN tsxERR tsxMaterialCreateCopy( 'tsxMATERIAL** ppNewMatrl, 'tsxMATERIAL* pOldMatrl '); Declare Function tsxMaterialCreateCopy Lib "tsxapi.dll" _ (ByRef ppNewMatrl As Long, ByVal pOldMatrl As Long) As Long '// Create a new material object, with same properties as the Active Material. '// Ptr to new object assigned to ppMatrl on success. 'TSXAPIFN tsxERR tsxMaterialCreateCopyActive( tsxMATERIAL** ppMatrl ); Declare Function tsxMaterialCreateCopyActive Lib "tsxapi.dll" _ (ByRef ppMatrl As Long) As Long '// Destroy a material object. If assigned to faces, corresponding material '// entries in matlist set to null. 'TSXAPIFN void tsxMaterialDestroy( tsxMATERIAL* pMatrl ); Declare Sub tsxMaterialDestroy Lib "tsxapi.dll" _ (ByVal pMatrl As Long) '// Set the active material to pNewActive (may be NULL). 'TSXAPIFN void tsxMaterialSetActive( tsxMATERIAL* pNewActive ); Declare Sub tsxMaterialSetActive Lib "tsxapi.dll" _ (ByVal pNewActive As Long) '// Returns ptr to the Active Material (may be NULL) 'TSXAPIFN tsxMATERIAL* tsxMaterialGetActive(); Declare Function tsxMaterialGetActive Lib "tsxapi.dll" _ () As Long '// Copy Active Material's (if any) attributes into pMatrl. 'TSXAPIFN void tsxMaterialCopyActive( tsxMATERIAL* pMatrl ); Declare Sub tsxMaterialCopyActive Lib "tsxapi.dll" _ (ByVal pMatrl As Long) '// Testing two materials for equivalence. 'TSXAPIFN tsxBOOL tsxMaterialsAreEqual( tsxMATERIAL* pMatrl1, 'tsxMATERIAL* pMatrl2 ); Declare Function tsxMaterialsAreEqual Lib "tsxapi.dll" _ (ByVal pMatrl1 As Long, ByVal pMatrl2 As Long) As Long '// Get its ID (0-64K, -1 if not material) 'TSXAPIFN int tsxMaterialGetId( tsxMATERIAL* pMatrl ); Declare Function tsxMaterialGetId Lib "tsxapi.dll" _ (ByVal pMatrl As Long) As Long '// Surface attributes .......................................................... '// Reflection shading (tsxSHADER_*, 0 on error) 'TSXAPIFN int tsxMaterialGetShadingType( tsxMATERIAL* pMatrl ); Declare Function tsxMaterialGetShadingType Lib "tsxapi.dll" _ (ByVal pMatrl As Long) As Long '// Surface faceting (tsxFACET_*, 0 on error) 'TSXAPIFN int tsxMaterialGetFacetingType( tsxMATERIAL* pMatrl ); Declare Function tsxMaterialGetFacetingType Lib "tsxapi.dll" _ (ByVal pMatrl As Long) As Long '// The angle in degrees (0 - 120) 'TSXAPIFN int tsxMaterialGetAutofacetAngle( tsxMATERIAL* pMatrl ); Declare Function tsxMaterialGetAutofacetAngle Lib "tsxapi.dll" _ (ByVal pMatrl As Long) As Long '// Color 'TSXAPIFN void tsxMaterialGetColor( tsxMATERIAL* pMatrl, CtsxColor* pColor ); Declare Sub tsxMaterialGetColor Lib "tsxapi.dll" _ (ByVal pMatrl As Long, ByRef pColor As CtsxColor) '// Surface properties 'TSXAPIFN void tsxMaterialGetSurfaceProps( tsxMATERIAL* pMatrl, 'CtsxSurfaceProps* pSprops ); Declare Sub tsxMaterialGetSurfaceProps Lib "tsxapi.dll" _ (ByVal pMatrl As Long, ByRef pSprops As CtsxSurfaceProps) '// index of refraction (1.0 - 2.0, 0 on error) 'TSXAPIFN float tsxMaterialGetIor( tsxMATERIAL* pMatrl ); Declare Function tsxMaterialGetIor Lib "tsxapi.dll" _ (ByVal pMatrl As Long) As Single '// Returns tsxTEXTURE_* 'TSXAPIFN int tsxMaterialGetTextureType( tsxMATERIAL* pMatrl ); Declare Function tsxMaterialGetTextureType Lib "tsxapi.dll" _ (ByVal pMatrl As Long) As Long '// If not procedural texture, pPrTxt->txtrtype = tsxTEXTURE_NONE. 'TSXAPIFN void tsxMaterialGetProcTexture( tsxMATERIAL* pMatrl, 'CtsxProcTexture* pPrTxt ); Declare Sub tsxMaterialGetProcTexture Lib "tsxapi.dll" _ (ByVal pMatrl As Long, pPrTxt As Any) '// File used as texture map image. 'TSXAPIFN void tsxMaterialGetTextureFilename( 'tsxMATERIAL* pMatrl, 'char* szFilename, // File name copied here, if any 'int iFilenameSize // size of szFilename buffer '); Declare Sub tsxMaterialGetTextureFilename Lib "tsxapi.dll" _ (ByVal pMatrl As Long, ByVal szFilename As String, iFilenameSize As Long) '// Texture mapping parameters 'TSXAPIFN void tsxMaterialGetTextureProps( 'tsxMATERIAL* pMatrl, 'CtsxTextureProps* pTxtrProps '); Declare Sub tsxMaterialGetTextureProps Lib "tsxapi.dll" _ (ByVal pMatrl As Long, ByRef pTxtrProps As CtsxTextureProps) '// Bump Map .................................................................... '// File used as bump map image. 'TSXAPIFN void tsxMaterialGetBumpFilename( 'tsxMATERIAL* pMatrl, 'char* szFilename, // File name copied here, if any 'int iFilenameSize // size of szFilename buffer '); Declare Sub tsxMaterialGetBumpFilename Lib "tsxapi.dll" _ (ByVal pMatrl As Long, ByVal szFilename As String, iFilenameSize As Long) '// Bump mapping parameters 'TSXAPIFN void tsxMaterialGetBumpProps( 'tsxMATERIAL* pMatrl, 'CtsxBumpProps* pBumpProps '); Declare Sub tsxMaterialGetBumpProps Lib "tsxapi.dll" _ (ByVal pMatrl As Long, ByRef pTxtrProps As CtsxBumpProps) '// Environment Map ............................................................. '// File used as environment map image. 'TSXAPIFN void tsxMaterialGetEnvrFilename( 'tsxMATERIAL* pMatrl, 'char* szFilename, // File name copied here, if any 'int iFilenameSize // size of szFilename buffer '); Declare Sub tsxMaterialGetEnvrFilename Lib "tsxapi.dll" _ (ByVal pMatrl As Long, ByVal szFilename As String, iFilenameSize As Long) '// Returns tsxENVR_* (0 on error) 'TSXAPIFN int tsxMaterialGetEnvrFlags( tsxMATERIAL* pMatrl ); Declare Function tsxMaterialGetEnvrFlags Lib "tsxapi.dll" _ (ByVal pMatrl As Long) As Long '// Surface attributes .......................................................... '// Reflection shading (tsxSHADER_*) 'TSXAPIFN void tsxMaterialSetShadingType( tsxMATERIAL* pMatrl, int shading ); Declare Sub tsxMaterialSetShadingType Lib "tsxapi.dll" _ (ByVal pMatrl As Long, ByVal shading As Long) '// Surface faceting (tsxFACET_*) 'TSXAPIFN void tsxMaterialSetFacetingType( tsxMATERIAL* pMatrl, int faceting ); Declare Sub tsxMaterialSetFacetingType Lib "tsxapi.dll" _ (ByVal pMatrl As Long, ByVal faceting As Long) '// The angle in degrees (0 - 120) 'TSXAPIFN void tsxMaterialSetAutofacetAngle( tsxMATERIAL* pMatrl, 'int angleDegrees ); Declare Sub tsxMaterialSetAutofacetAngle Lib "tsxapi.dll" _ (ByVal pMatrl As Long, ByVal angleDegrees As Long) '// Color 'TSXAPIFN void tsxMaterialSetColor( tsxMATERIAL* pMatrl, CtsxColor* pColor ); Declare Sub tsxMaterialSetColor Lib "tsxapi.dll" _ (ByVal pMatrl As Long, ByRef pColor As CtsxColor) '// Surface properties 'TSXAPIFN void tsxMaterialSetSurfaceProps( tsxMATERIAL* pMatrl, 'CtsxSurfaceProps* pSprops ); Declare Sub tsxMaterialSetSurfaceProps Lib "tsxapi.dll" _ (ByVal pMatrl As Long, ByRef pSprops As CtsxSurfaceProps) '// index of refraction (1.0 - 2.0) 'TSXAPIFN void tsxMaterialSetIor( tsxMATERIAL* pMatrl, float ior ); Declare Function tsxMaterialSetIor Lib "tsxapi.dll" _ (ByVal pMatrl As Long, ByVal ior As Single) '// Texture Map ................................................................. '// Returns tsxTEXTURE_* 'TSXAPIFN void tsxMaterialSetTextureType( tsxMATERIAL* pMatrl, int txtype ); Declare Sub tsxMaterialSetTextureType Lib "tsxapi.dll" _ (ByVal pMatrl As Long, ByVal txtype As Long) '// If not procedural texture, pPrTxt->txtrtype = tsxTEXTURE_NONE. 'TSXAPIFN void tsxMaterialSetProcTexture( tsxMATERIAL* pMatrl, 'CtsxProcTexture* pPrTxt ); Declare Sub tsxMaterialSetProcTexture Lib "tsxapi.dll" _ (ByVal pMatrl As Long, pPrTxt As Any) '// File used as texture map image. 'TSXAPIFN void tsxMaterialSetTextureFilename( 'tsxMATERIAL* pMatrl, 'char* szFilename // File name ptr (may be NULL) '); Declare Sub tsxMaterialSetTextureFilename Lib "tsxapi.dll" _ (ByVal pMatrl As Long, ByVal szFilename As String) '// Texture mapping parameters 'TSXAPIFN void tsxMaterialSetTextureProps( 'tsxMATERIAL* pMatrl, 'CtsxTextureProps* pTxtrProps '); Declare Sub tsxMaterialSetTextureProps Lib "tsxapi.dll" _ (ByVal pMatrl As Long, ByRef pTxtrProps As CtsxTextureProps) '// Bump Map .................................................................... '// File used as bump map image. 'TSXAPIFN void tsxMaterialSetBumpFilename( 'tsxMATERIAL* pMatrl, 'char* szFilename // File name ptr (may be 0) '); Declare Sub tsxMaterialSetBumpFilename Lib "tsxapi.dll" _ (ByVal pMatrl As Long, ByVal szFilename As String) '// Bump mapping parameters 'TSXAPIFN void tsxMaterialSetBumpProps( 'tsxMATERIAL* pMatrl, 'CtsxBumpProps* pBumpProps '); Declare Sub tsxMaterialSetBumpProps Lib "tsxapi.dll" _ (ByVal pMatrl As Long, ByRef pBumpProps As CtsxBumpProps) '// Environment Map ............................................................. '// File used as environment map image. 'TSXAPIFN void tsxMaterialSetEnvrFilename( 'tsxMATERIAL* pMatrl, 'char* szFilename // File name ptr (may be 0) '); Declare Sub tsxMaterialSetEnvrFilename Lib "tsxapi.dll" _ (ByVal pMatrl As Long, ByVal szFilename As String) '// Environment flags tsxENVR_* 'TSXAPIFN void tsxMaterialSetEnvrFlags( tsxMATERIAL* pMatrl, int flags ); Declare Sub tsxMaterialSetEnvrFlags Lib "tsxapi.dll" _ (ByVal pMatrl As Long, ByVal flags As Long) '------------------------------------------------------------------------------ '// File: tsxScene.cpp '// Descr: Definition of tsxSCENE '// Get the trueSpace scene. 'TSXAPIFN tsxSCENE* tsxGetScene(); Declare Function tsxGetScene Lib "tsxapi.dll" _ () As Long '// Adds pGNode as top-level member of scene, and makes it the current selection. '// IF bNoDraw is TRUE THEN the object will not be drawn in this function call. '// pGNode must be a new object not already in Scene. 'TSXAPIFN void tsxSceneAddObject( tsxGNODE* pGNode, tsxBOOL bNoDraw ); Declare Sub tsxSceneAddObject Lib "tsxapi.dll" _ (ByVal pGNode As Long, ByVal bNoDraw As Long) '// Get the first top level GNode. '// The rest can be accessed using `tsxGNodeGetNext'. 'TSXAPIFN tsxGNODE* tsxSceneGetFirstNode(); Declare Function tsxSceneGetFirstNode Lib "tsxapi.dll" _ () As Long '// Returns tsxTRUE for Fog On. 'TSXAPIFN tsxBOOL tsxSceneIsFogOn(); Declare Function tsxSceneIsFogOn Lib "tsxapi.dll" _ () As Long '// Use tsxTRUE to set Fog On. 'TSXAPIFN void tsxSceneSwitchFog( tsxBOOL fog_on ); Declare Sub tsxSceneSwitchFog Lib "tsxapi.dll" _ (ByVal fog_on As Long) '// 'TSXAPIFN void tsxSceneGetFogParms( 'unsigned int* pFogRed, //0 - 255 'unsigned int* pFogBlue, //0 - 255 'unsigned int* pFogGreen, //0 - 255 'int* pFogNear, 'int* pFogFar, 'int* pFogMax '); Declare Sub tsxSceneGetFogParms Lib "tsxapi.dll" _ (ByRef pFogRed As Long, ByRef pFogBlue As Long, ByRef pFogGreen As Long, ByRef pFogNear As Long, ByRef pFogFar As Long, ByRef pFogMax As Long) '// 'TSXAPIFN void tsxSceneSetFogParms( 'unsigned int FogRed, //0 - 255 'unsigned int FogBlue, //0 - 255 'unsigned int FogGreen, //0 - 255 'int FogNear, 'int FogFar, 'int FogMax '); Declare Sub tsxSceneSetFogParms Lib "tsxapi.dll" _ (ByVal FogRed As Long, ByVal FogBlue As Long, ByVal FogGreen As Long, ByVal FogNear As Long, ByVal FogFar As Long, ByVal FogMax As Long) '// (Re)Draw the scene in the active View, in the View's rendering mode. 'TSXAPIFN void tsxSceneDraw(); Declare Sub tsxSceneDraw Lib "tsxapi.dll" () '------------------------------------------------------------------------------ '// File: tsxGNode.h '// Descr: Definition of tsxGNODE '// e_tsxTRUE if pSobj is a GNode 'TSXAPIFN tsxBOOL tsxIsGNode( tsxSOBJ* pSobj ); Declare Function tsxIsGNode Lib "tsxapi.dll" (ByVal pSobj As Long) As Long '// Get a copy of the entire tree rooted at a GNode 'TSXAPIFN tsxERR tsxGNodeCopy( ' tsxGNODE* pGNode, // The GNode to copy ' tsxGNODE** ppGNodeCopy // Ptr to Copy placed here, on success ' ); Declare Function tsxGNodeCopy Lib "tsxapi.dll" (ByVal pGNode As Long, ByRef ppGNodeCopy As Long) As Long '// Returns: 0 if pGNode is the Scene object; '// pGNode if parent of pGNode is the Scene object, '// or pGNode has no parent; '// else ptr to highest tsxGNODE ancestor of pGNode below Scene. 'TSXAPIFN tsxGNODE* tsxGNodeGetRoot( tsxGNODE* pGNode ); Declare Function tsxGNodeGetRoot Lib "tsxapi.dll" (ByVal pGNode As Long) As Long '// Get the parent node in the scene graph. 'TSXAPIFN tsxGNODE* tsxGNodeGetParent( tsxGNODE* pGNode ); Declare Function tsxGNodeGetParent Lib "tsxapi.dll" (ByVal pGNode As Long) As Long '// Returns e_tsxTRUE if pGNode is a member of the Scene at some level. 'TSXAPIFN tsxBOOL tsxIsGNodeInScene( tsxGNODE* pGNode ); Declare Function tsxIsGNodeInScene Lib "tsxapi.dll" (ByVal pGNode As Long) As Long '// Get the first child of a Group or LOD object. 'TSXAPIFN tsxGNODE* tsxGNodeGetFirstChild( tsxGNODE* pGNode ); Declare Function tsxGNodeGetFirstChild Lib "tsxapi.dll" (ByVal pGNode As Long) As Long '// Get the next node of valid tsx Type 'TSXAPIFN tsxGNODE* tsxGNodeGetNext( tsxGNODE* pGNode ); Declare Function tsxGNodeGetNext Lib "tsxapi.dll" (ByVal pGNode As Long) As Long '// Get the prev node of valid tsx Type 'TSXAPIFN tsxGNODE* tsxGNodeGetPrev( tsxGNODE* pGNode ); Declare Function tsxGNodeGetPrev Lib "tsxapi.dll" (ByVal pGNode As Long) As Long '// Returns e_tsxTRUE if pCheckGNode is a node in the tree rooted at pGNode. 'TSXAPIFN tsxBOOL tsxIsGNodeSubobj( tsxGNODE* pGNode, tsxGNODE* pCheckGNode ); Declare Function tsxIsGNodeSubobj Lib "tsxapi.dll" (ByVal pGNode As Long, ByVal pCheckGNode As Long) As Long '// Draws pGNode in the current view, in the current view's rendering mode. 'TSXAPIFN void tsxGNodeDraw( tsxGNODE* pGNode ); Declare Sub tsxGNodeDraw Lib "tsxapi.dll" (ByVal pGNode As Long) '// Gets the Name of a GNode. '// Returns length of name. (0 if not valid request or null name) 'TSXAPIFN int tsxGNodeGetName( ' tsxGNODE* pGNode, ' char* pName, //buffer where name is copied ' int iNameSz //Size of pName buffer ' ); Declare Function tsxGNodeGetName Lib "tsxapi.dll" (ByVal pGNode As Long, ByVal pName As String, ByVal iNameSz As Long) As Long '// Sets the Name of a GNode. '// Returns 0 on success. 'TSXAPIFN tsxERR tsxGNodeSetName( tsxGNODE* pGNode, char* szNewName ); Declare Function tsxGNodeSetName Lib "tsxapi.dll" (ByVal pGNode As Long, ByVal pName As String) As Long '// Get the GNode's position in World coordinates. '// Returns 0 if not GNODE, else posn. 'TSXAPIFN CtsxVector3f* tsxGNodeGetAxesPosition( 'tsxGNODE* pGNode, 'CtsxVector3f* posn '); Declare Function tsxGNodeGetAxesPosition Lib "tsxapi.dll" (ByVal pGNode As Long, ByRef posn As CtsxVector3f) As Long '// Get the GNode's model axes orientation, as a triple of normalized orthogonal '// vectors pointing in the directions of GNode's X, Y and Z. '// Returns 0 if not GNODE, else axes. 'TSXAPIFN CtsxAxes3f* tsxGNodeGetAxesOrientation( 'tsxGNODE* pGNode, 'CtsxAxes3f* axes ' ); Declare Function tsxGNodeGetAxesOrientation Lib "tsxapi.dll" (ByVal pGNode As Long, ByRef posn As CtsxAxes3f) As Long '// Add the bounding box of GNode to input BBox. '// Not valid for Track and Path objects. '// The resulting BBox will also enclose the input BBox bounds. To get BBox '// of only pGNode, use `tsxBBoxInit()' before calling this function. 'TSXAPIFN tsxERR tsxGNodeGetBBox( 'tsxGNODE* pGNode, //Non Track/Path GNode 'CtsxBBox3f* pBBox //BBox updated with result. '); Declare Function tsxGNodeGetBBox Lib "tsxapi.dll" _ (ByVal pGNode As Long, ByRef pBBox As CtsxBBox3f) As Long '// Get the location of GNode. '// Returns 0 if not GNODE, else loc. 'TSXAPIFN CtsxVector3f* tsxGNodeGetLocation( 'tsxGNODE* pGNode, 'CtsxVector3f* loc '); Declare Function tsxGNodeGetLocation Lib "tsxapi.dll" (ByVal pGNode As Long, ByRef loc As CtsxVector3f) As Long '// Get the euler angles of GNode's orientation. '// Returns 0 if not GNODE, else rot. 'TSXAPIFN CtsxVector3f* tsxGNodeGetRotation( 'tsxGNODE* pGNode, 'CtsxVector3f* rot '); Declare Function tsxGNodeGetRotation Lib "tsxapi.dll" (ByVal pGNode As Long, ByRef Rot As CtsxVector3f) As Long '// Get the size of GNode. '// Returns 0 if not GNODE, else size. 'TSXAPIFN CtsxVector3f* tsxGNodeGetSize( 'tsxGNODE* pGNode, 'CtsxVector3f* size '); Declare Function tsxGNodeGetSize Lib "tsxapi.dll" (ByVal pGNode As Long, ByRef size As CtsxVector3f) As Long '// Set the location of GNode. 'TSXAPIFN void tsxGNodeSetLocation( 'tsxGNODE* pGNode, 'CtsxVector3f* loc '); Declare Sub tsxGNodeSetLocation Lib "tsxapi.dll" (ByVal pGNode As Long, ByRef loc As CtsxVector3f) '// Set the euler angles of GNode's orientation. 'TSXAPIFN void tsxGNodeSetRotation( 'tsxGNODE* pGNode, 'CtsxVector3f* rot '); Declare Sub tsxGNodeSetRotation Lib "tsxapi.dll" (ByVal pGNode As Long, ByRef Rot As CtsxVector3f) '// Set the size of GNode. 'TSXAPIFN void tsxGNodeSetSize( 'tsxGNODE* pGNode, 'CtsxVector3f* size '); Declare Sub tsxGNodeSetSize Lib "tsxapi.dll" (ByVal pGNode As Long, ByRef size As CtsxVector3f) '// Returns Transformation matrix representation of the GNode's axes, '// with only Rotation and Translation elements, '// and no Scaling/Shearing factors. '// 0 if not GNode 'TSXAPIFN CtsxTxmx3f* tsxGNodeGetPureTransform( 'tsxGNODE* pGNode, 'CtsxTxmx3f* pTxmx '); Declare Function tsxGNodeGetPureTransform Lib "tsxapi.dll" ( _ ByVal pGNode As Long, _ ByRef pTxmx As CtsxTxmx3f) As Long '// Returns Transformation matrix of GNode, '// 0 if not GNode 'TSXAPIFN CtsxTxmx3f* tsxGNodeGetTransform( 'tsxGNODE* pGNode, 'CtsxTxmx3f* pTxmx '); Declare Function tsxGNodeGetTransform Lib "tsxapi.dll" ( _ ByVal pGNode As Long, _ ByRef pTxmx As CtsxTxmx3f) As Long '// Translate GNode by pVec, in the specified reference frame. 'TSXAPIFN void tsxGNodeTranslate( 'tsxGNODE* pGNode, 'CtsxVector3f* pVec, // translation vector 'tsxFRAMEID frameid // Reference frame for pVec '); Declare Sub tsxGNodeTranslate Lib "tsxapi.dll" ( _ ByVal pGNode As Long, _ ByRef pVec As CtsxVector3f, _ ByVal frameid As Long) '// Rotate by fAngle radians about pAxis passing thru pCenter, '// in the specified reference frame. 'TSXAPIFN void tsxGNodeRotate( 'tsxGNODE* pGNode, 'CtsxVector3f* pCenter, //Center of rotation. 'CtsxVector3f* pAxis, //Rotation axis passing thru pCenter. 'float fAngle, //Radians. Rotation angle. 'tsxFRAMEID frameid '); Declare Sub tsxGNodeRotate Lib "tsxapi.dll" ( _ ByVal pGNode As Long, _ ByRef pCenter As CtsxVector3f, _ ByRef pAxis As CtsxVector3f, _ ByVal fAngle As Single, _ ByVal frameid As Long) '// Scale by factors along each axis, in the specified reference frame. '// Scale factors must be non-zero. 'TSXAPIFN void tsxGNodeScale( 'tsxGNODE* pGNode, 'CtsxVector3f* pScaleFacs, //x, y, z scale factors (non-zero) 'tsxFRAMEID frameid '); Declare Sub tsxGNodeScale Lib "tsxapi.dll" ( _ ByVal pGNode As Long, _ ByRef pScaleFacs As CtsxVector3f, _ ByVal frameid As Long) '// Scale by factor UNIFORMLY along each axis, in the specified reference frame. '// Scale factor must be non-zero. 'TSXAPIFN void tsxGNodeScaleUniform( 'tsxGNODE* pGNode, 'float fScaleFac, 'tsxFRAMEID frameid '); Declare Sub tsxGNodeScaleUniform Lib "tsxapi.dll" ( _ ByVal pGNode As Long, _ ByVal pScaleFac As Single, _ ByVal frameid As Long) '------------------------------------------------------------------------------ '// File: tsxCamra.h '// Descr: Interface to tsxCAMERA '// Creates a camera at world origin, with the viewing plane on the world '// YZ plane, Z in the up direction, and pointing in the positive world X '// direction. On success, the new camera is the currently selected object. 'TSXAPIFN tsxERR tsxCameraCreateInScene(); Declare Function tsxCameraCreateInScene Lib "tsxapi.dll" () As Long '------------------------------------------------------------------------------ '// File: tsxSelect.h '// Descr: The Selection Mechanism Enum tsxSELECTMODE e_tsxSELECT '// Ordinary Selection of a Node. e_tsxERASE '// For selecting an object after erasing curr obj. e_tsxGLUE '// For selecting an object to attach to curr obj. End Enum '// e_tsxTRUE if pSobj is of supported selectable type (see doc above). 'TSXAPIFN tsxBOOL tsxIsSelectable( tsxSOBJ* pSobj ); Declare Function tsxIsSelectable Lib "tsxapi.dll" (ByVal pSobj As Long) As Long '// e_tsxTRUE if pSobj is part of a selected Object/Group 'TSXAPIFN tsxBOOL tsxIsSelected( tsxSOBJ* pSobj ); Declare Function tsxIsSelected Lib "tsxapi.dll" (ByVal pSobj As Long) As Long '// Get pointer to the currently selected object. '// Note: trueSpace may select objects that are not currently supported in TSX. 'TSXAPIFN tsxSOBJ* tsxGetCurrentSelection(); Declare Function tsxGetCurrentSelection Lib "tsxapi.dll" () As Long '// Essentially same (with correct args) as picking an object with the mouse. '// Make specified pSobj the current selection. '// Set `bNoDraw' to e_tsxTRUE if you do not wish the object to be redrawn in '// "selected" mode. Use this feature carefully, as it might result in all '// or portions of the object being erased when the next object is selected. '// Primarily meant as a mechanism for temporarily selecting an object for '// operations, and to be followed by a scene refresh. 'TSXAPIFN void tsxSelectSobj( 'tsxSOBJ* pSobj, //Must be `tsxIsSelectable' 'tsxSELECTMODE selmode, 'tsxBOOL bNoDraw //TRUE if Views should not be updated. '); Declare Sub tsxSelectSobj Lib "tsxapi.dll" (ByVal pSobj As Long, ByVal selmode As Long, ByVal bNoDraw As Long) '// Same function as called on the [downArrow] button. '// Selects a child of the Currobj. '// Views updated. 'TSXAPIFN void tsxSelectDown(); Declare Sub tsxSelectDown Lib "tsxapi.dll" () '// Same function as called on the [upArrow] button. '// Selects parent of Currobj. '// Views updated. 'TSXAPIFN void tsxSelectUp(); Declare Sub tsxSelectUp Lib "tsxapi.dll" () '// Same function as called on the <rightArrow> key. '// Selects a sibling of the Currobj, following Currobj in the list. '// Views updated. 'TSXAPIFN void tsxSelectNext(); Declare Sub tsxSelectNext Lib "tsxapi.dll" () '// Same function as called on the <leftArrow> key. '// Selects a sibling of the Currobj, preceeding Currobj in the list. '// Views updated. 'TSXAPIFN void tsxSelectPrev(); Declare Sub tsxSelectPrev Lib "tsxapi.dll" () '// Removes the current object and substitutes it with pNewGNode. '// If the selected part of the current object does not include it's children, '// the children are moved to the new object and removed from the current '// object, leaving the children non-selected. pNewGNode is installed in '// Currobj's location, and becomes the new Currobj. The old Currobj is deleted. 'TSXAPIFN void tsxCurrobjReplace( 'tsxGNODE* pNewGNode, 'tsxBOOL bNoDraw //TRUE if View displays should not be refreshed. '); Declare Sub tsxCurrobjReplace Lib "tsxapi.dll" (ByVal pNewGNode As Long, ByVal bNoDraw As Long) '// Copy curr obj and add to scene at top level, making it new currobj. 'TSXAPIFN tsxERR tsxCurrobjCopy(); Declare Function tsxCurrobjCopy Lib "tsxapi.dll" () As Long '// Draw the curr selection 'TSXAPIFN void tsxCurrobjDraw(); Declare Sub tsxCurrobjDraw Lib "tsxapi.dll" () '// Photo-render the current object in the active view. 'TSXAPIFN void tsxCurrobjPhrender(); Declare Sub tsxCurrobjPhrender Lib "tsxapi.dll" ()