home *** CD-ROM | disk | FTP | other *** search
- #ifndef __CUSTOMATTRIBUTE_LIB__
- #define __CUSTOMATTRIBUTE_LIB__
-
- #ifndef QD3D_h
- #include "QD3D.h"
- #endif
-
- #ifndef QD3DPick_h
- #include "QD3DPick.h"
- #endif
-
- #ifndef _STRING
- #include <string.h>
- #endif
-
- /* Here we define the new types */
-
- #define kElementTypeName 'name'
- #define kElementTypeScale 'scle'
- #define kElementTypeUpVector 'upvt'
- #define kElementTypeForwardDirection 'fwrd'
- #define kElementTypeW3Anchor 'w3nr'
- #define kElementTypeW3Inline 'w3nl'
-
- typedef enum W3AnchorOptions {
- kW3AnchorOptionNone = 0,
- kW3AnchorOptionUseMap = 1
- } W3AnchorOptions;
-
- typedef struct W3AnchorData {
- char *url;
- TQ3StringObject description;
- W3AnchorOptions options;
- } W3AnchorData;
-
- typedef struct W3InlineData {
- char *url;
- } W3InlineData;
-
- /*
- * Call this to register all the custom attributes
- *
- * One call does it all
- */
- #ifdef __cplusplus
- extern "C" {
- #endif /* __cplusplus */
-
- void RegisterAllCustomAttributes(void);
-
- void UnregisterAllCustomAttributes(void);
-
- /*
- * Convenience routines for setting elements
- *
- */
-
- TQ3Status SetName(
- TQ3Object object,
- char *name);
-
- TQ3Status SetScale(
- TQ3Object object,
- double scale);
-
- TQ3Status SetUpVector(
- TQ3Object object,
- TQ3Vector3D *upVector);
-
- TQ3Status SetForwardDirection(
- TQ3Object object,
- TQ3Vector3D *forwardDirection);
-
- TQ3Status SetW3Anchor(
- TQ3Object object,
- char *url,
- char *description,
- W3AnchorOptions options);
-
- TQ3Status SetW3Inline(
- TQ3Object object,
- char *url);
-
- TQ3Boolean W3Anchor_GetFromObject(
- TQ3Object object,
- W3AnchorData *data);
-
- TQ3Boolean W3Anchor_GetFromHitData(
- const TQ3HitData *hitData,
- W3AnchorData *data);
-
- void W3Anchor_Empty (
- W3AnchorData *URLData);
-
-
- #ifdef __cplusplus
- }
- #endif /* __cplusplus */
-
- /*
- * Note
- *
- * kElementNameWWWAnchor is obsolete and has been replaced by kElementW3Anchor.
- */
- #define kElementTypeWWWAnchor ((TQ3ElementType) Q3_OBJECT_TYPE('w','w','w','a'))
- #define kElementNameWWWAnchor "WWWAnchor"
-
- typedef struct WWWAnchorData {
- char *url;
- } WWWAnchorData;
-
- #endif
-