Spinal Books: Introduction To 3D Programming With Shiva®
Spinal Books: Introduction To 3D Programming With Shiva®
CHAPTER 6 - Particular Trails POLYGON TRAILS GENERAL POLYGON TRAIL Generation Misc Color Opacity POLYGON TRAIL DEMO AutoRotate onStart ( ) onStop ( ) Idle.onEnter ( ) Idle.onLeave ( ) Idle.onLoop ( ) PolyTrailDemoMain onInit ( ) onMouseButtonDown ( nButton, nPointX, nPointY, nRayPntX, nRayPntY, nRayPntZ, nRayDirX, nRayDirY, nRayDirZ ) onMouseMove ( nPointX, nPointY, nDeltaX, nDeltaY, nRayPntX, nRayPntY, nRayPntZ, nRayDirX, nRayDirY, nRayDirZ ) onPauseTrails ( ) onStartTrails ( ) onStopTrails ( ) PARTICLE SYSTEMS GENERAL EMITTER PARTICLES Generation Life Time Initial Speed Rotation Gravity Friction Time Color Opacity Size PARTICLE SYSTEM DEMO Fire_Main loadScene ( ) onInit ( ) CHAPTER 7 - Sounds Good SOUND BANK DEMO PunctualSound_Ball setupDynamics ( ) onEnterFrame ( ) onInit ( ) PunctualSound_Main 3 5 6 6 6 7 1 2 2 3 5 7 8 10 16 17 17 17 17 18 18 19 19 19 20 20 21 22 23 23 24 25 27 27 27 28 28 28 29 30 30 31 37 37 37
loadScene ( ) onInit ( ) CHAPTER 8 - Its a Material World GENERAL TEXTURING TEXTURE MAPPING MODIFIER Generation Mode Scrolling Modifier Scaling Modifier TEXTURE PARAMETERS Addressing Filtering Alpha mode LIGHTING Method Shadowing Colors ADVANCED EFFECTS BATCH PROCESSING CHAPTER 9 - Heads Up! HUD MENU GENERAL MENU COMPONENT MENU TIMER MENU ACTION MENU COMPONENTS General Appearance Events Label Edit Button Progress Bar DVInput Movie List List Items List Scrollbars Slider Render Map ACTIONS CallAction EnterModalMode InterpolateBackgroundColor InterpolateBorderColor InterpolateForegroundColor InterpolateOpacity
7 7
2 12 15 16 18 19 19 20 21 22 23 24 25 25 27 29
2 3 4 5 5 7 7 9 11 12 13 14 15 16 16 17 18 19 21 22 23 23 24 25 26 26 26
InterpolatePosition InterpolateProgressValue InterpolateSize LeaveModalMode PauseMovie PauseTimer PlayMovie PlaySound SendEventToUser SetActive SetBackgroundColor SetBackgroundImage SetBorderColor SetButtonText SetCursorPosition SetCursorVisible SetEditText SetFocus SetForegroundColor SetLabelText SetOpacity SetPosition SetSize SetVisible Sleep StartTimer StopAction StopMovie StopTimer HUD DEMO MoviePlayer_Main onEnterFrame ( ) onInit ( ) CHAPTER 10 - Attributed to You ATTRIBUTES MENU CONTROLLERS MENU COMMON ATTRIBUTES CAMERA ATTRIBUTES REFLECTOR ATTRIBUTES LIGHT ATTRIBUTES SHAPE ATTRIBUTES SFX ATTRIBUTES SENSOR ATTRIBUTES AI CONTROLLER ANIMATION CONTROLLER DYNAMICS CONTROLLER COLOUR DIALOG
27 27 28 28 28 29 29 29 30 31 31 32 32 33 33 34 34 34 34 34 35 35 35 36 36 36 37 37 37 37 47 47 47
2 5 8 11 11 13 15 17 19 20 21 22 24
CHAPTER 11 - Pure Ambience AMBIENT BACKGROUND SHADOW FOG SKYBOX POSTRE (POST RENDER EFFECTS) SATURATION BLOOM LIGHTING MUSIC AMBIENCE DEMO AmbientMusic_Main onInit ( ) loadScene ( ) startMusic ( ) CHAPTER 12 - Animating the Beast ANIMBANK AnimBank Menu Editing Menu ANIMCLIP Animation Clip menu Channel menu Track menu Selection menu Track toolbar Graph toolbar ANIMATION DEMO SimpleAnimation_Character onChangeAnim ( nIndex ) onEnterFrame ( ) onInit ( ) Main onChangeAnim ( nIndex ) onInit ( ) CHAPTER 13 - Getting from A to B ADDING NAVMESH TO TERRAIN ACCESSING THE NAVEMESH FROM SCRIPT navigation.setTargetNode navigation.setAcceleration navigation.setSpeedLimit navigation.setHeightOffset navigation.getNode navigation.getTargetNode navigation.getTargetNodeDistance navigation.getSpeed navigation.getVelocity 3 4 4 4 5 5 5 6 6 6 7 1 2 2 4 6 7 7 9 9 10 12 21 21 21 22 23 23 24 2 2 3 3 4 5 6 6 8 12 13 14 15 15 15
navigation.setRandomTargetNode navigation.setNearestTargetNode navigation.setNearestNode navigation.setPathMaxLength navigation.enableNodesInBox navigation.enableNode NAVIGATION DEMO Test_ClickAndGo onInit ( ) onMouseButtonDown ( nButton, nPointX, nPointY, nRayPntX, nRayPntY, nRayPntZ, nRayDirX, nRayDirY, nRayDirZ ) Test_ClickAndGo_Character setupAnimations ( ) setupDynamics ( ) setupNavigation ( ) updateAnimations ( ) updateDynamics ( ) onEnterFrame ( ) onGoto ( x, y, z ) onInit ( ) CHAPTER 14 - A Quick Intro to XML with ShiVa LOAD AN XML DOCUMENT SEND AN XML DOCUMENT PARSE AN XML DOCUMENT BUILD OR MODIFY AN XML DOCUMENT CHAPTER 15 - The HLDL Framework CREATING THE GAME CREATING OUR FIRST SCENE IMPORTING THE REST OF THE GAME ITEMS CHAPTER 16 - Creating a Terrain GEOMETRY ROLL-UP MATERIALS ROLL-UP ADDING VEGETATION TO OUR SCENE CHAPTER 17 - The Game Scripts ADDING THE HLD LIBRARY MODELS HLDMain onInit ( ) onEnterFrame ( ) onForwardEvent ( sObjectTag, sAIModel, sHandler, vParam0, vParam1, vParam2, vParam3 ) onKeyboardKeyDown ( kKeyCode ) onKeyboardKeyUp ( kKeyCode ) onMouseButtonDown ( nButton, nPointX, nPointY, nRayPntX, nRayPntY, nRayPntZ, nRayDirX, nRayDirY, nRayDirZ ) onMouseButtonUp ( nButton, nPointX, nPointY, nRayPntX, nRayPntY, nRayPntZ, nRayDirX, nRayDirY, nRayDirZ ) onMouseMove ( nButton, nPointX, nPointY, nRayPntX, nRayPntY, nRayPntZ, nRayDirX, nRayDirY, nRayDirZ )
7 7 8 8 9 9 10 12 12 12 13 14 15 16 17 19 20 21 21
3 5 6 8
3 4 4
7 9 12
1 3 7 10 10 11 12 12 12 12
onRegisterHUD ( sInstanceID ) onRegisterObjectEvent ( hObject, sAIModel, sEvent ) onSetNextScene ( sScene ) onSwitchScene ( ) onUnregisterHUD ( sInstanceID ) onUnregisterObject ( hObject ) buildStartupSequence ( ) destroyRegisteredHUDInstances ( ) findAndUseStartupCamera ( ) findUnderCursorObject ( nRayPntX, nRayPntY, nRayPntZ, nRayDirX, nRayDirY, nRayDirZ ) sendMouseClickEventToObject ( hObject, nButton ) sendMouseEnterEventToObject ( hObject ) sendMouseLeaveEventToObject ( hObject ) switchScene ( ) HLDVisitCamera onInit ( ) onDinoCollision ( sTag ) onEnterFrame ( ) onEventKeyDown ( kKey ) onEventKeyUp ( kKey ) onMouseButtonDown ( nButton, nPointX, nPointY, nRayPntX, nRayPntY, nRayPntZ, nRayDirX, nRayDirY, nRayDirZ ) onMouseButtonUp ( nButton, nPointX, nPointY, nRayPntX, nRayPntY, nRayPntZ, nRayDirX, nRayDirY, nRayDirZ ) onUpdateScore ( n ) onWeaponChange ( sWeapon ) onWeaponShoot ( ) addDino ( n ) atan2 ( inZ, inX ) centerMouse ( ) createDynObect ( ) createHUD ( ) createIntroHUD ( ) gameOver ( sType ) registerTriggers ( ) updateRadar ( nDist, nDiff ) updateWeapon ( ) vector2Rotation ( V2R_OriginObject, V2R_TargetObject ) Weapon0 onEnterFrame ( ) onRotateHelix ( ) Weapon0Bullet explosionTest ( o ) onDestroy ( ) onSetup ( srcX, srcY, srcZ, dstX, dstY, dstZ ) Explode Explode_onEnter ( ) Fly Fly_onLoop ( ) HLDMainHUD
12 13 14 14 15 15 15 19 19 19 19 19 19 19 21 25 25 26 32 33 33 33 33 34 35 37 38 40 40 41 44 46 47 47 49 51 52 52 53 54 54 56 56 57 57 58 58 59
createAmmo ( hUser ) createRadar ( hUser ) createOptionScreen ( ) createScore ( hUser ) createTime ( hUser ) createTitle ( hUser ) onAmmoSetValue ( n ) onClearRadar ( ) onInit ( ) onQuit ( ) onRadarUpdate ( sTag ) onRun ( ) onScoreSetValue ( n ) onTimeSetValue ( n ) DinoAI atan2 ( inZ, inX ) vector2Rotation (V2R_OriginObject, V2R_TargetObject) onInit ( ) onSetup (dinoType ) onSleep ( ) Eating Eating_onEnter ( ) Eating_onLeave ( ) Eating_onLoop ( ) Running Running_onEnter ( ) Running_onLoop ( ) Walking Walking_onEnter ( ) Walking_onLoop ( )
60 60 61 61 62 62 62 63 64 64 64 64 65 65 66 69 69 69 69 71 71 71 71 72 73 73 73 76 76 77