File: spotLightDragger.iv

package info (click to toggle)
coin2 2.5.0-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 29,156 kB
  • ctags: 29,453
  • sloc: cpp: 175,383; ansic: 42,198; sh: 9,377; makefile: 7,260; perl: 990; yacc: 181; lex: 114
file content (79 lines) | stat: -rw-r--r-- 2,224 bytes parent folder | download | duplicates (17)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#Inventor V2.1 ascii

# Standard common material definitions.
DEF SPOTLIGHT_INACTIVE_MATERIAL Material { diffuseColor 0.5 0.5 0.5  emissiveColor 0.5 0.5 0.5 }
DEF SPOTLIGHT_ACTIVE_MATERIAL Material { diffuseColor 0.5 0.5 0  emissiveColor 0.5 0.5 0 }

# Duplicates the inactive material. Don't "optimize" away this by
# referencing the SPOTLIGHT_INACTIVE_MATERIAL instance, as that
# would be unsecure in case of userdefined geometries.
DEF spotLightOverallMaterial Material { diffuseColor 0.5 0.5 0.5  emissiveColor 0.5 0.5 0.5 }


DEF SPOTLIGHT_ARROW Separator {
   # Orient along negative Z axis.
   Rotation { rotation 1 0 0  -1.57 }

   Coordinate3 { point [ 0 0 0, 0 9 0 ] }
   IndexedLineSet { coordIndex [ 0, 1, -1 ] }
   Translation { translation 0 10 0 }
   Cone { }
   Translation { translation 0 -11 0 }
   Cone { bottomRadius 0.1 }
}

DEF spotLightRotatorRotator Separator {
   USE SPOTLIGHT_INACTIVE_MATERIAL
   USE SPOTLIGHT_ARROW
}
DEF spotLightRotatorRotatorActive Separator {
   USE SPOTLIGHT_ACTIVE_MATERIAL
   USE SPOTLIGHT_ARROW
}

DEF spotLightRotatorFeedback Separator { }
DEF spotLightRotatorFeedbackActive Separator { }


DEF SPOTLIGHT_TRANSLATE_AXIS Group {
   Rotation { rotation 0 0 1  1.57 }
   Cylinder { height 3.0  radius 0.2 }
}

DEF spotLightTranslatorLineTranslator Separator {
   USE SPOTLIGHT_INACTIVE_MATERIAL
   USE SPOTLIGHT_TRANSLATE_AXIS
}
DEF spotLightTranslatorLineTranslatorActive Separator {
   USE SPOTLIGHT_ACTIVE_MATERIAL
   USE SPOTLIGHT_TRANSLATE_AXIS
}

DEF spotLightTranslatorPlaneTranslator Separator {
   USE SPOTLIGHT_INACTIVE_MATERIAL
   Sphere { }
}
DEF spotLightTranslatorPlaneTranslatorActive Separator {
   USE SPOTLIGHT_ACTIVE_MATERIAL
   Sphere { }
}


DEF SPOTLIGHT_CONEANGLE Separator {
   Rotation { rotation 1 0 0  1.57 }
   ShapeHints { vertexOrdering UNKNOWN_ORDERING }
   Cone { parts SIDES  bottomRadius 2.0 }
}

DEF spotLightBeam Separator {
   USE SPOTLIGHT_INACTIVE_MATERIAL
   DrawStyle { style LINES  lineWidth 2 }
   USE SPOTLIGHT_CONEANGLE
}
DEF spotLightBeamActive Separator {
   USE SPOTLIGHT_ACTIVE_MATERIAL
   DrawStyle { style LINES  lineWidth 3 }
   USE SPOTLIGHT_CONEANGLE
}

DEF spotLightBeamPlacement Translation { translation 0 0 -1.5 }